From c0c6263e2c49013e5b9eb44211ed797b7b7cea3f Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Wed, 13 Oct 2021 22:16:23 +0300 Subject: [PATCH] Rename house mode to bedroom mode --- .../automation/light_on_set_temperature.yaml | 2 +- .../advanced_dashboard/08_automations.yaml | 10 +++--- .../home_dashboard/preferences_dashboard.yaml | 6 ++-- config/lovelace/popup_cards.yaml | 6 ++-- .../devices/bedroom/bedroom_opple.yaml | 8 ++--- .../devices/bedroom/bedside_switch.yaml | 12 +++---- .../devices/living_room/desk_switch.yaml | 4 +-- config/packages/devices/living_room/tv.yaml | 2 +- .../{house_mode.yaml => bedroom_mode.yaml} | 32 +++++++++---------- config/packages/modes/domestina.yaml | 8 ++--- config/packages/modules/clock.yaml | 10 +++--- config/packages/modules/ios_events.yaml | 7 ++-- .../modules/lighting/areas/bedroom.yaml | 2 +- .../modules/lighting/areas/hallway.yaml | 4 +-- .../modules/lighting/areas/kitchen.yaml | 6 ++-- config/packages/modules/speech.yaml | 2 +- 16 files changed, 60 insertions(+), 61 deletions(-) rename config/packages/modes/{house_mode.yaml => bedroom_mode.yaml} (63%) diff --git a/config/blueprints/automation/light_on_set_temperature.yaml b/config/blueprints/automation/light_on_set_temperature.yaml index 5f7cd5f..7605570 100644 --- a/config/blueprints/automation/light_on_set_temperature.yaml +++ b/config/blueprints/automation/light_on_set_temperature.yaml @@ -17,7 +17,7 @@ trigger: condition: condition: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode state: "day" action: diff --git a/config/lovelace/advanced_dashboard/08_automations.yaml b/config/lovelace/advanced_dashboard/08_automations.yaml index c20f72b..7e384d7 100644 --- a/config/lovelace/advanced_dashboard/08_automations.yaml +++ b/config/lovelace/advanced_dashboard/08_automations.yaml @@ -129,13 +129,13 @@ cards: - automation.notification_door_opened - type: entities - title: House Mode + title: Bedroom Mode show_header_toggle: false entities: - - automation.house_mode_set_to_day - - automation.house_mode_set_to_bed - - automation.house_mode_set_to_night - - automation.house_mode_set_to_day_if_bedroom_door_was_opened + - automation.bedroom_mode_set_to_day + - automation.bedroom_mode_set_to_bed + - automation.bedroom_mode_set_to_night + - automation.bedroom_mode_set_to_day_if_bedroom_door_was_opened - type: entities title: Guest mode diff --git a/config/lovelace/home_dashboard/preferences_dashboard.yaml b/config/lovelace/home_dashboard/preferences_dashboard.yaml index 6c38cd3..6e61272 100644 --- a/config/lovelace/home_dashboard/preferences_dashboard.yaml +++ b/config/lovelace/home_dashboard/preferences_dashboard.yaml @@ -47,13 +47,13 @@ name: Speech - type: custom:button-card template: v3_button - entity: input_select.house_mode - name: House + entity: input_select.bedroom_mode + name: Bedroom tap_action: action: call-service service: input_select.select_next service_data: - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode - type: horizontal-stack cards: diff --git a/config/lovelace/popup_cards.yaml b/config/lovelace/popup_cards.yaml index 1c826cd..11dfdf0 100644 --- a/config/lovelace/popup_cards.yaml +++ b/config/lovelace/popup_cards.yaml @@ -1,9 +1,9 @@ -binary_sensor.house_mode: - title: House mode +binary_sensor.bedroom_mode: + title: Bedroom mode card: type: entities entities: - - input_select.house_mode + - input_select.bedroom_mode binary_sensor.kitchen_motion_occupancy: title: Kitchen motion diff --git a/config/packages/devices/bedroom/bedroom_opple.yaml b/config/packages/devices/bedroom/bedroom_opple.yaml index 442683b..245cf4d 100644 --- a/config/packages/devices/bedroom/bedroom_opple.yaml +++ b/config/packages/devices/bedroom/bedroom_opple.yaml @@ -37,11 +37,11 @@ automation: data_template: entity_id: light.master_bedroom brightness_pct: >- - {% if not is_state('input_select.house_mode', 'day') %} 40 {% else %} 100 {% endif %} + {% if not is_state('input_select.bedroom_mode', 'day') %} 40 {% else %} 100 {% endif %} - service: script.bed_led_on data_template: brightness_pct: >- - {% if not is_state('input_select.house_mode', 'day') %} 40 {% else %} 100 {% endif %} + {% if not is_state('input_select.bedroom_mode', 'day') %} 40 {% else %} 100 {% endif %} button_1_double: - service: light.turn_off @@ -53,7 +53,7 @@ automation: entity_id: light.master_bedroom_main brightness_pct: >- - {% if not is_state('input_select.house_mode', 'day') %} + {% if not is_state('input_select.bedroom_mode', 'day') %} 40 {% else %} 100 @@ -72,7 +72,7 @@ automation: - light.bedside brightness_pct: >- - {% if not is_state('input_select.house_mode', 'day') %} + {% if not is_state('input_select.bedroom_mode', 'day') %} 40 {% else %} 100 diff --git a/config/packages/devices/bedroom/bedside_switch.yaml b/config/packages/devices/bedroom/bedside_switch.yaml index 7f2ced0..0e69c9a 100644 --- a/config/packages/devices/bedroom/bedside_switch.yaml +++ b/config/packages/devices/bedroom/bedside_switch.yaml @@ -24,19 +24,19 @@ automation: - service: script.bed_led_toggle data_template: brightness_pct: >- - {% if is_state('input_select.house_mode', 'night') %} 40 {% else %} 100 {% endif %} + {% if is_state('input_select.bedroom_mode', 'night') %} 40 {% else %} 100 {% endif %} - service: light.toggle data_template: entity_id: >- - {% if is_state('input_select.house_mode', 'day') %} + {% if is_state('input_select.bedroom_mode', 'day') %} light.master_bedroom_main - {% elif is_state('input_select.house_mode', 'bed') %} + {% elif is_state('input_select.bedroom_mode', 'bed') %} light.bedside {% endif %} brightness_pct: >- - {% if is_state('input_select.house_mode', 'night') %} 40 {% else %} 100 {% endif %} + {% if is_state('input_select.bedroom_mode', 'night') %} 40 {% else %} 100 {% endif %} double_click: - service: light.toggle @@ -46,8 +46,8 @@ automation: - service: script.bed_led_toggle data_template: brightness_pct: >- - {% if is_state('input_select.house_mode', 'night') %} 40 {% else %} 100 {% endif %} + {% if is_state('input_select.bedroom_mode', 'night') %} 40 {% else %} 100 {% endif %} hold: - service: input_select.select_next - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode diff --git a/config/packages/devices/living_room/desk_switch.yaml b/config/packages/devices/living_room/desk_switch.yaml index 73b3e36..d0bc9f5 100644 --- a/config/packages/devices/living_room/desk_switch.yaml +++ b/config/packages/devices/living_room/desk_switch.yaml @@ -27,7 +27,7 @@ automation: entity_id: light.living_room_main brightness_pct: >- - {% if is_state('input_select.house_mode', 'night') %} + {% if is_state('input_select.bedroom_mode', 'night') %} 40 {% else %} 100 @@ -39,7 +39,7 @@ automation: entity_id: light.living_room_ambient brightness_pct: >- - {% if is_state('input_select.house_mode', 'night') %} + {% if is_state('input_select.bedroom_mode', 'night') %} 40 {% else %} 100 diff --git a/config/packages/devices/living_room/tv.yaml b/config/packages/devices/living_room/tv.yaml index a85b3e4..2537e8b 100644 --- a/config/packages/devices/living_room/tv.yaml +++ b/config/packages/devices/living_room/tv.yaml @@ -98,7 +98,7 @@ automation: to: "off" condition: condition: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode state: "day" action: - service: script.sonos_join_bedroom diff --git a/config/packages/modes/house_mode.yaml b/config/packages/modes/bedroom_mode.yaml similarity index 63% rename from config/packages/modes/house_mode.yaml rename to config/packages/modes/bedroom_mode.yaml index c74f789..1053059 100644 --- a/config/packages/modes/house_mode.yaml +++ b/config/packages/modes/bedroom_mode.yaml @@ -1,7 +1,7 @@ # Mode config input_select: - house_mode: - name: House mode + bedroom_mode: + name: Bedroom mode icon: mdi:home-analytics options: - day @@ -11,14 +11,14 @@ input_select: binary_sensor: - platform: template sensors: - house_mode: - friendly_name: House mode - value_template: "{{ states('input_select.house_mode') }}" + bedroom_mode: + friendly_name: Bedroom mode + value_template: "{{ states('input_select.bedroom_mode') }}" icon_template: >- - {% if is_state('input_select.house_mode', 'day') %} + {% if is_state('input_select.bedroom_mode', 'day') %} mdi:weather-sunny - {% elif is_state('input_select.house_mode', 'bed') %} + {% elif is_state('input_select.bedroom_mode', 'bed') %} mdi:bed-king-outline {% else %} mdi:weather-night @@ -26,31 +26,31 @@ binary_sensor: automation: - - alias: House mode · Set to day + - alias: Bedroom mode · Set to day trigger: platform: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode to: "day" action: - service: script.routine_waking_up - - alias: House mode · Set to bed + - alias: Bedroom mode · Set to bed trigger: platform: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode to: "bed" action: - service: script.routine_bedtime - - alias: House mode · Set to night + - alias: Bedroom mode · Set to night trigger: platform: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode to: "night" action: - service: script.routine_good_night - - alias: House mode · Set to day if bedroom door was opened + - alias: Bedroom mode · Set to day if bedroom door was opened trigger: - platform: state entity_id: binary_sensor.bedroom_door @@ -63,13 +63,13 @@ automation: - condition: not conditions: - condition: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode state: "day" - condition: state entity_id: input_boolean.georgi_home state: "on" action: - service: input_select.select_option - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode data: option: "day" diff --git a/config/packages/modes/domestina.yaml b/config/packages/modes/domestina.yaml index 523c65d..870ebeb 100644 --- a/config/packages/modes/domestina.yaml +++ b/config/packages/modes/domestina.yaml @@ -17,10 +17,10 @@ group: - automation.music_living_room_play_pause_on_desk_switch_hold - automation.music_master_bedroom_play_pause_on_switch_hold - automation.notification_door_opened - - automation.house_mode_set_to_night - - automation.house_mode_set_to_bed - - automation.house_mode_set_to_day - - automation.house_mode_toggle_on_bedside_switch_hold + - automation.bedroom_mode_set_to_night + - automation.bedroom_mode_set_to_bed + - automation.bedroom_mode_set_to_day + - automation.bedroom_mode_toggle_on_bedside_switch_hold - automation.security_door_opened_while_away - automation.purifier_turn_on_low_humidity - automation.purifier_turn_on_low_air_quality diff --git a/config/packages/modules/clock.yaml b/config/packages/modules/clock.yaml index ac9e840..f3f4633 100644 --- a/config/packages/modules/clock.yaml +++ b/config/packages/modules/clock.yaml @@ -22,7 +22,7 @@ automation: entity_id: input_boolean.alarm_enabled state: "on" - condition: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode state: "night" action: - service: script.music_play @@ -31,7 +31,7 @@ automation: - delay: 00:01:00 - condition: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode state: "night" - service: script.sonos_say data: @@ -45,7 +45,7 @@ automation: - delay: 00:02:00 - condition: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode state: "night" - service: script.sonos_say data: @@ -59,7 +59,7 @@ automation: - delay: 00:05:00 - condition: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode state: "night" - service: script.sonos_say data: @@ -74,7 +74,7 @@ automation: - alias: Alarm · Set time trigger: platform: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode to: "day" action: - service: input_datetime.set_datetime diff --git a/config/packages/modules/ios_events.yaml b/config/packages/modules/ios_events.yaml index 245306a..aaaad0a 100644 --- a/config/packages/modules/ios_events.yaml +++ b/config/packages/modules/ios_events.yaml @@ -14,7 +14,7 @@ automation: title: "📱 *iOS Module*" message: "iOS alarm is off. Switching to Day Mode!" - service: input_select.select_option - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode data: option: "day" @@ -27,7 +27,7 @@ automation: title: "📱 *iOS Module*" message: "iOS wind_down is on. Switching to Bed Mode!" - service: input_select.select_option - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode data: option: "bed" @@ -40,7 +40,6 @@ automation: title: "📱 *iOS Module*" message: "iOS bedtime is on. Switching to Night Mode!" - service: input_select.select_option - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode data: option: "night" - diff --git a/config/packages/modules/lighting/areas/bedroom.yaml b/config/packages/modules/lighting/areas/bedroom.yaml index e622677..136e544 100644 --- a/config/packages/modules/lighting/areas/bedroom.yaml +++ b/config/packages/modules/lighting/areas/bedroom.yaml @@ -135,7 +135,7 @@ automation: after: sunset after_offset: "-02:00:00" - condition: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode state: 'day' action: - service: light.turn_on diff --git a/config/packages/modules/lighting/areas/hallway.yaml b/config/packages/modules/lighting/areas/hallway.yaml index 9f54735..5910ba2 100644 --- a/config/packages/modules/lighting/areas/hallway.yaml +++ b/config/packages/modules/lighting/areas/hallway.yaml @@ -13,7 +13,7 @@ automation: # Turn on in Day Mode - conditions: - condition: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode state: 'day' sequence: - service: light.turn_on @@ -42,7 +42,7 @@ automation: # Turn off in Day Mode - conditions: condition: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode state: 'day' sequence: - service: light.turn_off diff --git a/config/packages/modules/lighting/areas/kitchen.yaml b/config/packages/modules/lighting/areas/kitchen.yaml index 981ce37..0e512c7 100644 --- a/config/packages/modules/lighting/areas/kitchen.yaml +++ b/config/packages/modules/lighting/areas/kitchen.yaml @@ -13,7 +13,7 @@ automation: # Turn on in Day Mode - conditions: - condition: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode state: 'day' sequence: - service: light.turn_on @@ -57,7 +57,7 @@ automation: condition: not conditions: - condition: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode state: 'day' action: # Turn off in Night Mode @@ -85,7 +85,7 @@ automation: minutes: 15 condition: condition: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode state: 'day' action: # Turn off in Day Mode diff --git a/config/packages/modules/speech.yaml b/config/packages/modules/speech.yaml index 3eaab12..0b5535c 100644 --- a/config/packages/modules/speech.yaml +++ b/config/packages/modules/speech.yaml @@ -33,7 +33,7 @@ script: - condition: not conditions: - condition: state - entity_id: input_select.house_mode + entity_id: input_select.bedroom_mode state: 'night' # Combine partials for speech message. - service: script.say_discretely