-
Notifications
You must be signed in to change notification settings - Fork 6
/
bedroom.yaml
executable file
·113 lines (108 loc) · 3.37 KB
/
bedroom.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
sensor:
- platform: template
sensors:
nacht_sensor:
value_template: >-
{% if strptime(states('sensor.time'), '%H:%M').hour<5 or strptime(states('sensor.time'), '%H:%M').hour>=23 %}
nacht
{% else %}
tag
{% endif %}
# binary_sensor:
# - platform: bayesian
# prior: 0.25
# name: 'Dimitri Schläft'
# probability_threshold: 0.8
# observations:
# - entity_id: 'input_select.dimitri_presence'
# prob_given_true: 0.95 #95% chance that Dimitri is home, if he is sleeping
# prob_given_false: 0.61 #% chance Dimitri is home, if he is not sleeping
# platform: 'state'
# to_state: 'zu Hause'
# - entity_id: 'group.all_lights'
# prob_given_true: 0.94
# prob_given_false: 0.54
# platform: 'state'
# to_state: 'off'
# - entity_id: 'input_boolean.charging_phone_dimitri'
# prob_given_true: 0.70
# prob_given_false: 0.02
# platform: 'state'
# to_state: 'on'
# - entity_id: 'remote.wohnzimmer'
# prob_given_true: 0.95
# prob_given_false: 0.79
# platform: 'state'
# to_state: 'off'
# - entity_id: 'sensor.nacht_sensor'
# prob_given_true: 0.73
# prob_given_false: 0.12
# platform: 'state'
# to_state: 'nacht'
switch:
- platform: mystrom
host: !secret switch_dehumidifier_ip
name: Schalter Entfeuchter
media_player:
- platform: heos
host: !secret heos_bedroom_ip
name: HEOS Schlafzimmer
# scene:
# - name: Schlafzimmer alles aus
# entities:
# light.schlafzimmer: off
# switch.schalter_entfeuchter: off
# media_player.heos_5: paused
script:
schlafzimmer_alles_aus:
sequence:
- service: light.turn_off
data:
entity_id: light.schlafzimmer
- service: switch.turn_off
data:
entity_id: switch.schalter_entfeuchter
- service: media_player.media_pause
data:
entity_id: media_player.spotify
gute_nacht:
sequence:
- service: light.turn_off
data:
entity_id:
- light.wohnzimmer
- light.buero
- light.ankleidezimmer
- light.schlafzimmer
- service: switch.turn_off
data:
entity_id: switch.schalter_entfeuchter
- service: remote.turn_off
data:
entity_id: remote.wohnzimmer
- service: homeassistant.turn_off
data:
entity_id: media_player.buero_musik_main
- service: input_boolean.turn_on
data:
entity_id: input_boolean.sleep_mode
- service: media_player.select_source
data:
entity_id: media_player.spotify
source: "HEOS 5"
- service: media_player.volume_set
data:
entity_id: media_player.spotify
volume_level: 0.07
- service: media_player.play_media
data:
entity_id: media_player.spotify
media_content_id: 'spotify:user:spotify:playlist:37i9dQZF1DWSUFOo47GEsI'
media_content_type: 'playlist'
- service: media_player.shuffle_set
data:
entity_id: media_player.spotify
shuffle: 'true'
- service: media_player.media_next_track
data:
entity_id: media_player.spotify