Skip to content

mhpetiwala/wiz_light

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wiz_light

A Home assistant integration for Phillips WiZ Light bulbs

This is a fork of https://github.com/sbidy/wiz_light/ and fixes several issues with the component. Please note that once these two PRs are merged you should use the original component as I do not aim at maintaining this one: (sbidy/wiz_light#9, sbidy/pywizlight#2)

This fork is updating @angadsingh/wiz_light fork from main component to work on older HASS release 0.95.4 with Python release < 3.7. Changes made to existing code base to pull in all the async and rythm related changes that @angadsingh made below. Also the asyncio_dgram wrapper code has been integrated removing the dependeny of installing the module vthia pip as it is not compatible with Python release < 3.6. This was mainly changed as the original code from https://github.com/sbidy/wiz_light/ does not work for my env. Eventually it's best to use the component from the authors site.

Bug fixes:

  • Fixes sbidy/wiz_light#6: make the whole component truly async using non-blocking UDP
  • Light control now works even when lights are set to a rhythm.

Features:

  • Now supports switching the light to rhythm mode! (rhythm is defined as a scene for HA)
  • Implements a pattern of sending multiple command UDP datagrams until response is received
  • Consolidates getPilot and setPilot calls using a PilotBuilder and PilotParser. Removes unnecessary UDP calls for each and every attribute (color, temperature, brightness, scene, etc.) and makes a combined getPilot/setPilot call
  • enhanced debug logging for UDP

This component does not need a dependency on pywizlight like @sbidy's component

Next improvement:

  • Implement hacs.xyz structure

Working features

  • Brigtness
  • Color (RGB)
  • White Color Temprature
  • On/Off, Toggle
  • Effects
  • Setting a rhythm as a scene

Testing

See test.py for how the underlying API works

HA config

To enable the platform integration add

light:
  - platform: wiz_light
    name: <Name of the device>
    host: <IP of the bulb>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%