New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Philips Moonlight Bedside Lamp support #18496

Merged
merged 6 commits into from Dec 8, 2018

Conversation

@syssi
Copy link
Member

syssi commented Nov 15, 2018

Description:

  • Power (on, off)
  • Brightness
  • Color temperature (588-153 mireds / 1700K-6500K)
  • Scene (1, 2, 3, 4)
  • Attributes
    • model
    • scene
    • sleep_assistant
    • sleep_off_time
    • total_assistant_sleep_time
    • brand_sleep
    • brand

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#7589

@@ -1,5 +1,5 @@
"""
Support for Xiaomi Philips Lights (LED Ball & Ceiling Lamp, Eyecare Lamp 2).
Support for Xiaomi Philips Lights (LED Ball & Ceiling Lamp, Eyecare Lamp 2, Bedside Lamp).

This comment has been minimized.

@houndci-bot

houndci-bot Nov 15, 2018

line too long (90 > 79 characters)

@rytilahti
Copy link
Contributor

rytilahti left a comment

LGTM. Can be merged after the documentation part is done.

def _get_hs(rgb: int):
blue = rgb & 0xff
green = (rgb >> 8) & 0xff
red = (rgb >> 16) & 0xff

This comment has been minimized.

@rytilahti

rytilahti Nov 16, 2018

Contributor

I think this should go preferably to python-miio (this can be then reused by the yeelight plugin, at least).

This comment has been minimized.

@syssi
ATTR_SLEEP_OFF_TIME = 'sleep_off_time'
ATTR_TOTAL_ASSISTANT_SLEEP_TIME = 'total_assistant_sleep_time'
ATTR_BRAND_SLEEP = 'brand_sleep'
ATTR_BRAND = 'brand'

This comment has been minimized.

@rytilahti

rytilahti Nov 16, 2018

Contributor

These should be documented (although I saw that it's a TBD). What does brand mean in this context?

This comment has been minimized.

@syssi

syssi Nov 17, 2018

Member

As far as home-assistant/home-assistant.io#7498 gets merged I will extend the docs.

@property
def max_mireds(self):
"""Return the warmest color_temp that this light supports."""
return 588

This comment has been minimized.

@rytilahti

rytilahti Nov 16, 2018

Contributor

I'm wondering if these should also be defined in python-miio (in kelvin, though). What do you think, does it make sense?

This comment has been minimized.

@syssi

syssi Nov 17, 2018

Member

Yes. We should provide specs and features in the long run by python-miio.

@rytilahti

This comment has been minimized.

Copy link
Contributor

rytilahti commented Nov 23, 2018

@syssi your call, do you want to wait for the next python-miio release to simplify the RGB setting or just merge this now? As #17558 depends on a new release (as well as support for several other vacuum types), I think it would make sense to make a new release and update this, too.

@syssi

This comment has been minimized.

Copy link
Member

syssi commented Nov 24, 2018

Lets wait for the next python-miio release.

syssi added some commits Nov 15, 2018

@syssi syssi force-pushed the syssi:feature/xiaomi-miio-philips-moonlight-support branch from 6d9a00b to 27c9033 Dec 8, 2018

@rytilahti

This comment has been minimized.

Copy link
Contributor

rytilahti commented Dec 8, 2018

Thanks!

@rytilahti rytilahti merged commit 2134331 into home-assistant:dev Dec 8, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.009%) to 92.933%
Details

@wafflebot wafflebot bot removed the in progress label Dec 8, 2018

thibmaek added a commit to thibmaek/home-assistant that referenced this pull request Dec 10, 2018

Merge branch 'dev' of https://github.com/home-assistant/home-assistant
…into feature/nmbs-sensor

* 'dev' of https://github.com/home-assistant/home-assistant: (325 commits)
  Update translations
  Updated frontend to 20181210.0
  Lovelace using storage (home-assistant#19101)
  Update pygtfs to upstream's 0.1.5 (home-assistant#19151)
  Update radiotherm to 2.0.0 and handle change in tstat error detection (home-assistant#19107)
  Upgrade sphinx-autodoc-typehints to 1.5.2 (home-assistant#19140)
  Update geizhals dependency (home-assistant#19152)
  Upgrade mypy to 0.650 (home-assistant#19150)
  Upgrade upcloud-api to 0.4.3
  Upgrade youtube_dl to 2018.12.03 (home-assistant#19139)
  Upgrade slacker to 0.12.0
  Add code support for iAlarm (home-assistant#19124)
  Fixed doorbird config without events (empty list) (home-assistant#19121)
  Remove marking device tracker stale if state is stale (home-assistant#19133)
  Update Google Assistant services description and request sync timeout (home-assistant#19113)
  update edp_redy version (home-assistant#19078)
  Add Philips Moonlight Bedside Lamp support (home-assistant#18496)
  Upgrade Mill library (home-assistant#19117)
  Don't avoid async_schedule_update_ha_state by returning false (home-assistant#19102)
  Fix the Xiaomi Aqara Cube rotate event of the LAN protocol 2.0 (Closes: home-assistant#18199) (home-assistant#19104)
  ...

mxworm added a commit to mxworm/home-assistant that referenced this pull request Dec 10, 2018

Merge branch 'dev' into current
* dev:
  Upgrade youtube_dl to 2018.12.03 (home-assistant#19139)
  Add code support for iAlarm (home-assistant#19124)
  Fixed doorbird config without events (empty list) (home-assistant#19121)
  Remove marking device tracker stale if state is stale (home-assistant#19133)
  Update Google Assistant services description and request sync timeout (home-assistant#19113)
  update edp_redy version (home-assistant#19078)
  Add Philips Moonlight Bedside Lamp support (home-assistant#18496)
  Upgrade Mill library (home-assistant#19117)
  Don't avoid async_schedule_update_ha_state by returning false (home-assistant#19102)
  Fix the Xiaomi Aqara Cube rotate event of the LAN protocol 2.0 (Closes: home-assistant#18199) (home-assistant#19104)
  Support next generation of the Xiaomi Mi Smart Plug (chuangmi.plug.hmi205) (home-assistant#19071)

@balloob balloob referenced this pull request Jan 10, 2019

Merged

0.85.0 #19897

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment