diff --git a/config/automation/Speech/home_stats.yaml b/config/automation/Speech/home_stats.yaml index d3f78f19..db507a25 100755 --- a/config/automation/Speech/home_stats.yaml +++ b/config/automation/Speech/home_stats.yaml @@ -1,5 +1,12 @@ ###################################################################### -## Some home facts when we get back home from being away. +# @CCOSTAN - Follow Me on X +# For more info visit https://www.vcloudinfo.com/click-here +# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig +# ------------------------------------------------------------------- +# Home Stats Automation - arrival briefing with weather and safety checks +# Announces key home status after family returns or on manual trigger. +# ------------------------------------------------------------------- +# Notes: Waits for garage doors to close before speaking. ###################################################################### - alias: 'Home Stats' id: f98e1ef4-051b-4214-908d-d8b35f076a3e @@ -30,4 +37,3 @@ call_outside_weather: 1 call_garage_check: 1 call_window_check: 1 - call_light_check: 1 diff --git a/config/logbook.yaml b/config/logbook.yaml index 04cf4014..d5896a56 100644 --- a/config/logbook.yaml +++ b/config/logbook.yaml @@ -10,12 +10,28 @@ ###################################################################### exclude: + domains: + - persistent_notification + - update entity_globs: - sensor.*_location - sensor.*_place - sensor.*_geocoded_location - sensor.pirateweather_* - weather.* + - input_text.l10s_vacuum_* + - input_datetime.l10s_vacuum_* + - input_boolean.l10s_vacuum_* + - sensor.*_battery + - sensor.*_battery_state + - sensor.*_uptime* + - sensor.*_last_update* + - sensor.*_since + - sensor.*_last_boot + - sensor.sun_next_* + - sensor.*_activity + - sensor.*_bssid + - sensor.*_wifi_signal_strength entities: - automation.cuckoo_clock - automation.detect_lights_and_adjust_the_brightness_when_turned_on_based_on_time diff --git a/config/logger.yaml b/config/logger.yaml index 845e34fa..96ea6ae8 100755 --- a/config/logger.yaml +++ b/config/logger.yaml @@ -36,6 +36,7 @@ logs: homeassistant.components.mqtt: error homeassistant.components.mqtt.discovery: critical homeassistant.components.persistent_notification: critical + homeassistant.components.template: warn homeassistant.components.rest.sensor: critical homeassistant.components.recorder: error homeassistant.components.sensor.pi_hole: critical @@ -47,7 +48,7 @@ logs: homeassistant.components.switch.unifi: error homeassistant.components.zwave: warn homeassistant.exceptions: info - homeassistant.helpers.script: info + homeassistant.helpers.script: warn homeassistant.helpers.entity: critical homeassistant.loader: warn homeassistant.components.websocket_api: error @@ -58,4 +59,4 @@ logs: urllib3.connectionpool: error requests.packages.urllib3.connectionpool: critical root: warn - \ No newline at end of file + diff --git a/config/packages/README.md b/config/packages/README.md index 52c5a70a..27715522 100755 --- a/config/packages/README.md +++ b/config/packages/README.md @@ -59,6 +59,11 @@ Live collection of plug-and-play Home Assistant packages. Each YAML file in this - Shared script keeps targets consistent: away → eco, home + >92°F → 78°F, home default → 80°F. Grid-down conditions pause non-essential cool-downs. ![Nest Climate Control](../www/custom_ui/floorplan/images/branding/Nest_Climate_Control.png) +### Dreame vacuum automations +- Logic lives in [vacuum.yaml](vacuum.yaml): weekday sweeping/weekend mopping, room-queue segment cleaning that pauses/docks on arrival, resumes after charging, and per-room notifications/briefing summaries. +- Uses the Dreame HACS integration with map-based segments and daily resets to cover the whole house without repeating rooms. +![Dreame Automations](../www/custom_ui/floorplan/images/branding/Dreame%20Automations.png) + ### Blog & video deep dives When a package has a dedicated blog post or video, I link it right inside the YAML comments. Here are the same references for quick browsing: diff --git a/config/packages/logger.yaml b/config/packages/logger.yaml deleted file mode 100755 index a30ef171..00000000 --- a/config/packages/logger.yaml +++ /dev/null @@ -1,38 +0,0 @@ -#------------------------------------------- -# @CCOSTAN -# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig -# Logger Controls - Realtime debugging helpers. -#------------------------------------------- -###################################################################### -## Adjust Home Assistant log level from the UI. -###################################################################### -input_select: - log_level: - name: Log Level - options: - - critical - - fatal - - error - - warning - - warn - - info - - debug - - notset - initial: warn - icon: mdi:bug -################################### -## Dynamically set the log levels without having to restart HASS or edit configuration.yaml -#- Thanks @VDRainer -################################### -automation: - - alias: Log Level - id: 8196e9d4-5174-492e-8523-6ef70ccbd8dd - trigger: - platform: state - entity_id: - - input_select.log_level -# - input_select.log_component - action: - - service: logger.set_level - data: - homeassistant.components: "{{ states.input_select.log_level.state }}" diff --git a/config/packages/vacuum.yaml b/config/packages/vacuum.yaml index e43bc6dd..474fdc57 100755 --- a/config/packages/vacuum.yaml +++ b/config/packages/vacuum.yaml @@ -1,23 +1,344 @@ -#------------------------------------------- -# @CCOSTAN +###################################################################### +# @CCOSTAN - Follow Me on X +# For more info visit https://www.vcloudinfo.com/click-here # Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig -# Vacuum - Dreame/Neato cleaning schedules and alerts. -#------------------------------------------- +# ------------------------------------------------------------------- +# Dreame Vacuum Orchestration - Room queue, away/on-demand runs +# Weekday sweep, weekend mop, bathrooms last, notifications +# ------------------------------------------------------------------- ###################################################################### -## Vacuum control and notifications (migrated from Neato to Dreame). + +## 1. Helpers +###################################################################### + +input_boolean: + l10s_vacuum_weekday_cycle_active: + name: L10s Weekday Cleaning Active + icon: mdi:robot-vacuum + l10s_vacuum_on_demand: + name: Dream Clean (On-Demand) + icon: mdi:rocket-launch + +input_datetime: + l10s_vacuum_last_weekday_cycle: + name: L10s Last Weekday Cleaning Cycle + has_date: true + has_time: true + +input_text: + l10s_vacuum_room_queue: + name: L10s Vacuum Room Queue + icon: mdi:format-list-bulleted + max: 255 + l10s_vacuum_room_catalog: + name: L10s Vacuum Room Catalog + # Room order (id:name): 14 Kitchen, 12 Dining, 10 Living, 7 Master Bedroom, 15 Foyer, 9 Stacey Office, + # 17 Formal Dining, 13 Hallway, 8 Justin Bedroom, 6 Paige Bedroom, 4 Master Bathroom, 2 Office, 1 Pool Bath, 3 Kids Bathroom. + initial: "14,12,10,7,15,9,17,13,8,6,4,2,1,3" + icon: mdi:map + max: 255 + l10s_vacuum_rooms_cleaned_today: + name: L10s Vacuum Rooms Cleaned Today + icon: mdi:clipboard-check-outline + max: 255 + +## 2. Script: Start Next Room +###################################################################### + +script: + + l10s_vacuum_start_next_room: + alias: 'Away Vacuum: Start Next Room' + mode: single + sequence: + - variables: + # Weekday runs are sweeping (vacuum only), weekend runs are mopping + cleaning_mode: "{{ 'mopping' if now().weekday() in [5, 6] else 'sweeping' }}" + catalog_raw: "{{ states('input_text.l10s_vacuum_room_catalog') | default('', true) | string | replace(' ', '') }}" + queue_raw: "{{ states('input_text.l10s_vacuum_room_queue') | default('', true) | string | replace(' ', '') }}" + last_reset_raw: "{{ states('input_datetime.l10s_vacuum_last_weekday_cycle') }}" + last_reset_date_str: > + {% set dt = as_datetime(last_reset_raw, default=None) %} + {{ dt.date().isoformat() if dt is not none else '' }} + catalog_ints: "{{ catalog_raw | regex_findall('[0-9]+') | map('int') | select('gt', 0) | list }}" + queue_ints: "{{ queue_raw | regex_findall('[0-9]+') | map('int') | select('gt', 0) | list }}" + # Seed if queue is empty AND last reset was not today + can_seed_today: "{{ last_reset_date_str == '' or last_reset_date_str != now().date().isoformat() }}" + will_seed: > + {% set empty_queue = queue_ints | length == 0 %} + {% set on_demand = is_state('input_boolean.l10s_vacuum_on_demand', 'on') %} + {{ (empty_queue or (on_demand and queue_ints | length <= 1)) and catalog_ints | length > 0 and (can_seed_today or on_demand) }} + seeded_queue_list: "{{ catalog_ints if will_seed else queue_ints }}" + valid_queue_list: "{{ seeded_queue_list }}" + # Define bathroom IDs for mopping separation + bath_ids: [1, 3, 4] + nonbath_list: "{{ valid_queue_list | reject('in', bath_ids) | list }}" + bath_list: "{{ valid_queue_list | select('in', bath_ids) | list }}" + # Prioritize non-bathrooms first, then bathrooms + segments_to_clean: > + {% if nonbath_list | length > 0 %} + {{ nonbath_list }} + {% elif bath_list | length > 0 %} + {{ bath_list }} + {% else %} + [] + {% endif %} + + # 1. Seed the queue if necessary + - choose: + - conditions: + - condition: template + value_template: "{{ will_seed }}" + sequence: + - service: input_text.set_value + target: + entity_id: input_text.l10s_vacuum_room_queue + data: + value: "{{ catalog_raw }}" + - service: input_datetime.set_datetime + target: + entity_id: input_datetime.l10s_vacuum_last_weekday_cycle + data: + datetime: "{{ now().strftime('%Y-%m-%d %H:%M:%S') }}" + default: [] + + # 2. Check if there is anything to clean and stop if not + - choose: + - conditions: + - condition: template + value_template: "{{ segments_to_clean | length == 0 }}" + sequence: + - stop: 'No rooms left to clean today.' + default: [] + + # 3. Start cleaning + - service: select.select_option + target: + entity_id: select.l10s_vacuum_cleaning_mode + data: + option: "{{ cleaning_mode }}" + - service: vacuum.set_fan_speed + target: + entity_id: vacuum.l10s_vacuum + data: + fan_speed: Standard + - service: input_boolean.turn_on + target: + entity_id: input_boolean.l10s_vacuum_weekday_cycle_active + - service: dreame_vacuum.vacuum_clean_segment + target: + entity_id: vacuum.l10s_vacuum + data: + # Clean the non-bathrooms if any, otherwise clean the bathrooms + segments: "{{ segments_to_clean }}" + + +## 3. Automations ###################################################################### -# Neato D7: https://amzn.to/2kqnnqu | Dreame: https://amzn.to/4f7NpFP -############################################################################## -### Configuration - Authentication via the DEVELOPER Portal -### HACS - https://github.com/Tasshack/dreame-vacuum -############################################################################## automation: -############################################################################## -### Automations - Help Vacuum! -### https://www.vcloudinfo.com/2020/05/home-assistant-neato-vacuum-automation.html -############################################################################## + - alias: 'Away Vacuum: Reset Queue (Mon/Sat)' + id: 93a6e7dc-9c32-4d53-9f7c-651cd60f4b84 + trigger: + - platform: time + at: '08:55:00' + condition: + - condition: time + weekday: + - mon + - sat + action: + - service: input_text.set_value + target: + entity_id: input_text.l10s_vacuum_room_queue + data: + value: "{{ states('input_text.l10s_vacuum_room_catalog') }}" + - service: input_text.set_value + target: + entity_id: input_text.l10s_vacuum_rooms_cleaned_today + data: + value: "" + - service: input_boolean.turn_off + target: + entity_id: input_boolean.l10s_vacuum_weekday_cycle_active + - service: input_datetime.set_datetime + target: + entity_id: input_datetime.l10s_vacuum_last_weekday_cycle + data: + datetime: "{{ now().strftime('%Y-%m-%d %H:%M:%S') }}" + - service: input_boolean.turn_off + target: + entity_id: input_boolean.l10s_vacuum_on_demand + + - alias: 'Away Vacuum: Start or Resume When we leave or On-Demand' + id: 7f7e0a3c-6452-4f6b-8464-c6c25770a148 + trigger: + - platform: state + entity_id: group.family + to: 'not_home' + - platform: state + entity_id: input_boolean.l10s_vacuum_on_demand + to: 'on' + condition: + - condition: state + entity_id: input_boolean.guest_mode + state: 'off' + - condition: template + value_template: > + {{ is_state('input_boolean.l10s_vacuum_on_demand', 'on') or is_state('group.family', 'not_home') }} + - condition: template + value_template: "{{ not is_state('vacuum.l10s_vacuum', 'cleaning') }}" + action: + - service: script.l10s_vacuum_start_next_room + + - alias: 'Away Vacuum: Dock When Family Returns' + id: 1ef172f2-4b30-4e5b-953d-d4d1ca8701ad + trigger: + - platform: state + entity_id: group.family + to: 'home' + - platform: state + entity_id: input_boolean.l10s_vacuum_on_demand + to: 'off' + condition: + - condition: state + entity_id: input_boolean.l10s_vacuum_weekday_cycle_active + state: 'on' + - condition: template + value_template: > + {{ is_state('vacuum.l10s_vacuum', 'cleaning') or is_state('vacuum.l10s_vacuum', 'returning') or is_state('vacuum.l10s_vacuum', 'paused') }} + action: + - service: vacuum.pause + target: + entity_id: vacuum.l10s_vacuum + - delay: 00:00:10 + - service: vacuum.return_to_base + target: + entity_id: vacuum.l10s_vacuum + + - alias: 'Away Vacuum: Confirm Room Cleaned' + id: c581c570-55b0-4acd-8b5d-53cfb486cc2a + trigger: + - platform: state + entity_id: sensor.l10s_vacuum_current_room + for: '00:03:00' + - platform: state + entity_id: vacuum.l10s_vacuum + to: 'cleaning' + for: '00:03:00' + variables: + room_map: {14:'kitchen',12:'dining-room',10:'living room',7:'master-bedroom',15:'foyer',9:'stacey-office',17:'formal-dining',13:'hallway',8:'justin-bedroom',6:'paige-bedroom',4:'master-bathroom',2:'office',1:'pool-bath',3:'kids-bathroom'} + catalog_raw: "{{ states('input_text.l10s_vacuum_room_catalog') | default('', true) | string | replace(' ', '') }}" + catalog_ints: "{{ catalog_raw | regex_findall('[0-9]+') | map('int') | select('gt', 0) | list }}" + queue_raw: "{{ states('input_text.l10s_vacuum_room_queue') | default('', true) | string | replace(' ', '') }}" + queue_ints: "{{ queue_raw | regex_findall('[0-9]+') | map('int') | select('gt', 0) | list | default([], true) }}" + working_queue: "{{ queue_ints if queue_ints | length > 0 else catalog_ints }}" + current_room_id: "{{ trigger.to_state.attributes.room_id | default(state_attr('sensor.l10s_vacuum_current_room', 'room_id'), true) | int(0) }}" + matched_room_id: "{{ current_room_id if current_room_id > 0 and current_room_id in (working_queue | default([], true)) else 0 }}" + remaining_rooms: "{{ working_queue | reject('equalto', matched_room_id) | list | join(',') }}" + remaining_value: > + {% set rem = remaining_rooms | string %} + {% if rem | length == 0 and working_queue | length > 1 %} + {{ working_queue | join(',') }} + {% else %} + {{ rem }} + {% endif %} + remaining_value_str: > + {% set rv = remaining_value %} + {% if rv is string %} + {{ rv }} + {% elif rv is iterable %} + {{ rv | map('string') | join(',') }} + {% else %} + {{ rv | string }} + {% endif %} + + condition: + # Only run if there's actually a queue and a room was successfully matched to the start of the queue + - condition: template + value_template: "{{ working_queue | length > 0 }}" + - condition: template + value_template: "{{ matched_room_id != 0 }}" + - condition: template + value_template: "{{ matched_room_id != 0 }}" + + action: + - service: input_text.set_value + target: + entity_id: input_text.l10s_vacuum_room_queue + data: + value: "{{ remaining_value_str }}" + - variables: + cleaned_raw: "{{ states('input_text.l10s_vacuum_rooms_cleaned_today') | default('', true) | string }}" + cleaned_parts: "{{ cleaned_raw | regex_findall('[^,]+') | map('trim') | reject('equalto','') | list }}" + room_name: "{{ room_map.get(matched_room_id, states('sensor.l10s_vacuum_current_room')) }}" + updated_cleaned: > + {% set parts = cleaned_parts %} + {% if room_name not in parts %} + {{ (parts + [room_name]) | join(', ') }} + {% else %} + {{ parts | join(', ') }} + {% endif %} + remaining_count: "{{ remaining_value_str | regex_findall('[^,]+') | length if remaining_value_str | length > 0 else 0 }}" + - service: input_text.set_value + target: + entity_id: input_text.l10s_vacuum_rooms_cleaned_today + data: + value: "{{ updated_cleaned }}" + - service: script.notify_engine + data: + title: 'Vacuum Room Cleaned' + value1: "{{ room_name }} is clean." + value2: "Remaining: {{ remaining_count }}." + ios_category: 'camera' + camera_entity: 'camera.l10s_vacuum_map' + content_type: 'jpeg' + who: 'carlo' + group: 'information' + - choose: + - conditions: + - condition: template + value_template: "{{ remaining_rooms | length > 0 }}" + sequence: + - service: script.l10s_vacuum_start_next_room + - conditions: + - condition: template + value_template: "{{ remaining_rooms | length == 0 }}" + sequence: + - service: input_boolean.turn_off + target: + entity_id: input_boolean.l10s_vacuum_weekday_cycle_active + - service: input_datetime.set_datetime + target: + entity_id: input_datetime.l10s_vacuum_last_weekday_cycle + data: + datetime: "{{ now().strftime('%Y-%m-%d %H:%M:%S') }}" + + - alias: 'Away Vacuum: Cycle Complete' + id: 8fa7779a-957b-49a3-84e7-36ca93c2e0d2 + trigger: + - platform: state + entity_id: sensor.l10s_vacuum_task_status + to: 'completed' + - platform: state + entity_id: vacuum.l10s_vacuum + to: 'docked' + for: 00:05:00 + condition: + - condition: template + value_template: "{{ is_state('sensor.l10s_vacuum_task_status', 'completed') }}" + - condition: template + value_template: "{{ (states('input_text.l10s_vacuum_room_queue') | replace(' ', '')) | length == 0 }}" + action: + - service: input_boolean.turn_off + target: + entity_id: input_boolean.l10s_vacuum_weekday_cycle_active + - service: input_datetime.set_datetime + target: + entity_id: input_datetime.l10s_vacuum_last_weekday_cycle + data: + datetime: "{{ now().strftime('%Y-%m-%d %H:%M:%S') }}" - alias: 'Vacuum Sensor Cleaning Silencer' id: 6548de52-a4a4-4df2-9d66-9c2c15577a7f @@ -25,17 +346,14 @@ automation: - platform: numeric_state entity_id: sensor.l10s_vacuum_sensor_dirty_left below: 10 - condition: - condition: state entity_id: sensor.l10s_vacuum_task_status state: 'completed' - action: - service: button.press target: entity_id: button.l10s_vacuum_reset_sensor - - alias: 'Help Vacuum' id: 6548de52-a4a4-4df2-9d66-9c2c15577a7e @@ -44,13 +362,10 @@ automation: entity_id: sensor.l10s_vacuum_error - platform: event event_type: event_did_someone_help_vacuum_loop - condition: - condition: template value_template: "{{ states('sensor.l10s_vacuum_error') not in ['no_error', 'unavailable'] }}" - action: - - service: script.notify_engine data: title: 'Help vacuum' @@ -60,60 +375,18 @@ automation: camera_entity: 'camera.l10s_vacuum_map' content_type: 'jpeg' group: 'information' - - wait_template: "{{ is_state('group.bed', 'off') }}" - wait_template: "{{ is_state('group.family', 'home') }}" - delay: 00:03:00 - - service: vacuum.locate entity_id: vacuum.l10s_vacuum - - service: script.speech_engine data: value1: > - {{ "Vacuum error: " ~ states('sensor.l10s_vacuum_error') ~ " [ask Residents to help]" }} - Currently in {{states('sensor.l10s_vacuum_current_room')}}" - - - delay: 00:01:00 + {{ "Vacuum error: " ~ states('sensor.l10s_vacuum_error') ~ " [ask Residents to help]" }} + Currently in {{states('sensor.l10s_vacuum_current_room')}} + - delay: 00:01:00 - service: vacuum.locate entity_id: vacuum.l10s_vacuum - - delay: 00:20:00 - event: event_did_someone_help_vacuum_loop - - # https://www.vcloudinfo.com/click-here - For more info or contact. - - - alias: 'Set Vacuum Mode: Weekdays Sweeping, Weekends Sweeping and Mopping' - id: l10s_vacuum_mode_schedule - trigger: - - platform: time - at: '08:00:00' - condition: [] - action: - - choose: - - conditions: - - condition: time - weekday: - - mon - - tue - - wed - - thu - - fri - sequence: - - service: select.select_option - target: - entity_id: select.l10s_vacuum_cleaning_mode - data: - option: sweeping - - conditions: - - condition: time - weekday: - - sat - - sun - sequence: - - service: select.select_option - target: - entity_id: select.l10s_vacuum_cleaning_mode - data: - option: sweeping_and_mopping - default: [] diff --git a/config/recorder.yaml b/config/recorder.yaml index fe36e91c..21e9739f 100755 --- a/config/recorder.yaml +++ b/config/recorder.yaml @@ -10,6 +10,8 @@ ###################################################################### #db_url: sqlite:///data/home-assistant_v2.db purge_keep_days: 30 +auto_purge: true +commit_interval: 30 exclude: domains: - camera @@ -45,8 +47,12 @@ exclude: - sensor.*uptime* - sensor.sun_next_* - sensor.vpn_client_* + - sensor.*_wifi_signal_strength - switch.*_do_not_disturb_* - switch.*_repeat_switch + - input_text.l10s_vacuum_* + - input_datetime.l10s_vacuum_* + - input_boolean.l10s_vacuum_* entities: - automation.update_garage_get_status @@ -57,6 +63,8 @@ exclude: - number.alarm_panel_1_screen_brightness - script.amp_settings - script.speech_processing + - button.l10s_vacuum_backup_map_1 + - binary_sensor.vcloudinfo_com - sensor.bear_stone - sensor.carlo_ap - sensor.carlo_fast diff --git a/config/script/speech_engine.yaml b/config/script/speech_engine.yaml index 7617e668..a3b2f917 100755 --- a/config/script/speech_engine.yaml +++ b/config/script/speech_engine.yaml @@ -1,20 +1,23 @@ -###################################################################################################### -###Script to send notifications to the ChromeCast Audios during normal hours and only when we are home! (Current target: living room Chromecasts only; use Alexa notify/announce services for other rooms.) Call like this: - # action: - # service: script.speech_engine - # data: - # value1: - # call_no_announcement: - # call_dark_outside: - # call_window_check: - # call_garage_check: - # call_garbage_day - # call_light_check - # call_inside_weather - # call_outside_weather -# Follow me on https://www.vcloudinfo.com/click-here +###################################################################### +# @CCOSTAN - Follow Me on X +# For more info visit https://www.vcloudinfo.com/click-here # Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig -###################################################################################################### +# ------------------------------------------------------------------- +# Speech Engine Script - queued announcements to Chromecast targets +# Sends templated speech briefings to media players when family/guests are home. +# ------------------------------------------------------------------- +# Notes: Optional call_* flags control sections (dark_outside, window/garage checks, garbage day, inside/outside weather). Defaults to living room Chromecast if no media_player is provided. +###################################################################### +# Usage example: +# service: script.speech_engine +# data: +# call_no_announcement: 1 +# call_dark_outside: 1 +# call_window_check: 1 +# call_garage_check: 1 +# call_garbage_day: 1 +# call_inside_weather: 1 +# call_outside_weather: 1 # Define the "speech_engine" script speech_engine: diff --git a/config/templates/speech/briefing.yaml b/config/templates/speech/briefing.yaml index d0405071..ce3b3110 100755 --- a/config/templates/speech/briefing.yaml +++ b/config/templates/speech/briefing.yaml @@ -88,31 +88,6 @@ The internal temperature of the refrigerator is currently {{ states('sensor.blink_blink1_temperature') }} degrees. The freezer temperature is {{ states('sensor.refrigerator_freezer_temp') }} degrees and the fridge temperature is {{ states('sensor.refrigerator_fridge_temp') }} degrees. {% if is_state('binary_sensor.refrigerator_door_open', 'on') %}The fridge door is currently open.{% endif %} {%- endmacro -%} - {%- macro light_check() -%} - {% if states.group.all_lights.state != 'off' -%} - There are - {% for state in states.light if state.state == 'on' -%} - {%- if loop.last -%} - {{ loop.index }} - {%- endif -%} - {%- endfor %} - lights on right now. - {% set comma = joiner(', ') %} - The - {% for group in states.group|groupby('state') -%} - {%- for entity in group.list if entity.state == 'on' - and entity.name.split(' ')[1]|lower == 'lights' - and entity.name.split(' ')[0]|lower != 'all' - and entity.name.split(' ')[0]|lower != 'interior' - -%} - {{ 'and' if loop.last and not loop.first else comma() }} - {{ entity.name|replace('Lights','')}} - {%- endfor -%} - {%- endfor -%} - lights are on. - {%- endif -%} - {%- endmacro -%} - {%- macro window_check() -%} {% if states.group.entry_points.state != 'off' -%} {% set comma = joiner(', ') %} @@ -165,6 +140,13 @@ {% endif -%} {%- endmacro -%} + {%- macro vacuum_rooms_cleaned() -%} + {% set cleaned = states('input_text.l10s_vacuum_rooms_cleaned_today') %} + {% if cleaned | length > 0 %} + Vacuum cleaned: {{ cleaned }}. + {% endif %} + {%- endmacro -%} + {%- macro moon() -%} {% if (now().hour == 17) %} Current Moon phase: {{ states('sensor.moon') }} [Give a fact and mention today's phase] @@ -320,10 +302,6 @@ {{ NewDevice | default }} - {% if call_light_check == 1 %} - {{ light_check() }} - {% endif %} - {% if call_garbage_day == 1 %} {{ garbage_day() }} {% endif %} @@ -331,6 +309,12 @@ {% if now().strftime('%H')|int(0) > 21 %} {{ medicine() }} {% endif %} + + {{ vacuum_rooms_cleaned() }} + + {{ holiday() }} + + {{ outside_weather }} {% if value1 is not none %} {{ value1 | default }} diff --git a/config/www/custom_ui/floorplan/images/branding/Dreame Automations.png b/config/www/custom_ui/floorplan/images/branding/Dreame Automations.png new file mode 100644 index 00000000..78387a20 Binary files /dev/null and b/config/www/custom_ui/floorplan/images/branding/Dreame Automations.png differ