diff --git a/config/README.md b/config/README.md index fc8453cd..713db5a6 100644 --- a/config/README.md +++ b/config/README.md @@ -45,13 +45,13 @@ https://github.com/ngocjohn/hass-config/assets/96962827/acc1a4db-b92e-4ab1-ac9d- - 35,894 + 35,928 34 - 154 + 156 63 54 32 - 1065 + 1071 201 38 @@ -103,6 +103,7 @@ https://github.com/ngocjohn/hass-config/assets/96962827/acc1a4db-b92e-4ab1-ac9d- - [Govee](https://github.com/LaggAt/hacs-govee) - [HACS](https://github.com/hacs/integration) - [Hass Favicon](https://github.com/thomasloven/hass-favicon) +- [Ingress](https://github.com/lovelylain/hass_ingress) - [Lunar Phase](https://github.com/ngocjohn/lunar-phase) - [Mercedesme 2020](https://github.com/ReneNulschDE/mbapi2020) - [Node Red Companion](https://github.com/zachowj/hass-node-red) diff --git a/config/automations.yaml b/config/automations.yaml new file mode 100644 index 00000000..8e17c7f6 --- /dev/null +++ b/config/automations.yaml @@ -0,0 +1,1292 @@ +- id: '1668864895588' + alias: Main Door Open + description: '' + trigger: + - platform: event + event_type: ios.action_fired + event_data: + actionName: Main Door Open + condition: [] + action: + - service: lock.open + data: {} + target: + entity_id: lock.nuki_vchod_lock + mode: single +- id: '1677334681247' + alias: Dock lock state + description: '' + trigger: + - platform: state + entity_id: + - binary_sensor.nuki_neklanka_byt_locked + from: + - 'on' + - 'off' + to: + - 'on' + - 'off' + action: + - service: input_boolean.toggle + data: {} + target: + entity_id: input_boolean.door_lock + mode: parallel +- id: '1681806258876' + alias: z left + description: '' + trigger: + - platform: state + entity_id: + - sensor.gle + attribute: Street + - platform: state + entity_id: + - input_boolean.z_occupacy + to: 'on' + id: home + - platform: geo_location + source: person.huong_giang + zone: zone.smichov + event: enter + id: smichov + - platform: state + entity_id: + - sensor.ngoc_keys_airtag + attribute: Street + id: ngockey + enabled: false + condition: [] + action: + - if: + - condition: trigger + id: + - home + - smichov + then: + - service: notify.mobile_app_viet_ngoc + data: + title: Location + message: '{{ state_attr(''sensor.gle'', ''Formatted Address'') }}' + data: + push: + sound: + name: findmy.wav + critical: 1 + volume: 1 + action_data: + latitude: '{{ state_attr(''device_tracker.findmy_d098350b38e241d3972ad394a27f38b6'', + ''latitude'') }}' + longitude: '{{ state_attr(''device_tracker.findmy_d098350b38e241d3972ad394a27f38b6'', + ''longitude'') }}' + latitude_delta: '0' + longitude_delta: '0.01' + else: + - service: notify.ngoc_devices + data: + title: Location + message: '{{ state_attr(''sensor.gle'', ''Formatted Address'') }}' + data: + action_data: + latitude: '{{ state_attr(''device_tracker.findmy_d098350b38e241d3972ad394a27f38b6'', + ''latitude'') }}' + longitude: '{{ state_attr(''device_tracker.findmy_d098350b38e241d3972ad394a27f38b6'', + ''longitude'') }}' + latitude_delta: '0' + longitude_delta: '0.01' + enabled: true + - choose: + - conditions: + - condition: trigger + id: + - ngockey + sequence: + - service: notify.ngoc_devices + data: + title: Ngoc Key + message: '{{ state_attr(''sensor.ngoc_keys_airtag'', ''Formatted Address'') + }}' + data: + action_data: + latitude: '{{ state_attr(''device_tracker.findmy_f28d260523a64f37b0595dfcd64d3b73'', + ''latitude'') }}' + longitude: '{{ state_attr(''device_tracker.findmy_f28d260523a64f37b0595dfcd64d3b73'', + ''longitude'') }}' + latitude_delta: '0' + longitude_delta: '0.01' + mode: single +- id: '1681905795903' + alias: camera snapshot + description: '' + triggers: + - at: 05:00:00 + id: delete + trigger: time + - hours: /1 + trigger: time_pattern + conditions: + - condition: time + after: 05:00:00 + before: 00:00:00 + actions: + - if: + - condition: trigger + id: delete + then: + - data: + folder: /config/www/tmp/snapshots/ + time: 0 + only_extensions: + - .png + - .jpg + action: delete.files_in_folder + - data: + folder: /config/www/tmp/kids/ + time: 0 + only_extensions: + - .png + - .jpg + action: delete.files_in_folder + - parallel: + - action: button.press + metadata: {} + data: {} + target: + entity_id: button.kids_room_start_rtsp_stream + - data: {} + target: + entity_id: + - camera.doorway + - camera.terasa + - camera.zahrada + action: camera.turn_on + - condition: state + entity_id: camera.doorway + state: streaming + for: + hours: 0 + minutes: 0 + seconds: 3 + - condition: state + entity_id: camera.terasa + state: streaming + for: + hours: 0 + minutes: 0 + seconds: 3 + - condition: state + entity_id: camera.kids_room + state: streaming + for: + hours: 0 + minutes: 0 + seconds: 3 + - condition: state + entity_id: camera.zahrada + state: streaming + for: + hours: 0 + minutes: 0 + seconds: 3 + - delay: + hours: 0 + minutes: 0 + seconds: 2 + milliseconds: 0 + - parallel: + - data: + filename: /config/www/tmp/snapshots/camera.doorway{{ now().strftime("%Y%m%d-%H%M%S") + }}.jpg + target: + entity_id: camera.doorway + action: camera.snapshot + - data: + filename: /config/www/tmp/snapshots/camera.kids_room{{ now().strftime("%Y%m%d-%H%M%S") + }}.jpg + target: + entity_id: camera.kids_room + action: camera.snapshot + - data: + filename: /config/www/tmp/snapshots/camera.terasa{{ now().strftime("%Y%m%d-%H%M%S") + }}.jpg + target: + entity_id: camera.terasa + action: camera.snapshot + - data: + filename: /config/www/tmp/snapshots/camera.zahrada{{ now().strftime("%Y%m%d-%H%M%S") + }}.jpg + target: + entity_id: camera.zahrada + action: camera.snapshot + - delay: + hours: 0 + minutes: 0 + seconds: 2 + milliseconds: 0 + - parallel: + - data: + filename: /config/www/tmp/camera.doorway-latest.jpg + target: + entity_id: camera.doorway + action: camera.snapshot + - data: + filename: /config/www/tmp/kids/camera.kids_room-latest{{now().strftime("%Y%m%d%H%M%S")}}.jpg + target: + entity_id: camera.kids_room + action: camera.snapshot + - action: input_text.set_value + metadata: {} + data: + value: kids_room-latest{{now().strftime("%Y%m%d%H%M%S")}}.jpg + target: + entity_id: input_text.kids_camera_snapshot + - data: + filename: /config/www/tmp/camera.terasa-latest.jpg + target: + entity_id: camera.terasa + action: camera.snapshot + - data: + filename: /config/www/tmp/camera.zahrada-latest.jpg + target: + entity_id: camera.zahrada + action: camera.snapshot + - delay: + hours: 0 + minutes: 0 + seconds: 5 + milliseconds: 0 + - data: {} + target: + entity_id: + - camera.doorway + - camera.terasa + - camera.zahrada + action: camera.turn_off + - action: button.press + metadata: {} + data: {} + target: + entity_id: button.kids_room_stop_rtsp_stream + mode: single +- id: '1683903230879' + alias: Bedroom Cover Night + description: '' + trigger: + - platform: sun + event: sunset + offset: 00:30:00 + condition: [] + action: + - service: cover.close_cover + data: {} + target: + area_id: bedroom + mode: single +- id: '1684613417245' + alias: Cover Night Mode + description: '' + trigger: [] + condition: [] + action: + - service: cover.close_cover + data: {} + target: + entity_id: + - cover.bedroom_shutters + - cover.living_room_cover + mode: single +- id: '1688809817206' + alias: Guest Mode notify + description: '' + trigger: + - platform: zone + entity_id: person.viet_ngoc + zone: zone.home + event: leave + condition: + - condition: state + entity_id: input_boolean.guest_mode + state: 'on' + action: + - alias: Set up variables for the actions + variables: + action_yes: '{{ ''YES_'' ~ context.id }}' + action_no: '{{ ''NO_'' ~ context.id }}' + - delay: + hours: 0 + minutes: 0 + seconds: 5 + milliseconds: 0 + - alias: Ask to stop or no guest mode + service: notify.mobile_app_viet_ngoc + data: + message: Do you want to stop this? + data: + actions: + - action: '{{ action_yes }}' + title: 'YES' + - action: '{{ action_no }}' + title: 'NO' + title: Guest mode + - alias: Wait for a response + wait_for_trigger: + - platform: event + event_type: mobile_app_notification_action + event_data: + action: '{{ action_yes }}' + - platform: event + event_type: mobile_app_notification_action + event_data: + action: '{{ action_no }}' + - alias: Perform the action + choose: + - conditions: '{{ wait.trigger.event.data.action == action_yes }}' + sequence: + - service: input_boolean.turn_off + data: {} + target: + entity_id: input_boolean.guest_mode + - condition: state + entity_id: input_boolean.guest_mode + state: 'off' + for: + hours: 0 + minutes: 0 + seconds: 2 + - service: input_boolean.turn_on + data: {} + target: + entity_id: input_boolean.leaving_home + - conditions: '{{ wait.trigger.event.data.action == action_no }}' + sequence: + - service: input_boolean.turn_on + data: {} + target: + entity_id: input_boolean.guest_mode + enabled: false + - stop: '' + mode: single +- id: '1688940697804' + alias: Alarm + description: '' + triggers: + - entity_id: + - script.homepod_alarm + for: + hours: 0 + minutes: 0 + seconds: 5 + enabled: true + to: 'on' + trigger: state + conditions: [] + actions: + - alias: Set up variables for the actions + variables: + action_stop: '{{ ''STOP_'' ~ context.id }}' + - delay: + hours: 0 + minutes: 0 + seconds: 3 + milliseconds: 0 + - alias: Ask to close or open the blinds + data: + message: Do you want to stop this? + data: + push: + sound: + name: findmy.wav + critical: 1 + volume: 1 + actions: + - action: '{{ action_stop }}' + title: Stop alarm + title: Alarm Clock + action: notify.mobile_app_viet_ngoc + - alias: Wait for a response + wait_for_trigger: + - event_type: mobile_app_notification_action + event_data: + action: '{{ action_stop }}' + trigger: event + - alias: Perform the action + choose: + - conditions: + - condition: template + value_template: '{{ wait.trigger.event.data.action == action_stop }}' + sequence: + - data: {} + action: media_player.media_pause + target: + entity_id: media_player.bedroom + - action: media_player.turn_off + metadata: {} + data: {} + target: + entity_id: media_player.bedroom + mode: single +- id: '1693488019712' + alias: Nuki Vchod Open + description: '' + trigger: + - platform: state + entity_id: + - input_button.nuki_vchod + condition: [] + action: + - service: lock.open + data: {} + target: + entity_id: lock.nuki_vchod_lock + mode: single +- id: '1694516012171' + alias: Only update vaze information every 20 minutes when I'm home + description: '' + trigger: + - platform: time_pattern + minutes: /20 + id: 20min + condition: + - condition: state + entity_id: device_tracker.viet_ngoc + state: not_home + action: + - service: homeassistant.update_entity + data: {} + target: + entity_id: sensor.waze_ngoc_home +- id: '1694721012171' + alias: Spotify Vibrant Color + description: '' + trigger: + - platform: state + entity_id: + - sensor.vibrant_color + condition: + - condition: and + conditions: + - condition: state + entity_id: light.office_led_light_strip + state: 'on' + - condition: or + conditions: + - condition: device + device_id: d8496daf7e926630a7431da013a83590 + domain: media_player + entity_id: 952057f8ccc2766d1d825168186a225a + type: is_playing + - condition: state + entity_id: media_player.mass_universal_airplay + state: playing + action: + - service: light.turn_on + data: + transition: 5 + rgb_color: '{{states(''sensor.vibrant_color'')}}' + target: + entity_id: light.office_led_light_strip + mode: single +- id: '1695149693530' + alias: Notify HA started + description: '' + trigger: + - platform: homeassistant + event: start + condition: [] + action: + - data: + message: Home assistant started + data: + tag: hastarted + action: notify.mobile_app_viet_ngoc + - delay: + hours: 0 + minutes: 0 + seconds: 10 + milliseconds: 0 + - data: + message: clear_notification + data: + tag: hastarted + action: notify.mobile_app_viet_ngoc + - action: readme.generate + data: {} + mode: single +- id: '1695935011647' + alias: dismiss_lovelace_updated + description: '' + trigger: + - platform: event + event_type: lovelace_updated + condition: [] + action: + - service: homeassistant.update_entity + target: + entity_id: sensor.code_line_count + data: {} + - repeat: + count: 5 + sequence: + - delay: 0.5 + - service: browser_mod.notification + data: + duration: 1 + message: ' ' + target: + device_id: + - 4f43e0dc2e03b71c2e137f9696a04a2c + - service: browser_mod.notification + data: + duration: 1 + message: ' ' + target: + device_id: 0604abf0d6d8e6f72903f0cc77d83b3d + mode: restart +- id: '1696553366478' + alias: 'Dishwasher Set Timer ' + description: '' + trigger: + - platform: state + entity_id: + - sensor.mycka_nadobi_operation_state + to: Run + condition: + - condition: or + conditions: + - condition: not + conditions: + - condition: state + entity_id: sensor.mycka_nadobi_remaining_program_time + state: unknown + - condition: not + conditions: + - condition: state + entity_id: sensor.mycka_nadobi_remaining_program_time + state: unavailable + action: + - service: timer.start + data: + duration: '{{ (as_timestamp(states.sensor.mycka_nadobi_remaining_program_time.state)) + - (as_timestamp(now())) | round(0)}}' + target: + entity_id: timer.dishwasher_remaining + initial_state: true + mode: restart +- id: 34ba1897-ec7a-4cb3-a12b-fb0a1e9e495e + alias: vacuum_start_cleaning + mode: queued + trigger: + - platform: state + entity_id: sensor.vacuum_status + from: '9' + to: '4' + - platform: state + entity_id: sensor.vacuum_status + from: '6' + to: '4' + action: + service: script.vacuum_notify + data: + title: Little messy there + message: The vacuum cleaner started cleaning! +- id: 2dedd749-b65a-49e0-8747-2dce6dd995a4 + alias: vacuum_show_error + trigger: + - platform: state + entity_id: + - sensor.vacuum_fault + from: No Faults + condition: + - condition: template + value_template: '{% if is_state_attr(''vacuum.roidmi_eve'',''vacuum.fault'',0) + or is_state_attr(''vacuum.roidmi_eve'',''vacuum.fault'',None) %}False{% else + %}True{% endif %}' + enabled: true + action: + - service: script.vacuum_notify + data: + title: Something is wrong with robot + message: '{{states(''sensor.vacuum_fault'')}}.' + mode: queued +- id: '1700514428812' + alias: Notify HA System usage + description: Memory or CPU leak + triggers: + - entity_id: + - sensor.ha_system_memory_usage + - sensor.ha_system_cpu_usage + for: + hours: 0 + minutes: 7 + seconds: 0 + above: 70 + trigger: numeric_state + conditions: [] + actions: + - parallel: + - data: + message: Memory {{ states.sensor.ha_system_memory_usage.state }}% - CPU {{ + states.sensor.ha_system_cpu_usage.state }}% + title: System + action: notify.notify + mode: single +- id: '1701118898607' + alias: Notify_Github + description: '' + trigger: + - platform: state + entity_id: + - update.home_assistant_core_update + from: 'on' + to: 'off' + id: ha_version + condition: [] + action: + - choose: + - conditions: + - condition: trigger + id: + - ha_version + enabled: true + sequence: + - service: readme.generate + data: {} + initial_state: true + mode: single +- id: '1701556784590' + alias: Update YouTube Sensor + description: '' + triggers: + - entity_id: + - media_player.living_room_tv + - media_player.bedroom_tv + attribute: media_title + trigger: state + id: title_change + for: + hours: 0 + minutes: 0 + seconds: 2 + - entity_id: + - media_player.living_room_tv + - media_player.bedroom_tv + trigger: state + id: reset_title + attribute: app_id + from: com.google.ios.youtube + conditions: [] + actions: + - choose: + - conditions: + - condition: and + conditions: + - condition: trigger + id: + - title_change + - condition: or + conditions: + - condition: template + value_template: "{% if state_attr('media_player.living_room_tv', 'media_title') + != None %} \n{{ is_state_attr('media_player.living_room_tv', 'app_id', + 'com.google.ios.youtube') and state_attr('media_player.living_room_tv', + 'media_title') != state_attr('sensor.youtube_thumbnail', 'title') }}\n{% + endif%}" + - condition: template + value_template: '{{ is_state_attr(''media_player.bedroom_tv'', ''source'', + ''YouTube'') and state_attr(''media_player.bedroom_tv'', ''media_title'') + != state_attr(''sensor.youtube_thumbnail'', ''title'') }}' + sequence: + - event: youtube_update + event_data: {} + - conditions: + - condition: trigger + id: + - reset_title + sequence: + - event: youtube_reset + event_data: {} + max_exceeded: silent + mode: single +- id: '1702444277863' + alias: 'Event_Unifi Archive Alert ' + description: '' + trigger: + - platform: state + entity_id: + - input_button.unifi_archive_alerts + condition: [] + action: + - event: archive_alerts + event_data: {} + mode: single +- id: '1706827614119' + alias: kodi_lib_scan + description: '' + trigger: + - platform: state + entity_id: + - input_button.kodi_lib_scan + to: + condition: [] + action: + - event: kodi_library_scan + event_data: {} + - event: fetch_upcoming_movies + event_data: {} + - event: kodi_video_scan + event_data: {} + mode: single +- id: '1706968812356' + alias: Roidmi Camera Update + description: '' + trigger: + - platform: state + entity_id: + - vacuum.roidmi_eve + condition: [] + action: + - if: + - condition: template + value_template: '{{ states.vacuum.roidmi_eve.state in ["unavailable", "unknown", + "docked"] }} ' + then: + - service: camera.turn_off + target: + entity_id: + - camera.roidmi_eve + data: {} + else: + - service: camera.turn_on + target: + entity_id: + - camera.roidmi_eve + data: {} + mode: single +- id: '1715819993809' + alias: Kodi Update Picture Sensor + description: '' + trigger: + - platform: state + entity_id: + - media_player.kodi_atv + attribute: media_title + condition: [] + action: + - service: kodi.call_method + target: + entity_id: media_player.kodi_atv + data: + method: Player.GetItem + playerid: 0 + properties: + - title + - art + mode: single +- id: '1716484682108' + alias: Vacum Set Property + description: Set Roidmi Vacuum sensors value + trigger: + - platform: state + entity_id: vacuum.roidmi_eve + - platform: state + entity_id: input_boolean.vacuum_led_switch + id: led_switch + - platform: state + entity_id: input_boolean.vacuum_lidar_collision + id: lidar_collision + - platform: state + entity_id: input_boolean.vacuum_auto_boost + id: auto_boost + - platform: state + entity_id: input_number.vacuum_volume + id: volume + - platform: state + entity_id: input_boolean.vacuum_double_clean + id: double_clean + - platform: state + entity_id: input_boolean.vacuum_edge_sweep + id: edge_sweep + - platform: state + entity_id: input_select.vacuum_water_level + id: water_level + - platform: state + entity_id: input_boolean.vacuum_station_key + id: station_key + - platform: state + entity_id: input_boolean.vacuum_station_led + id: station_led + - platform: state + entity_id: input_boolean.vacuum_mute + id: mute + - platform: state + entity_id: input_select.vacuum_work_station_freq + id: work_station_freq + - platform: state + entity_id: input_select.vacuum_mode + id: vacuum_mode + - platform: state + entity_id: input_select.vacuum_sweep_type + id: vacuum_sweep_type + condition: [] + action: + - choose: + - conditions: + - condition: trigger + id: led_switch + sequence: + - service: xiaomi_miot.set_miot_property + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 8 + piid: 22 + value: '{{ 0 if is_state(''input_boolean.vacuum_led_switch'', ''off'') else + 1 }}' + - conditions: + - condition: trigger + id: lidar_collision + sequence: + - service: xiaomi_miot.set_miot_property + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 8 + piid: 23 + value: '{{ 0 if is_state(''input_boolean.vacuum_lidar_collision'', ''off'') + else 1 }}' + - conditions: + - condition: trigger + id: auto_boost + sequence: + - service: xiaomi_miot.set_miot_property + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 8 + piid: 9 + value: '{{ 0 if is_state(''input_boolean.vacuum_auto_boost'', ''off'') else + 1 }}' + - conditions: + - condition: trigger + id: volume + sequence: + - service: xiaomi_miot.set_miot_property + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 9 + piid: 1 + value: '{{states(''input_number.vacuum_volume'')|round(0)}}' + - conditions: + - condition: trigger + id: double_clean + sequence: + - service: xiaomi_miot.set_miot_property + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 8 + piid: 20 + value: '{{ 0 if is_state(''input_boolean.vacuum_double_clean'', ''off'') + else 1 }}' + - conditions: + - condition: trigger + id: edge_sweep + sequence: + - service: xiaomi_miot.set_miot_property + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 13 + piid: 8 + value: '{{ 0 if is_state(''input_boolean.vacuum_edge_sweep'', ''off'') else + 1 }}' + - conditions: + - condition: trigger + id: water_level + sequence: + - service: xiaomi_miot.set_miot_property + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 8 + piid: 11 + value: "{%- if is_state(\"input_select.vacuum_water_level\", \"No water\") + -%}\n 0\n{%- elif is_state(\"input_select.vacuum_water_level\", \"Small\") + -%}\n 1\n{%- elif is_state(\"input_select.vacuum_water_level\", \"Middle\") + -%}\n 2\n{%- elif is_state(\"input_select.vacuum_water_level\", \"MAX\") + -%}\n 3\n{% else %} {% endif %}\n" + - conditions: + - condition: trigger + id: station_key + sequence: + - service: xiaomi_miot.set_miot_property + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 8 + piid: 24 + value: '{{ 0 if is_state(''input_boolean.vacuum_station_key'', ''off'') + else 1 }}' + - conditions: + - condition: trigger + id: station_led + sequence: + - service: xiaomi_miot.set_miot_property + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 8 + piid: 25 + value: '{{ 0 if is_state(''input_boolean.vacuum_station_led'', ''off'') + else 1 }}' + - conditions: + - condition: trigger + id: mute + sequence: + - service: xiaomi_miot.set_miot_property + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 9 + piid: 2 + value: '{{ 0 if is_state(''input_boolean.vacuum_mute'', ''off'') else 1 + }}' + - conditions: + - condition: trigger + id: work_station_freq + sequence: + - service: xiaomi_miot.set_miot_property + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 8 + piid: 2 + value: "{%- if is_state(\"input_select.vacuum_work_station_freq\", \"Not + to throw away\") -%}\n 0\n{%- elif is_state(\"input_select.vacuum_work_station_freq\", + \"Every time\") -%}\n 1\n{%- elif is_state(\"input_select.vacuum_work_station_freq\", + \"Every second\") -%}\n 2\n{%- elif is_state(\"input_select.vacuum_work_station_freq\", + \"Every third\") -%}\n 3\n{% else %} {% endif %}\n" + - conditions: + - condition: trigger + id: vacuum_mode + sequence: + - service: xiaomi_miot.set_miot_property + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 2 + piid: 4 + value: "{%- if is_state(\"input_select.vacuum_mode\", \"Sweep\") -%}\n 0\n{%- + elif is_state(\"input_select.vacuum_mode\", \"Silent\") -%}\n 1\n{%- + elif is_state(\"input_select.vacuum_mode\", \"Basic\") -%}\n 2\n{%- elif + is_state(\"input_select.vacuum_mode\", \"Strong\") -%}\n 3\n{%- elif + is_state(\"input_select.vacuum_mode\", \"Full Speed\") -%}\n 4\n{% else + %} {% endif %}\n" + - conditions: + - condition: trigger + id: vacuum_sweep_type + sequence: + - service: xiaomi_miot.set_miot_property + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 2 + piid: 8 + value: "{%- if is_state(\"input_select.vacuum_sweep_type\", \"Sweep\") -%}\n + \ 0\n{%- elif is_state(\"input_select.vacuum_sweep_type\", \"Mop\") -%}\n + \ 1\n{%- elif is_state(\"input_select.vacuum_sweep_type\", \"Mop And Sweep\") + -%}\n 2\n{% else %} {% endif %}\n" + mode: single +- id: '1716484803294' + alias: Vacuum Get Property + description: '' + trigger: + - platform: state + entity_id: vacuum.roidmi_eve + condition: [] + action: + - service: "{% if is_state_attr('vacuum.roidmi_eve', 'custom.led_switch', 1) %}\n + \ input_boolean.turn_on\n{% else %}\n input_boolean.turn_off\n{% endif %}\n" + data: + entity_id: input_boolean.vacuum_led_switch + - service: "{% if is_state_attr('vacuum.roidmi_eve', 'custom.lidar_collision', 1) + %}\n input_boolean.turn_on\n{% else %}\n input_boolean.turn_off\n{% endif + %}\n" + data: + entity_id: input_boolean.vacuum_lidar_collision + - service: "{% if is_state_attr('vacuum.roidmi_eve', 'custom.auto_boost', 1) %}\n + \ input_boolean.turn_on\n{% else %}\n input_boolean.turn_off\n{% endif %}\n" + data: + entity_id: input_boolean.vacuum_auto_boost + - service: input_number.set_value + entity_id: input_number.vacuum_volume + data_template: + value: '{{ state_attr("vacuum.roidmi_eve","speaker.volume") }}' + - service: "{% if is_state_attr('vacuum.roidmi_eve', 'custom.double_clean', 1) %}\n + \ input_boolean.turn_on\n{% else %}\n input_boolean.turn_off\n{% endif %}\n" + data: + entity_id: input_boolean.vacuum_double_clean + - service: "{% if is_state_attr('vacuum.roidmi_eve', 'map.path_type', 1) %}\n input_boolean.turn_on\n{% + else %}\n input_boolean.turn_off\n{% endif %}\n" + data: + entity_id: input_boolean.vacuum_edge_sweep + - service: input_select.select_option + entity_id: input_select.vacuum_water_level + data_template: + option: "{%- if is_state_attr('vacuum.roidmi_eve','custom.water_level',0) -%}\n + \ No water\n{%- elif is_state_attr('vacuum.roidmi_eve','custom.water_level',1) + -%}\n Small\n{%- elif is_state_attr('vacuum.roidmi_eve','custom.water_level',2) + -%}\n Middle\n{%- elif is_state_attr('vacuum.roidmi_eve','custom.water_level',3) + -%}\n MAX\n{%- else -%} {%- endif -%}\n" + - service: "{% if is_state_attr('vacuum.roidmi_eve', 'custom.station_key', 1) %}\n + \ input_boolean.turn_on\n{% else %}\n input_boolean.turn_off\n{% endif %}\n" + data: + entity_id: input_boolean.vacuum_station_key + - service: "{% if is_state_attr('vacuum.roidmi_eve', 'custom.station_led', 1) %}\n + \ input_boolean.turn_on\n{% else %}\n input_boolean.turn_off\n{% endif %}\n" + data: + entity_id: input_boolean.vacuum_station_led + - service: "{% if is_state_attr('vacuum.roidmi_eve', 'speaker.mute', 1) %}\n input_boolean.turn_on\n{% + else %}\n input_boolean.turn_off\n{% endif %}\n" + data: + entity_id: input_boolean.vacuum_mute + - service: input_select.select_option + entity_id: input_select.vacuum_work_station_freq + data_template: + option: "{%- if is_state_attr('vacuum.roidmi_eve','custom.work_station_freq',0) + -%}\n Not to throw away\n{%- elif is_state_attr('vacuum.roidmi_eve','custom.work_station_freq',1) + -%}\n Every time\n{%- elif is_state_attr('vacuum.roidmi_eve','custom.work_station_freq',2) + -%}\n Every second\n{%- elif is_state_attr('vacuum.roidmi_eve','custom.work_station_freq',3) + -%}\n Every third\n{%- else -%} {%- endif -%}\n" + - service: input_select.select_option + entity_id: input_select.vacuum_mode + data_template: + option: "{%- if is_state_attr('vacuum.roidmi_eve','vacuum.mode',0) -%}\n Sweep\n{%- + elif is_state_attr('vacuum.roidmi_eve','vacuum.mode',1) -%}\n Silent\n{%- + elif is_state_attr('vacuum.roidmi_eve','vacuum.mode',2) -%}\n Basic\n{%- + elif is_state_attr('vacuum.roidmi_eve','vacuum.mode',3) -%}\n Strong\n{%- + elif is_state_attr('vacuum.roidmi_eve','vacuum.mode',4) -%}\n Full Speed\n{%- + else -%} {%- endif -%}\n" + - service: input_select.select_option + entity_id: input_select.vacuum_sweep_type + data_template: + option: "{%- if is_state_attr('vacuum.roidmi_eve','vacuum.sweep_type',0) -%}\n + \ Sweep\n{%- elif is_state_attr('vacuum.roidmi_eve','vacuum.sweep_type',1) + -%}\n Mop\n{%- elif is_state_attr('vacuum.roidmi_eve','vacuum.sweep_type',2) + -%}\n Mop And Sweep\n{%- else -%} {%- endif -%}\n" + mode: single +- id: '1719003861113' + alias: HA updated + description: 'Ha updated generate readme ' + trigger: + - platform: state + entity_id: + - update.home_assistant_core_update + from: 'on' + to: 'off' + - platform: state + entity_id: + - sensor.current_version + from: + condition: [] + action: + - service: readme.generate + metadata: {} + data: {} + mode: single +- id: '1719583633037' + alias: Vanny skolka + description: '' + trigger: + - platform: template + value_template: '{% set lag_in_minute = 10 %} {% set travel_time_in_minute = states("sensor.waze_ngoc_jahoda")|int + %} {% set target_time = now().replace(hour=16).replace(minute=45).replace(second=0) + %} {{ as_timestamp(target_time) - (travel_time_in_minute+lag_in_minute)*60 <= + as_timestamp(now())}}' + condition: + - condition: not + conditions: + - condition: zone + entity_id: device_tracker.viet_ngoc + zone: zone.smichov + action: + - service: notify.mobile_app_viet_ngoc + data: + message: '{{ states(''sensor.waze_ngoc_jahoda'')}}min {{ state_attr(''sensor.waze_ngoc_jahoda'',''route'')}}' + title: Vanesska Jesle + data: + shortcut: + name: Jahoda Direction + ignore_result: ignore + push: + sound: + name: findmy.wav + critical: 1 + volume: 1 + mode: single +- id: '1719583833596' + alias: Vanny skolka waze + description: '' + trigger: + - platform: time_pattern + minutes: /2 + id: 20min + condition: + - condition: time + after: '14:00:00' + before: '17:00:00' + weekday: + - fri + - thu + - wed + - tue + - mon + action: + - service: homeassistant.update_entity + data: {} + target: + entity_id: + - sensor.waze_ngoc_jahoda + - sensor.waze_ngoc_smichov_oc + mode: single +- id: '1727802647185' + alias: person_home_change + description: '' + trigger: + platform: state + entity_id: + - person.viet_ngoc + from: + - home + - not_home + to: + - home + - not_home + action: + data: + topic: 'homeassistant/persistence/{{ trigger.to_state.name | lower }} + + ' + payload: '{{ now() }} + + ' + retain: true + action: mqtt.publish + mode: parallel +- id: '1733711039643' + alias: Disable Vacuum Camera + description: '' + use_blueprint: + path: PiotrMachowski/disable_vacuum_camera_update_when_docked.yaml + input: + vacuum: vacuum.roidmi_eve + camera: camera.roidmi_eve +- id: '1737054227949' + alias: Kids room camera snapshot + description: '' + triggers: + - at: 05:00:00 + id: delete + trigger: time + - hours: /1 + trigger: time_pattern + conditions: + - condition: time + after: 05:00:00 + before: 00:00:00 + actions: + - if: + - condition: trigger + id: delete + then: + - data: + folder: /config/www/tmp/snapshots/ + time: 0 + only_extensions: + - .png + - .jpg + action: delete.files_in_folder + - data: + folder: /config/www/tmp/kids/ + time: 0 + only_extensions: + - .png + - .jpg + action: delete.files_in_folder + - parallel: + - action: button.press + metadata: {} + data: {} + target: + entity_id: button.kids_room_start_rtsp_stream + - condition: state + entity_id: camera.kids_room + state: streaming + for: + hours: 0 + minutes: 0 + seconds: 3 + - delay: + hours: 0 + minutes: 0 + seconds: 2 + milliseconds: 0 + - parallel: + - data: + filename: /config/www/tmp/snapshots/camera.kids_room{{ now().strftime("%Y%m%d-%H%M%S") + }}.jpg + target: + entity_id: camera.kids_room + action: camera.snapshot + - action: input_text.set_value + metadata: {} + data: + value: camera.kids_room{{now().strftime("%Y%m%d-%H%M%S")}}.jpg + target: + entity_id: input_text.kids_camera_snapshot + - data: + filename: /config/tmp/camera.kids_room{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg + target: + entity_id: camera.kids_room + action: camera.snapshot + - delay: + hours: 0 + minutes: 0 + seconds: 5 + milliseconds: 0 + - action: button.press + metadata: {} + data: {} + target: + entity_id: button.kids_room_stop_rtsp_stream + mode: single +- id: '1737074902973' + alias: test video notify + description: '' + triggers: [] + conditions: [] + actions: + - action: notify.mobile_app_viet_ngoc + data: + message: Test video + data: + video: /media/local/test_video.mp4 + enabled: false + - action: notify.mobile_app_viet_ngoc + data: + message: browse + data: + actions: + - action: URI + title: Browse media + uri: /media-browser/browser + enabled: false + - action: notify.mobile_app_viet_ngoc + data: + message: Motion Detected in the Living Room + data: + entity_id: camera.kids_room_cam + push: + category: camera + mode: single diff --git a/config/custom_components/ingress/manifest.json b/config/custom_components/ingress/manifest.json new file mode 100644 index 00000000..22c8001d --- /dev/null +++ b/config/custom_components/ingress/manifest.json @@ -0,0 +1,12 @@ +{ + "domain": "ingress", + "name": "Ingress", + "after_dependencies": ["panel_custom"], + "codeowners": ["@lovelylain"], + "config_flow": false, + "dependencies": ["http"], + "documentation": "https://github.com/lovelylain/hass_ingress", + "iot_class": "local_push", + "issue_tracker": "https://github.com/lovelylain/hass_ingress/issues", + "version": "1.2.5" +} diff --git a/config/packages/hassio/hass_frontend.yaml b/config/packages/hassio/hass_frontend.yaml index d5049004..bc0c6a3b 100644 --- a/config/packages/hassio/hass_frontend.yaml +++ b/config/packages/hassio/hass_frontend.yaml @@ -45,3 +45,14 @@ panel_custom: url_path: 'config/automation/dashboard' config: ingress: core_configurator + +ingress: + local_homebridge: + work_mode: iframe + ui_mode: normal + title: Homebridge + icon: si:homebridge + url: + match: !secret external_url + replace: !secret homebridge_url + default: http://192.168.0.146:8581/ diff --git a/config/packages/hassio/hass_system.yaml b/config/packages/hassio/hass_system.yaml index 15dca3ae..23cdbd1e 100644 --- a/config/packages/hassio/hass_system.yaml +++ b/config/packages/hassio/hass_system.yaml @@ -33,6 +33,7 @@ recorder: - sensor.date - sensor.hassio_addons_use - sensor.zhimi_mb4_b008_moto_speed_rpm + - script.fade_music entity_globs: - sensor.*_motor_speed - sensor.browser_* @@ -46,7 +47,7 @@ recorder: - sensor.kodi_* - sensor.amg_43_* - sensor.*_write - - sensor.prague_* + - sensor.prague_next_* - sensor.*_utilization - sensor.*_clients - sensor.*_voltage @@ -59,6 +60,8 @@ recorder: - sensor.motion_sensor_* - sensor.*_outage_count - sensor.*_speed_rpm + - sensor.*_clients + - sensor.*_containers_cpu_usage logger: default: error diff --git a/config/scripts.yaml b/config/scripts.yaml new file mode 100644 index 00000000..549cd833 --- /dev/null +++ b/config/scripts.yaml @@ -0,0 +1,678 @@ +restart_pi_docker: + alias: Restart Pi Docker + sequence: + - service: shell_command.pidocker_restart + data: {} + mode: single + icon: mdi:reload +purge_dockerlog: + alias: Purge docker log + sequence: + - service: shell_command.purge_dockerlog + data: {} + mode: single + icon: mdi:archive-remove +samsung_turn_on_off: + alias: SAMSUNG turn on off + sequence: + - if: + - condition: state + entity_id: media_player.bedroom_tv + state: 'off' + then: + - service: media_player.turn_on + data: {} + target: + entity_id: media_player.bedroom_tv + else: + - service: media_player.turn_off + data: {} + target: + entity_id: media_player.bedroom_tv + mode: single + icon: mdi:power +atv_sleep: + alias: ATV Sleep + sequence: + - service: remote.send_command + data: + command: + - home_hold + - select + delay_secs: 1 + target: + entity_id: remote.atv + enabled: false + - service: media_player.turn_off + target: + entity_id: media_player.atv + data: {} + enabled: false + - if: + - condition: or + conditions: + - condition: state + entity_id: media_player.atv + attribute: app_id + state: com.google.ios.youtube + - condition: state + entity_id: media_player.atv + attribute: app_id + state: org.xbmc.kodi-tvos + then: + - service: script.atv_quit + data: {} + - service: remote.turn_off + data: {} + target: + entity_id: remote.sony_bravia_tv + else: + - service: remote.turn_off + data: {} + target: + entity_id: remote.sony_bravia_tv + mode: single + icon: mdi:power +apple_tv_power: + alias: Apple TV Power + sequence: + - service: remote.send_command + data: + command: + - home_hold + - select + delay_secs: 1 + target: + entity_id: remote.atv + mode: single + icon: mdi:power +tv_volume_up: + alias: ATV Volume up + sequence: + - service: media_player.volume_up + data: {} + target: + entity_id: media_player.living_room_tv + mode: single + icon: mdi:volume-plus +tv_volume_down: + alias: ATV Volume down + sequence: + - service: media_player.volume_down + data: {} + target: + entity_id: media_player.living_room_tv + mode: single + icon: mdi:volume-minus +atv_turn_on_off: + alias: ATV Turn on off + sequence: + - if: + - condition: state + entity_id: media_player.living_room_tv + state: 'off' + then: + - service: media_player.turn_on + data: {} + target: + entity_id: media_player.living_room_tv + else: + - service: media_player.turn_off + data: {} + target: + entity_id: media_player.living_room_tv + mode: single + icon: mdi:power +vacuum_notify: + alias: Vacuum Notify + mode: queued + icon: mdi:vacuum + description: Send a pushover notification + fields: + title: + description: The title of the notification + example: State change + message: + description: The message content + example: The light is on! + data: + description: The data content + example: icons push sound + sequence: + - service: notify.mobile_app_viet_ngoc + data: + title: '{{ title }}' + message: '{{ message }}' +zuzu_entities: + alias: zuzu entities + sequence: + - parallel: + - service: homeassistant.update_entity + data: {} + target: + entity_id: + - sensor.gle + - device_tracker.findmy_d098350b38e241d3972ad394a27f38b6 + mode: single +atv_quit: + alias: Atv quit + sequence: + - service: remote.send_command + data: + num_repeats: 1 + delay_secs: 0.4 + hold_secs: 0 + command: + - home + - top_menu + target: + entity_id: remote.atv + enabled: true + - delay: + hours: 0 + minutes: 0 + seconds: 1 + milliseconds: 0 + enabled: true + - service: remote.send_command + data: + delay_secs: 0.2 + command: + - home + num_repeats: 2 + target: + entity_id: remote.atv + - delay: + hours: 0 + minutes: 0 + seconds: 1 + milliseconds: 0 + - service: remote.send_command + data: + num_repeats: 1 + delay_secs: 0.4 + hold_secs: 0 + command: + - left + target: + entity_id: remote.atv + - delay: + hours: 0 + minutes: 0 + seconds: 1 + milliseconds: 0 + - service: remote.send_command + data: + delay_secs: 0.2 + command: + - up + num_repeats: 2 + target: + entity_id: remote.atv + - service: remote.send_command + data: + num_repeats: 1 + delay_secs: 0.4 + hold_secs: 0 + command: + - left + target: + entity_id: remote.atv + - delay: + hours: 0 + minutes: 0 + seconds: 1 + milliseconds: 0 + - service: remote.send_command + data: + delay_secs: 0.2 + command: + - up + num_repeats: 2 + target: + entity_id: remote.atv + - service: remote.send_command + data: + num_repeats: 1 + delay_secs: 0.4 + hold_secs: 0 + command: + - left + target: + entity_id: remote.atv + - delay: + hours: 0 + minutes: 0 + seconds: 1 + milliseconds: 0 + - service: remote.send_command + data: + delay_secs: 0.2 + command: + - up + num_repeats: 2 + target: + entity_id: remote.atv + - service: remote.send_command + data: + num_repeats: 1 + delay_secs: 0.4 + hold_secs: 0 + command: + - top_menu + target: + entity_id: remote.atv + mode: single +fade_music: + alias: Fade the volume of a media player + mode: parallel + fields: + target_player: + name: Target media player + description: Target media player of volume fade. + required: true + example: media_player.spotify + selector: + entity: + domain: media_player + target_volume: + name: Target volume + description: Volume the media play will be at the end of the fade duration. + required: true + default: 0.5 + example: '0.5' + selector: + number: + max: 1 + min: 0 + step: 0.01 + mode: slider + duration: + name: Fade duration + description: Length of time in seconds the fade should take. + required: true + default: 5 + example: '5' + selector: + number: + mode: box + min: 0 + max: 100000 + unit_of_measurement: s + curve: + name: Fade curve algorithm + description: Shape of the fade curve to apply. + required: true + default: logarithmic + example: logarithmic + selector: + select: + options: + - logarithmic + - bezier + - linear + variables: + steps_per_second: 10 + total_steps: '{{ (steps_per_second * duration) | int(0) }}' + start_volume: '{{ state_attr(target_player, ''volume_level'') | float(0) }}' + start_diff: '{{ (target_volume - start_volume) | float(0) }}' + sequence: + - repeat: + while: + - condition: template + value_template: '{{ repeat.index < total_steps }}' + - condition: template + value_template: '{{ ((state_attr(target_player, "volume_level") - target_volume) + | abs) > 0.001 }}' + sequence: + - service: media_player.volume_set + data_template: + entity_id: '{{ target_player }}' + volume_level: "{% set t = repeat.index / total_steps %} {% if curve == 'logarithmic' + %}\n {{ (start_volume + (t / (1 + (1 - t))) * start_diff) | float(0) + }}\n{% elif curve == 'bezier' %}\n {{ (start_volume + (t * t * (3 - 2 + * t)) * start_diff) | float(0) }}\n{% else %}\n {{ (start_volume + t + * start_diff) | float(0) }}\n{% endif %}\n" + - delay: '00:00:00.1' + - service: media_player.volume_set + data_template: + entity_id: '{{ target_player }}' + volume_level: '{{ target_volume }}' + icon: mdi:tune-vertical +morning_cover: + alias: morning cover + sequence: + - choose: + - conditions: + - condition: and + conditions: + - condition: numeric_state + entity_id: cover.living_room_cover + below: 100 + attribute: current_tilt_position + above: 0 + - condition: numeric_state + entity_id: cover.living_room_cover + below: 100 + attribute: current_position + above: 0 + sequence: + - service: cover.set_cover_tilt_position + data: + tilt_position: 100 + target: + entity_id: cover.living_room_cover + - conditions: + - condition: numeric_state + entity_id: cover.living_room_cover + above: 0 + attribute: current_position + sequence: + - service: cover.close_cover + data: {} + target: + entity_id: cover.living_room_cover + - wait_template: '{{ state_attr("cover.living_room_cover", "current_position") + == 0 }}' + continue_on_timeout: true + - service: cover.set_cover_tilt_position + data: + tilt_position: 100 + target: + entity_id: cover.living_room_cover + - conditions: + - condition: state + entity_id: cover.living_room_cover + state: closed + - condition: template + value_template: '{{ state_attr("cover.living_room_cover", "current_tilt_position") + == 0 }}' + sequence: + - service: cover.set_cover_tilt_position + data: + tilt_position: 100 + target: + entity_id: cover.living_room_cover + mode: single + icon: mdi:window-shutter +sony_kodi: + alias: Sony Kodi + sequence: + - service: media_player.play_media + target: + entity_id: media_player.sony_bravia_tv + data: + media_content_id: com.sony.dtv.org.xbmc.kodi.org.xbmc.kodi.Splash + media_content_type: app + metadata: + title: Kodi + thumbnail: /api/media_player_proxy/media_player.sony_bravia_tv/browse_media/app/com.sony.dtv.org.xbmc.kodi.org.xbmc.kodi.Splash?token=19dfbdc46bb386e62043ad04e52fe924017b25b51b690470442047d5a6b75110 + media_class: app + children_media_class: + navigateIds: + - {} + - media_content_type: apps + media_content_id: apps + mode: single +vacuum_download_map: + alias: Download a map from the cloud + mode: single + icon: mdi:cloud-download-outline + sequence: + - service: homeassistant.update_entity + data: + entity_id: camera.roidmi_eve + - delay: 00:00:02 + - service: homeassistant.update_entity + data: + entity_id: camera.roidmi_eve + - delay: 00:00:02 + - service: homeassistant.update_entity + data: + entity_id: camera.roidmi_eve + - delay: 00:00:02 + - service: homeassistant.update_entity + data: + entity_id: camera.roidmi_eve +vacuum_start_clean: + alias: Cleaning rooms according to the list + icon: mdi:delete-sweep-outline + mode: single + sequence: + - condition: template + value_template: '{% if is_state(''input_boolean.vacuum_room1'',''on'') or is_state(''input_boolean.vacuum_room2'',''on'') + or is_state(''input_boolean.vacuum_room3'',''on'') or is_state(''input_boolean.vacuum_room4'',''on'') + or is_state(''input_boolean.vacuum_room5'',''on'') or is_state(''input_boolean.vacuum_room6'',''on'') + or is_state(''input_boolean.vacuum_room7'',''on'') or is_state(''input_boolean.vacuum_room8'',''on'')%}True{% + else %}False{% endif %} ' + - service: script.turn_on + entity_id: script.vacuum_clean_select_room + data_template: + variables: + rooms: "{%- set text = '' -%}\n{%- if is_state('input_boolean.vacuum_room1','on') + %}\n {%- set text = '1' %}{% endif %}\n{%- if is_state('input_boolean.vacuum_room2','on') + %}\n {%- if text != '' %}{%- set text = text+',' %}{% endif %}\n {%- set + text = text+'2' %}{% endif %}\n{%- if is_state('input_boolean.vacuum_room3','on') + %}\n {%- if text != '' %}{%- set text = text+',' %}{% endif %}\n {%- set + text = text+'3' %}{% endif %}\n{%- if is_state('input_boolean.vacuum_room4','on') + %}\n {%- if text != '' %}{%- set text = text+',' %}{% endif %}\n {%- set + text = text+'4' %}{% endif %}\n{%- if is_state('input_boolean.vacuum_room5','on') + %}\n {%- if text != '' %}{%- set text = text+',' %}{% endif %}\n {%- set + text = text+'5' %}{% endif %}\n{%- if is_state('input_boolean.vacuum_room6','on') + %}\n {%- if text != '' %}{%- set text = text+',' %}{% endif %}\n {%- set + text = text+'6' %}{% endif %}\n{%- if is_state('input_boolean.vacuum_room7','on') + %}\n {%- if text != '' %}{%- set text = text+',' %}{% endif %}\n {%- set + text = text+'7' %}{% endif %}\n{%- if is_state('input_boolean.vacuum_room8','on') + %}\n {%- if text != '' %}{%- set text = text+',' %}{% endif %}\n {%- set + text = text+'8' %}{% endif %}\n{%- set text = '[2,\"{\\\\\"mapId\\\\\":1696538829,\\\\\"segmentId\\\\\":[' + + text + ']}\"]' %}\n{{text}}\n" +vacuum_clean_select_room: + alias: Cleaning of selected rooms + mode: single + fields: + rooms: + description: Command with room numbers + example: Specifies the full cleaning command of the room + sequence: + - service: xiaomi_miot.call_action + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 14 + aiid: 1 + params: '{{ rooms }}' +vacuum_start_clean_all: + alias: Cleaning the entire apartment + icon: mdi:vacuum-outline + mode: single + sequence: + - service: vacuum.start + data: + entity_id: vacuum.roidmi_eve +vacuum_find_robot: + alias: Robot locate + icon: mdi:vacuum-outline + mode: single + sequence: + - service: xiaomi_miot.call_action + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 8 + aiid: 1 +vacuum_empty_bin: + alias: Vacuum empty bin + icon: mdi:vacuum-outline + mode: single + sequence: + - if: + - condition: state + entity_id: vacuum.roidmi_eve + state: docked + then: + - service: xiaomi_miot.call_action + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 8 + aiid: 6 + else: + - service: vacuum.return_to_base + data: {} + target: + entity_id: vacuum.roidmi_eve + - wait_template: '{{ is_state(''vacuum.roidmi_eve'', ''docked'') }}' + continue_on_timeout: true + - service: xiaomi_miot.call_action + data: + entity_id: vacuum.roidmi_eve + did: 558429891 + siid: 8 + aiid: 6 +level: + alias: Reset readings + icon: mdi:backup-restore + mode: single + sequence: + - service: xiaomi_miot.call_action + data: + entity_id: vacuum.roidmi_eve + siid: 11 + aiid: 1 + params: [] + throw: false + - delay: 00:20:00 +vacuum_reset_brush_life_level_2: + alias: Reset readings + icon: mdi:backup-restore + mode: single + sequence: + - service: xiaomi_miot.call_action + data: + entity_id: vacuum.roidmi_eve + siid: 12 + aiid: 1 + params: [] + throw: false + - delay: 00:20:00 +vacuum_reset_brush_life_level_3: + alias: Reset readings + icon: mdi:backup-restore + mode: single + sequence: + - service: xiaomi_miot.call_action + data: + entity_id: vacuum.roidmi_eve + siid: 15 + aiid: 1 + params: [] + throw: false + - delay: 00:20:00 +vacuum_reset_filter_life_level: + alias: Reset readings + icon: mdi:backup-restore + mode: single + sequence: + - service: xiaomi_miot.call_action + data: + entity_id: vacuum.roidmi_eve + siid: 10 + aiid: 1 + params: [] + throw: false + - delay: 00:20:00 +homepod_alarm: + alias: Homepod alarm + sequence: + - action: media_player.turn_on + target: + entity_id: media_player.bedroom + data: {} + - delay: + hours: 0 + minutes: 0 + seconds: 3 + milliseconds: 0 + - data: + volume_level: 0.2 + action: media_player.volume_set + target: + entity_id: media_player.bedroom + - delay: + hours: 0 + minutes: 0 + seconds: 3 + milliseconds: 0 + - action: media_player.shuffle_set + metadata: {} + data: + shuffle: true + target: + entity_id: media_player.bedroom + - data: + media_content_id: library://playlist/4 + media_content_type: playlist + metadata: + title: 500 Random tracks (from library) + thumbnail: + media_class: playlist + children_media_class: track + navigateIds: + - {} + - media_content_type: mass + media_content_id: playlists + - media_content_type: music + media_content_id: library://playlist/4 + target: + entity_id: media_player.bedroom + action: media_player.play_media + - delay: + hours: 0 + minutes: 0 + seconds: 3 + milliseconds: 0 + - parallel: + - data: + target_volume: 0.7 + duration: 30 + curve: logarithmic + target_player: media_player.bedroom + action: script.fade_music + mode: single + icon: phu:homepod-mini +run_plugin: + alias: run plugin + sequence: + - service: kodi.call_method + metadata: {} + data: + method: Player.Open + item: + file: '{{ file }}' + target: + entity_id: media_player.kodi_atv + mode: single +update_entitites: + alias: update entitites + sequence: + - service: homeassistant.update_entity + data: {} + target: + entity_id: '{%- for state in states if state.domain == "update" and state.state + != "unavailable" -%} - {{ state.entity_id }} {%- endfor -%} + + ' + description: '' + icon: mdi:update +backup_addon: + sequence: + - action: hassio.backup_partial + metadata: {} + data: + compressed: true + homeassistant_exclude_database: true + addons: + - '{{ addon_slug }}' + name: '{{ addon_slug }}_{{ version }}_{{ now().strftime(''%d_%m_%H_%M'') }}' + alias: backup addon + description: '' diff --git a/config/secrets_redacted.yaml b/config/secrets_redacted.yaml index 3a78b17f..063597c3 100644 --- a/config/secrets_redacted.yaml +++ b/config/secrets_redacted.yaml @@ -97,3 +97,5 @@ accuweather_api_hourly: '***REDACTED***' waqi_api: '***REDACTED***' github_token: '***REDACTED***' + +homebridge_url: '***REDACTED***' diff --git a/docs/README.md b/docs/README.md index fc8453cd..713db5a6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -45,13 +45,13 @@ https://github.com/ngocjohn/hass-config/assets/96962827/acc1a4db-b92e-4ab1-ac9d- - 35,894 + 35,928 34 - 154 + 156 63 54 32 - 1065 + 1071 201 38 @@ -103,6 +103,7 @@ https://github.com/ngocjohn/hass-config/assets/96962827/acc1a4db-b92e-4ab1-ac9d- - [Govee](https://github.com/LaggAt/hacs-govee) - [HACS](https://github.com/hacs/integration) - [Hass Favicon](https://github.com/thomasloven/hass-favicon) +- [Ingress](https://github.com/lovelylain/hass_ingress) - [Lunar Phase](https://github.com/ngocjohn/lunar-phase) - [Mercedesme 2020](https://github.com/ReneNulschDE/mbapi2020) - [Node Red Companion](https://github.com/zachowj/hass-node-red)