mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-11 22:34:04 +02:00
assign brightness variable
This commit is contained in:
parent
b7daa6c05c
commit
88d3555614
1 changed files with 3 additions and 4 deletions
|
|
@ -326,10 +326,9 @@ class CircadianSwitch(SwitchEntity, RestoreEntity):
|
|||
|
||||
which = None
|
||||
service_data = {ATTR_ENTITY_ID: light}
|
||||
if self._attributes["brightness"] is not None:
|
||||
service_data[ATTR_BRIGHTNESS] = int(
|
||||
(self._attributes["brightness"] / 100) * 254
|
||||
)
|
||||
brightness = self._attributes["brightness"]
|
||||
if brightness is not None:
|
||||
service_data[ATTR_BRIGHTNESS] = int((brightness / 100) * 254)
|
||||
if transition is not None:
|
||||
service_data[ATTR_TRANSITION] = transition
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue