cgarwood / homeassistant-zwave_mqtt

Limited Pre-Release of the new OZW1.6 Z-Wave component. Currently has limited platform support. Check the README for more details.
72 stars 8 forks source link

add support for Lights (ZwaveDimmer) #36

Closed marcelveldt closed 4 years ago

marcelveldt commented 4 years ago

Basic light support (non-color dimmer only). Color support to be added later.

Also a includes a small fix for displaying the power_consumption as state attribute if a device supports this.

balloob commented 4 years ago

Please include a test. See #39 for an example.

balloob commented 4 years ago

Don't forget to update the README with that lights are supported too

marcelveldt commented 4 years ago

All set!

marcelveldt commented 4 years ago

resolves #1

cgarwood commented 4 years ago

@balloob the old component would put a power_consumption attribute on every entity if the device offered that information. Is it still preferred for that to be an attribute of a light, switch, etc, or should they just be broken out into their own sensors?

As this PR stands it matches the power_consumption handling of the existing component, which I'm fine with, but wasn't sure what would be preferred from the HA core side of things.

balloob commented 4 years ago

Well we can't graph attributes in Home Assistant. Better break it out and have it be combined at device level

marcelveldt commented 4 years ago

Alright, will do. In fact, there's already a sensor for the power consumption in place: electricity_w So, all agree to just remove the entire attribute from the entity ?

Also, there is node_id as entity attribute. Keep that one or can we make it a normal attribute instead of state attribute (so it won't be shown in frontend cards) ?

marcelveldt commented 4 years ago

@balloob @cgarwood all set now. Removed the power_consumption attr but I left the node_is attr in.