Skip to content

Commit

Permalink
Merge pull request #941 from DellanX/feature/hassio-zero-transition-time
Browse files Browse the repository at this point in the history
Set light transition time to zero
  • Loading branch information
bramstroker committed Aug 4, 2022
2 parents 0687f93 + ca172f2 commit 24464bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utils/measure/light_controller/hass.py
Expand Up @@ -64,12 +64,13 @@ def process_answers(self, answers: dict[str, Any]):
def build_hs_json_body(self, bri: int, hue: int, sat: int) -> dict:
return {
"entity_id": self._entity_id,
"transition": 0,
"brightness": bri,
"hs_color": [hue / 65535 * 360, sat / 255 * 100],
}

def build_ct_json_body(self, bri: int, ct: int) -> dict:
return {"entity_id": self._entity_id, "brightness": bri, "color_temp": ct}
return {"entity_id": self._entity_id, "transition": 0, "brightness": bri, "color_temp": ct}

def build_bri_json_body(self, bri: int) -> dict:
return {"entity_id": self._entity_id, "brightness": bri}
return {"entity_id": self._entity_id, "transition": 0, "brightness": bri}

0 comments on commit 24464bc

Please sign in to comment.