before cleanup
This commit is contained in:
@@ -1,12 +1,2 @@
|
||||
apps:
|
||||
bad_luefter
|
||||
herd
|
||||
ios_actions
|
||||
ir_remote_kinderzimmer
|
||||
ir_remote_kitchenpi
|
||||
ir_remote_oben
|
||||
ir_remote_schlafzimmer
|
||||
knx_buttons
|
||||
licht_gang_bogen
|
||||
licht_schlafzimmer
|
||||
licht_wc
|
||||
allow_all_imports: true
|
||||
hass_is_global: true
|
||||
|
||||
7
pyscript/garten.py
Normal file
7
pyscript/garten.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from ir_helpers import *
|
||||
from licht_garten import *
|
||||
|
||||
|
||||
@event_trigger("esphome.gartenhaus_lichtschalter_gross")
|
||||
def gartenhaus_lichtschalter_gross(**kwargs):
|
||||
scene_helper(garten_alles)
|
||||
@@ -1,6 +1,6 @@
|
||||
from datetime import datetime
|
||||
from ir_helpers import *
|
||||
|
||||
from licht_garten import *
|
||||
|
||||
# --------------------------------- "Scenes" for actions ----------------------------------------------------
|
||||
|
||||
@@ -120,32 +120,7 @@ def wohnzimmer_scenes():
|
||||
is_on = lambda: hass.states.get("light.wohnzimmer_lichter").state == "on"
|
||||
return is_on, scenes
|
||||
|
||||
def garten_vorne():
|
||||
scenes = [
|
||||
scene_f("garten_eingang_normal"),
|
||||
scene_f("garten_eingang_hell"),
|
||||
scene_f("garten_eingang_farbig"),
|
||||
]
|
||||
is_on = lambda: hass.states.get("light.lichter_garten_eingang").state == "on"
|
||||
return is_on, scenes
|
||||
|
||||
def garten_sued():
|
||||
scenes = [
|
||||
scene_f("garten_sued_normal"),
|
||||
scene_f("garten_sued_hell"),
|
||||
scene_f("garten_sued_farbig"),
|
||||
]
|
||||
is_on = lambda: hass.states.get("light.garten_sud").state == "on"
|
||||
return is_on, scenes
|
||||
|
||||
def garten_alles():
|
||||
scenes = [
|
||||
scene_f("garten_alles_normal"),
|
||||
scene_f("garten_alles_hell"),
|
||||
scene_f("garten_alles_farbig"),
|
||||
]
|
||||
is_on = lambda: hass.states.get("light.garten_sud").state == "on"
|
||||
return is_on, scenes
|
||||
|
||||
# --------------------------------- HA App actions ---------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -40,11 +40,11 @@ def ir_remote_kinderzimmer(button_name=None, **kwargs):
|
||||
def ir_remote_hauppauge_kinderzimmer(button_name=None, **kwargs):
|
||||
p = {'player': 'media_player.musicmouse'}
|
||||
mapping = {
|
||||
**default_ir_light_control('group.kids_room'),
|
||||
**default_ir_cover_control('group.kids_room'),
|
||||
**default_ir_music_control(**p),
|
||||
**default_ir_cover_control('group.kids_room'),
|
||||
**default_ir_light_control('group.kids_room'), # last, so key_menu dims instead of shuffle
|
||||
|
||||
'key_red': scene_f('kinderzimmer_regal_dunkel'),
|
||||
'key_red': scene_f('kinderzimmer_nachtlicht_regal'),
|
||||
'key_green': scene_f('kinderzimmer_orange'),
|
||||
'key_yellow': scene_f('kinderzimmer_hell'),
|
||||
'key_blue': scene_f('kinderzimmer_normal'),
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import json
|
||||
from ir_helpers import *
|
||||
from licht_garten import *
|
||||
|
||||
@pyscript_compile
|
||||
def in_room(room):
|
||||
@@ -159,7 +161,4 @@ def wohnzimmer_terassentuer(entity_id=None, event_type=None):
|
||||
if long_click:
|
||||
scene.wohnbereich_kuscheln.turn_on()
|
||||
elif key == "flowers":
|
||||
if long_click:
|
||||
light.turn_off(entity_id="light.garten_lichter")
|
||||
else:
|
||||
scene.garten_savanna.turn_on()
|
||||
scene_helper(garten_alles)
|
||||
|
||||
27
pyscript/modules/licht_garten.py
Normal file
27
pyscript/modules/licht_garten.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from ir_helpers import *
|
||||
|
||||
|
||||
def garten_vorne():
|
||||
scenes = [
|
||||
scene_f("garten_eingang_normal"),
|
||||
scene_f("garten_eingang_hell"),
|
||||
scene_f("garten_eingang_farbig"),
|
||||
]
|
||||
is_on = lambda: hass.states.get("light.lichter_garten_eingang").state == "on"
|
||||
return is_on, scenes
|
||||
|
||||
def garten_sued():
|
||||
scenes = [
|
||||
scene_f("garten_sued_normal"),
|
||||
scene_f("garten_sued_hell"),
|
||||
scene_f("garten_sued_farbig"),
|
||||
]
|
||||
is_on = lambda: hass.states.get("light.garten_sud").state == "on"
|
||||
return is_on, scenes
|
||||
|
||||
def garten_alles():
|
||||
scenes = [
|
||||
scene_f("garten_licht_szene_standard"),
|
||||
]
|
||||
is_on = lambda: hass.states.get("light.lichter_garten").state == "on"
|
||||
return is_on, scenes
|
||||
Reference in New Issue
Block a user