Auto-off feature

This commit is contained in:
Martin Bauer
2020-01-17 22:38:03 +01:00
parent 8f1415ec77
commit 6b8d149993
3 changed files with 108 additions and 4 deletions

View File

@@ -36,10 +36,30 @@ def get_config():
'key_yellow': '[scene] schlafzimmer_ganz_hell',
'key_blue': '[scene] schlafzimmer_blau',
'key_tv': '[timed_light_off] 30',
'key_video': '[timed_light_off] 15',
'key_music': '[timed_light_off] 10',
'key_pictures': '[timed_light_off] 5',
'key_tv': [service('script.turn_on', 'script.timed_sleep',
variables={'media_content_id': 'spotify:playlist:37i9dQZF1DXbcPC6Vvqudd', # Regen
'light_off_secs': 15 * 60,
'music_off_secs': 45 * 60,
'shuffle': 1,
})],
'key_video': [service('script.turn_on', 'script.timed_sleep',
variables={'media_content_id': 'Good Night',
'light_off_secs': 15 * 60,
'music_off_secs': 45 * 60,
'shuffle': 0,
})],
'key_music': [service('script.turn_on', 'script.timed_sleep',
variables={'media_content_id': 'spotify:playlist:37i9dQZF1DXbcPC6Vvqudd', # Regen
'light_off_secs': 5 * 60,
'music_off_secs': 20 * 60,
'shuffle': 1,
})],
'key_pictures': [service('script.turn_on', 'script.timed_sleep',
variables={'media_content_id': 'Good Night',
'light_off_secs': 5 * 60,
'music_off_secs': 20 * 60,
'shuffle': 0,
})],
'key_power': [ # Music & Lights off
service('media_player.media_pause', 'media_player.bedroompi'),