updates
This commit is contained in:
@@ -35,7 +35,7 @@ def kz_regal_scenes():
|
||||
entity = "light.music_mouse_regal_licht"
|
||||
|
||||
def fade_out_f(rgb_color, seconds):
|
||||
return multiple_f(cover_f("close_cover", "cover_kinderzimmer_rollo"),
|
||||
return multiple_f(cover_f("close_cover", "cover.kinderzimmer_rollo"),
|
||||
light_f("turn_on", entity, brightness=250, rgb_color=rgb_color, effect="side_0.5"),
|
||||
light_f("turn_on", entity, brightness= 10, rgb_color=rgb_color, effect="side_0.5_inc4", transition=int(0.8 * seconds)),
|
||||
light_f("turn_on", entity, brightness= 10, rgb_color=rgb_color, effect="side_0.2_inc8", transition=int(0.2 * seconds))),
|
||||
@@ -46,7 +46,7 @@ def kz_regal_scenes():
|
||||
fade_out_f([255, 98, 231], 10 * 60),
|
||||
light_f("turn_off", entity)
|
||||
]
|
||||
else:
|
||||
else:
|
||||
scenes = [
|
||||
light_f("turn_on", entity, brightness=250, rgb_color=[255, 182, 41], effect="static"),
|
||||
light_f("turn_on", entity, brightness=250, rgb_color=[255, 98, 231], effect="static"),
|
||||
@@ -154,8 +154,10 @@ def on_ios_action_fired(actionName, **kwargs):
|
||||
if actionName == "az_oben_licht":
|
||||
scene_helper(az_oben_licht_scenes)
|
||||
elif actionName == "kz_regal":
|
||||
log.info("KZ Regal action fired")
|
||||
scene_helper(kz_regal_scenes)
|
||||
elif actionName == "az_unten_licht":
|
||||
log.info("AZ unten Licht action fired")
|
||||
scene_helper(az_unten_licht_scenes)
|
||||
elif actionName == "wz_deckenlampe":
|
||||
scene_helper(wz_deckenlampe)
|
||||
@@ -205,17 +207,52 @@ def on_ios_shortcut_event(room, action, device, **kwargs):
|
||||
elif action == "hass_cover_half":
|
||||
cover_half.set_half(entity_id="cover.arbeitszimmer_rollo")
|
||||
|
||||
if room in ("küche", "esszimmer", "sofa", "wohnzimmer"):
|
||||
if action == "hass_light_off":
|
||||
light_f('turn_off', "group.living_area")()
|
||||
elif action == "hass_light_orange":
|
||||
scene_f("wohnbereich_orange")()
|
||||
elif action == "hass_light_blue":
|
||||
scene_f("wohnbereich_blau_grun")()
|
||||
elif action == "hass_light_bright":
|
||||
scene_f("wohnbereich_hell")()
|
||||
elif action == "hass_light_darken":
|
||||
dimmer.dim(entity_id="group.living_area", offset=-80)
|
||||
elif action == "hass_light_brighten":
|
||||
dimmer.dim(entity_id="group.living_area", offset=80)
|
||||
elif action == "hass_light_off":
|
||||
light.turn_off(entity_id="group.living_area")
|
||||
elif action == "hass_cover_open":
|
||||
cover.open_cover(entity_id="group.living_area")
|
||||
elif action == "hass_cover_close":
|
||||
cover.close_cover(entity_id="group.living_area")
|
||||
elif action == "hass_cover_half":
|
||||
cover_half.set_half(entity_id="group.living_area")
|
||||
elif action == "hass_sun_blinds":
|
||||
cover_half.set_half(entitiy_id="cover.wohnzimmer_fenster_rollo")
|
||||
|
||||
if room == "kinderzimmer":
|
||||
if action == "hass_cover_open":
|
||||
cover.open_cover(area_id="kinderzimmer")
|
||||
elif action == "hass_cover_close":
|
||||
cover.close_cover(area_id="kinderzimmer")
|
||||
|
||||
if room == "buero_oben":
|
||||
entity = "scene.arbeitszimmer_orange"
|
||||
if action == "hass_light":
|
||||
scene_helper(az_oben_licht_scenes)
|
||||
elif action == "hass_light_orange":
|
||||
light_f("turn_on", entity, color_temp=470, brightness=100)()
|
||||
elif action == "hass_light_blue":
|
||||
light_f("turn_on", entity, color_temp=180, brightness=230)()
|
||||
elif action == "hass_light_darken":
|
||||
dimmer.dim(entity_id=entity, offset=-30)
|
||||
elif action == "hass_light_brighten":
|
||||
dimmer.dim(entity_id=entity, offset=30)
|
||||
elif action == "hass_light_off":
|
||||
light.turn_off(entity_id=entity)
|
||||
light.turn_off(entity_id="light.arbeitszimmer_oben_fluter")
|
||||
elif action == "hass_light_orange":
|
||||
scene_f("arbeitszimmer_oben_orange")()
|
||||
elif action == "hass_light_blue":
|
||||
scene_f("arbeitszimmer_oben_blau")()
|
||||
elif action == "hass_light_darken":
|
||||
dimmer.dim(entity_id="light.arbeitszimmer_oben_fluter", offset=-80)
|
||||
elif action == "hass_light_brighten":
|
||||
dimmer.dim(entity_id="light.arbeitszimmer_oben_fluter", offset=80)
|
||||
elif action == "hass_light_off":
|
||||
light.turn_off(entity_id="light.arbeitszimmer_oben_fluter")
|
||||
elif action == "hass_cover_open":
|
||||
cover.open_cover(area_id="arbeitszimmeroben")
|
||||
elif action == "hass_cover_close":
|
||||
cover.close_cover(area_id="arbeitszimmeroben")
|
||||
|
||||
Reference in New Issue
Block a user