mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -7,12 +7,16 @@ trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either
|
||||
to: "on"
|
||||
# Bed in master bedroom is occupied
|
||||
- platform: state
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
to: "on"
|
||||
# Radio playing
|
||||
- platform: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
entity_id: media_player.bedroom_hub
|
||||
to: "playing"
|
||||
- platform: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
entity_id: media_player.bedroom_hub
|
||||
to: "idle"
|
||||
# Light on
|
||||
- platform: state
|
||||
|
||||
@@ -13,6 +13,10 @@ trigger:
|
||||
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_right
|
||||
to: "off"
|
||||
for: "00:05:00"
|
||||
# Bed in master bedroom is occupied
|
||||
- platform: state
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
to: "on"
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.master_bedroom_door_contact
|
||||
|
||||
@@ -10,6 +10,10 @@ trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_right
|
||||
to: "on"
|
||||
# Bed in master bedroom is occupied
|
||||
- platform: state
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
to: "on"
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
|
||||
@@ -28,7 +28,7 @@ action:
|
||||
- action: media_player.volume_set
|
||||
data:
|
||||
#entity_id: media_player.ma_home_assistant_voice_097b44_media_player
|
||||
entity_id: media_player.ma_master_bedroom_clock
|
||||
entity_id: media_player.ma_bedroom_hub
|
||||
volume_level: 0.90
|
||||
|
||||
- action: input_select.select_option
|
||||
@@ -40,7 +40,7 @@ action:
|
||||
- action: music_assistant.play_media
|
||||
target:
|
||||
#entity_id: media_player.ma_home_assistant_voice_097b44_media_player
|
||||
entity_id: media_player.ma_master_bedroom_clock
|
||||
entity_id: media_player.ma_bedroom_hub
|
||||
data:
|
||||
media_type: playlist
|
||||
#media_id: library://playlist/7
|
||||
|
||||
Reference in New Issue
Block a user