Schlafzimmer szenen, stillen usw
This commit is contained in:
@@ -70,3 +70,16 @@ first_floor:
|
||||
- light.wohnzimmer_stehlampe_oben
|
||||
|
||||
|
||||
# ----------- Custom groups -----------------------------
|
||||
|
||||
eating_area:
|
||||
name: Esszimmer & Küche
|
||||
entities:
|
||||
- light.kuche_links
|
||||
- light.kuche_rechts
|
||||
- light.kuche_vorne
|
||||
- light.esszimmer_deckenlampe_west
|
||||
- light.esszimmer_deckenlampe_mitte
|
||||
- light.kuche_deckenlampe
|
||||
- cover.kuche_fenster_rollo
|
||||
- cover.esszimmer_fenster_rollo
|
||||
|
||||
@@ -6,6 +6,7 @@ yaml = YAML()
|
||||
|
||||
# -------------------------------------- put the config here -----------------------------------------------------------
|
||||
|
||||
|
||||
def get_config():
|
||||
return {
|
||||
'bedroom': {
|
||||
@@ -26,14 +27,19 @@ def get_config():
|
||||
'btn_8': '[radio] BR-Klassik',
|
||||
'btn_9': '[playlist] http://opml.radiotime.com/Tune.ashx?id=s25028&formats=aac,ogg,mp3', # Klassik Radio
|
||||
|
||||
'key_numeric_star': '[radio] Antenne Bayern',
|
||||
'key_numeric_star': [
|
||||
*repeat_one_crossfade('media_player.bedroompi'),
|
||||
service('media_player.play_media', 'media_player.bedroompi',
|
||||
media_content_id='Foen', media_content_type='music'),
|
||||
service('media_player.volume_set', 'media_player.bedroompi', volume_level=60),
|
||||
],
|
||||
'btn_0': '[radio] Bayern 3',
|
||||
'key_numeric_pound': '[radio] Bayern 2',
|
||||
|
||||
'key_red': '[scene] schlafzimmer_stillen',
|
||||
'key_green': '[scene] schlafzimmer_orange',
|
||||
'key_yellow': '[scene] schlafzimmer_ganz_hell',
|
||||
'key_blue': '[scene] schlafzimmer_blau',
|
||||
'key_blue': '[scene] nachtswennallelieberschlafen',
|
||||
|
||||
'key_tv': [service('script.turn_on', 'script.timed_sleep',
|
||||
variables={'media_content_id': 'spotify:playlist:37i9dQZF1DXbcPC6Vvqudd', # Regen
|
||||
@@ -131,7 +137,7 @@ def get_config():
|
||||
'btn_0': '[playlist] Weihnachten mit den Wiener Sängerknaben',
|
||||
'key_numeric_pound': '[playlist] SammlungGeorg',
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -146,6 +152,21 @@ def split_description(d):
|
||||
return res.group(1).strip(), res.group(2).strip()
|
||||
|
||||
|
||||
def default_music_settings(media_player):
|
||||
return [
|
||||
service('media_player.shuffle_set', media_player, shuffle=False),
|
||||
service('media_player.squeezebox_call_method', media_player, command='playlist repeat 0'),
|
||||
service('media_player.squeezebox_call_method', media_player, command="playerpref transitionType 0"),
|
||||
]
|
||||
|
||||
|
||||
def repeat_one_crossfade(media_player):
|
||||
return [
|
||||
service('media_player.repeat_set', media_player, repeat='one'),
|
||||
service('media_player.squeezebox_call_method', media_player, command="playerpref transitionType 1"),
|
||||
]
|
||||
|
||||
|
||||
def automation_from_config(ir_description):
|
||||
ir_host = ir_description['ir_host']
|
||||
|
||||
@@ -159,8 +180,9 @@ def automation_from_config(ir_description):
|
||||
function, value = split_description(description)
|
||||
if function == 'playlist':
|
||||
media_player = ir_description['media_player']
|
||||
action = service('media_player.play_media', media_player,
|
||||
media_content_id=value, media_content_type='music')
|
||||
action = [*default_music_settings(media_player),
|
||||
service('media_player.play_media', media_player,
|
||||
media_content_id=value, media_content_type='music')]
|
||||
elif function == 'radio':
|
||||
media_player = ir_description['media_player']
|
||||
action = service('media_player.play_media', media_player,
|
||||
|
||||
@@ -7,7 +7,7 @@ person:
|
||||
sun:
|
||||
system_health:
|
||||
updater:
|
||||
logbook:
|
||||
#logbook:
|
||||
|
||||
#input_boolean:
|
||||
#input_datetime:
|
||||
@@ -157,6 +157,83 @@ switch:
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
retain: false
|
||||
- platform: mqtt
|
||||
name: Tasmota01
|
||||
state_topic: "stat/tasmota01/POWER"
|
||||
command_topic: "cmnd/tasmota01/POWER"
|
||||
availability_topic: "tele/tasmota01/LWT"
|
||||
qos: 1
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
retain: false
|
||||
- platform: mqtt
|
||||
name: Tasmota02
|
||||
state_topic: "stat/tasmota02/POWER"
|
||||
command_topic: "cmnd/tasmota02/POWER"
|
||||
availability_topic: "tele/tasmota02/LWT"
|
||||
qos: 1
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
retain: false
|
||||
- platform: mqtt
|
||||
name: Tasmota03
|
||||
state_topic: "stat/tasmota03/POWER"
|
||||
command_topic: "cmnd/tasmota03/POWER"
|
||||
availability_topic: "tele/tasmota03/LWT"
|
||||
qos: 1
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
retain: false
|
||||
- platform: mqtt
|
||||
name: Tasmota04
|
||||
state_topic: "stat/tasmota04/POWER"
|
||||
command_topic: "cmnd/tasmota04/POWER"
|
||||
availability_topic: "tele/tasmota04/LWT"
|
||||
qos: 1
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
retain: false
|
||||
- platform: mqtt
|
||||
name: Tasmota05
|
||||
state_topic: "stat/tasmota05/POWER"
|
||||
command_topic: "cmnd/tasmota05/POWER"
|
||||
availability_topic: "tele/tasmota05/LWT"
|
||||
qos: 1
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
retain: false
|
||||
- platform: mqtt
|
||||
name: Tasmota06
|
||||
state_topic: "stat/tasmota06/POWER"
|
||||
command_topic: "cmnd/tasmota06/POWER"
|
||||
availability_topic: "tele/tasmota06/LWT"
|
||||
qos: 1
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
retain: false
|
||||
- platform: mqtt
|
||||
name: Tasmota07
|
||||
state_topic: "stat/tasmota07/POWER"
|
||||
command_topic: "cmnd/tasmota07/POWER"
|
||||
availability_topic: "tele/tasmota07/LWT"
|
||||
qos: 1
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
retain: false
|
||||
|
||||
long_click:
|
||||
duration: 0.6
|
||||
@@ -444,6 +521,16 @@ vacuum:
|
||||
|
||||
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
state_topic: 'monitor/kitchen/martin_handy'
|
||||
value_template: '{{ value_json.confidence }}'
|
||||
unit_of_measurement: '%'
|
||||
name: 'bluetooth_martin_handy_kitchen'
|
||||
- platform: mqtt
|
||||
state_topic: 'monitor/kitchen/martin_ipad'
|
||||
value_template: '{{ value_json.confidence }}'
|
||||
unit_of_measurement: '%'
|
||||
name: 'bluetooth_martin_ipad_kitchen'
|
||||
- platform: template
|
||||
sensors:
|
||||
motion_combined:
|
||||
@@ -485,8 +572,8 @@ sensor:
|
||||
group: !include groups.yaml
|
||||
automation: !include automations.yaml
|
||||
script: !include scripts.yaml
|
||||
scene: !include_dir_merge_list scenes
|
||||
|
||||
scene: !include scenes.yaml
|
||||
scene old: !include_dir_merge_list scenes
|
||||
|
||||
# Light groups
|
||||
|
||||
|
||||
Reference in New Issue
Block a user