Add tplink light setting ignore default (#50334)
This fixes issue #50115 by allowing color, brightness, and temperature to be set from an off state. This adds code to allow "ignore_default=1" to be sent to bulb letting it know to power on with the parameters set.pull/50356/head
parent
cbf4632895
commit
f814a7a8ae
homeassistant/components/tplink
|
@ -43,6 +43,7 @@ ATTR_DAILY_ENERGY_KWH = "daily_energy_kwh"
|
|||
ATTR_MONTHLY_ENERGY_KWH = "monthly_energy_kwh"
|
||||
|
||||
LIGHT_STATE_DFT_ON = "dft_on_state"
|
||||
LIGHT_STATE_DFT_IGNORE = "ignore_default"
|
||||
LIGHT_STATE_ON_OFF = "on_off"
|
||||
LIGHT_STATE_RELAY_STATE = "relay_state"
|
||||
LIGHT_STATE_BRIGHTNESS = "brightness"
|
||||
|
@ -117,6 +118,7 @@ class LightState(NamedTuple):
|
|||
|
||||
return {
|
||||
LIGHT_STATE_ON_OFF: 1 if self.state else 0,
|
||||
LIGHT_STATE_DFT_IGNORE: 1 if self.state else 0,
|
||||
LIGHT_STATE_BRIGHTNESS: brightness_to_percentage(self.brightness),
|
||||
LIGHT_STATE_COLOR_TEMP: color_temp,
|
||||
LIGHT_STATE_HUE: self.hs[0] if self.hs else 0,
|
||||
|
|
Loading…
Reference in New Issue