- id: '1710795370401' alias: Door Open TTS Alert description: Sends a TTS alert through selected speakers when the front or back door is opened, indicating which door was triggered. trigger: - platform: state entity_id: - binary_sensor.back_door_contact id: back_door from: null to: 'on' - platform: state entity_id: - binary_sensor.front_door_contact id: front_door from: null to: 'on' action: - choose: - conditions: - condition: trigger id: back_door sequence: - service: media_player.volume_set data: volume_level: 0.8 target: entity_id: - media_player.kitchen_speaker - media_player.bedroom_speaker - service: tts.cloud_say data: message: Back door opened. entity_id: media_player.kitchen_speaker - service: tts.cloud_say data: message: Back door opened. entity_id: media_player.bedroom_speaker - conditions: - condition: trigger id: front_door sequence: - service: media_player.volume_set data: volume_level: 0.8 target: entity_id: - media_player.kitchen_speaker - media_player.bedroom_speaker - service: tts.cloud_say data: entity_id: media_player.kitchen_speaker message: Front door opened. - service: tts.cloud_say data: message: Front Door opened. entity_id: media_player.bedroom_speaker - id: '1710543988869' alias: Adjust Indoor Lighting Based on Cloud Coverage description: Dynamically adjusts the indoor light brightness based on cloud coverage percentage during the day. trigger: - platform: state entity_id: sensor.openweathermap_cloud_coverage condition: - condition: state entity_id: sun.sun state: above_horizon action: - service: input_number.set_value target: entity_id: input_number.home_light_brightness data: value: "{% set baseline_brightness = 30 %} {% set max_adjustment = 100 %} {%\ \ set cloud_coverage = states('sensor.openweathermap_cloud_coverage') | float(default=0)\ \ %}\n{% if cloud_coverage is none %}\n {% set cloud_coverage = 0 %}\n{%\ \ endif %}\n{% set calculated_brightness = baseline_brightness + ((cloud_coverage\ \ / 100) * (max_adjustment - baseline_brightness)) %} {% if calculated_brightness\ \ > max_adjustment %}\n {% set calculated_brightness = max_adjustment %}\n\ {% elif calculated_brightness < 0 %}\n {% set calculated_brightness = 0 %}\n\ {% endif %}\n{{ calculated_brightness }}\n" mode: single - id: '1710640274265' alias: Upstairs AC Controllor description: '' trigger: - platform: numeric_state entity_id: sensor.bedroom_motion_sensor_temperature above: 75 id: above_75 - platform: numeric_state entity_id: sensor.bedroom_motion_sensor_temperature below: 70 id: below_70 - platform: time_pattern hours: /01 condition: - condition: template value_template: '{{ is_state(''input_boolean.frigidaire_ac_button'', ''off'') and is_state(''input_boolean.lg_ac_button'', ''off'') }}' enabled: false action: - choose: - conditions: - condition: or conditions: - condition: trigger id: - above_75 - condition: numeric_state entity_id: sensor.bedroom_motion_sensor_temperature_measurement above: 75 sequence: - service: script.frigidaire_climate_control_upstairs_power_toggle data: {} - delay: 1 - service: script.lg_climate_control_upstairs_power_toggle data: {} - conditions: - condition: or conditions: - condition: trigger id: - below_70 - condition: numeric_state entity_id: sensor.bedroom_motion_sensor_temperature_measurement below: 70 sequence: - service: script.frigidaire_climate_control_upstairs_power_toggle data: {} - delay: 1 - service: script.lg_climate_control_upstairs_power_toggle data: {} mode: single - id: '1710979106892' alias: LG webOS Smart TV - Turn On Action description: '' use_blueprint: path: cvroque/webostv_turn_on.yaml input: webostv: 1503b5ade8481f97dd131da4a9772270 webostv_mac: E4:75:DC:9F:D6:D3 on_action: - service: script.toggle metadata: {} data: {} select_action: true custom_action: - service: script.lg_tv_upstairs_power_on metadata: {} data: {} - id: '1726203993067' alias: Adjust No Motion Delay with Hue Dimmer description: Set no motion delay to 30 when button 1 is pressed, reset on button 4 or after 30 minutes. trigger: - device_id: 3f330cd2e69e8ee831d5c5f0ab4bc433 domain: hue platform: device type: short_release subtype: 1 unique_id: b21ca135-d892-465c-91f0-934426a4a5c9 - device_id: 3f330cd2e69e8ee831d5c5f0ab4bc433 domain: hue platform: device type: short_release subtype: 4 unique_id: some-unique-id-for-button-4 action: - choose: - conditions: - condition: trigger id: b21ca135-d892-465c-91f0-934426a4a5c9 sequence: - data: value: 30 target: entity_id: input_number.bedroom_no_motion_delay action: input_number.set_value - wait_for_trigger: - platform: event event_type: deconz_event event_data: id: 3f330cd2e69e8ee831d5c5f0ab4bc433 event: 4002 - delay: 00:30:00 - data: value: 0 target: entity_id: input_number.bedroom_no_motion_delay action: input_number.set_value mode: single - id: '1699732340926' alias: Frigidare Power Toggle description: '' trigger: - platform: state entity_id: - input_boolean.frigidaire_ac_button condition: [] action: - service: script.frigidaire_climate_control_upstairs_power_toggle data: {} mode: single - id: '1699732652226' alias: LG AC Power Toggle description: '' trigger: - platform: state entity_id: - input_boolean.lg_ac_button condition: [] action: - service: script.lg_climate_control_upstairs_power_toggle data: {} mode: single - alias: 00 - Google Home Automatic Resume id: 417395bc-bd64-40a3-b20a-9062d426a01f mode: parallel max_exceeded: silent trigger: - platform: event enabled: true event_type: call_service event_data: domain: media_player service: play_media variables: announce_volume: '{{ state_attr(''script.google_home_resume'', ''settings'').get(''announce_volume_automation'') }}' id: play - platform: event enabled: true event_type: call_service event_data: domain: cast service: show_lovelace_view id: cast variables: version: 2023.8.0 settings: primary_spotcast: justin radio_data: NPO Radio 2: picture: secret radio_picture_url title: Er is maar één NPO Radio 2 speaker_groups: media_player.home_google: - media_player.ytube_music_player default_volume_level: 0.25 dummy_player: media_player.vlc_telnet default_resume_delay: seconds: 20 max_runtime: minutes: 10 enable_automation: true dashboard_cast: true announce_volume_automation: 0.4 entities: '{%- set e = trigger.event.data.service_data.entity_id %} {%- set e = (e | replace('' '', '''')).split('','') if e is string else e %} {%- set e = expand(e) | map(attribute=''entity_id'') | list %} {%- set speaker_groups = settings.get(''speaker_groups'') | default({}, true) %} {%- set members = speaker_groups.items() | selectattr(''0'', ''in'', e) | map(attribute=''1'') | sum(start=[]) %} {{ e + members }} ' condition: - alias: Check if automation in enabled in script settings condition: template value_template: '{{ settings.enable_automation | default(true) }}' - alias: Check if announce was set on the service call condition: template value_template: '{{ trigger.id == ''cast'' or trigger.event.data.service_data.get(''announce'', false) }}' - alias: Check if dashboard resume is enabled in case of dashboard cast trigger condition: template value_template: '{{ trigger.id == ''play'' or settings.get(''dashboard_cast'') | default(true) or settings.get(''dashboard_cast'') is none }}' action: - alias: Set variables to be used in the automation variables: start_time: '{{ start_time if start_time is defined else now() }}' speaker_groups: '{{ settings.get(''speaker_groups'') | default({}, true) }}' speaker_group_list: '{{ speaker_groups.keys() | list }}' cast_entities: '{{ integration_entities(''cast'') }}' spotify_entities: '{{ integration_entities(''spotify'') }}' primary_spotcast_check: '{%- set accounts = spotify_entities | map(''replace'', ''media_player.spotify_'', '''') | list %} {{ spotify_entities | count <= 1 or settings.get(''primary_spotcast'') in accounts }} ' ytube_music_entities: '{{ integration_entities(''ytube_music_player'') | select(''match'', ''^media_player.'') | list }} ' resume_active: "{{ expand(integration_entities('group'))\n | selectattr('entity_id',\ \ 'search', 'group.resume_active_ghresume')\n | map(attribute='attributes.entity_id')\n\ \ | map('list')\n | sum(start=[])\n}}\n" resume_action_false: "{{ expand(integration_entities('group'))\n | selectattr('entity_id',\ \ 'search', 'group.resume_action_false_ghresume')\n | map(attribute='attributes.entity_id')\n\ \ | map('list')\n | sum(start=[])\n}}\n" - alias: Failsafe to remove all groups if no resume scripts are not running if: "{{ \n is_state_attr('script.google_home_resume', 'current', 0)\n and integration_entities('group')\n\ \ | select('search', 'ghresume')\n | list | count > 0\n}}\n" then: - alias: Which groups to remove variables: groups_existing: '{{ integration_entities(''group'') | select(''search'', ''ghresume'') | list }} ' - alias: Loop to remove groups repeat: for_each: '{{ groups_existing }}' sequence: - alias: Remove one group service: group.remove data: object_id: '{{ states[repeat.item].object_id }}' - alias: Check if target is already being resumed on in a group which is already being resumed condition: template value_template: "{%- set groups = states.group\n | selectattr('entity_id',\ \ 'search', 'resume_script_active_ghresume_')\n | map(attribute='entity_id')\n\ \ | list\n%} {%- set active = expand(groups)\n | rejectattr('state',\ \ 'in', ['unknown', 'unavailable'])\n | map(attribute='entity_id')\n\ \ | unique\n | list\n%} {%- set members =\ \ speaker_groups.items() | selectattr('0', 'in', active) | map(attribute='1')\ \ | sum(start=[]) %} {%- set active = active + members %} {%- set target_members\ \ = speaker_groups.items() | selectattr('0', 'in', entities) | map(attribute='1')\ \ | sum(start=[]) %} {%- set entities = (entities + target_members) | reject('in',\ \ speaker_group_list) | unique | list %} {{ entities | reject('in', active)\ \ | list | count > 0 }}\n" - alias: Are there Spotify entities? if: '{{ integration_entities(''spotify'') | count > 0 }}' then: - alias: Update Spotify entities service: homeassistant.update_entity target: entity_id: '{{ integration_entities(''spotify'') }}' - alias: Set data_source and determine target list variables: data_source: automation target_list: "{{\n integration_entities('cast')\n | select('in', entities)\n\ \ | list\n}}\n" - variables: player_data: "{%- if player_data is undefined %}\n {# general information for\ \ all entities #}\n {%- set ns = namespace(info=[], groups_playing=[]) %}\n\ \ {%- for entity in expand(cast_entities) %}\n {%- set members = speaker_groups[entity.entity_id]\n\ \ if speaker_groups is defined\n and\ \ iif(speaker_groups)\n and entity.entity_id in speaker_group_list\n\ \ else []\n %}\n {%- set screen = entity.attributes.device_class\ \ is not defined %}\n {%- set type = iif(members,'group',iif(screen,'screen','speaker'))\ \ %}\n {%- for group in speaker_group_list %}\n {%- set members\ \ = speaker_groups.items() | selectattr('0', 'eq', group) | map(attribute='1')\ \ | list | first %}\n {%- set members_playing = expand(members) | selectattr('state',\ \ 'eq', 'playing') | list | count == members | count %}\n {%- set content_list\ \ = expand(members) | selectattr('attributes.media_content_id', 'defined')\ \ | map(attribute='attributes.media_content_id') | list %}\n {%- set\ \ group_playing = members_playing and content_list | select('eq', content_list[0])\ \ | list | count == content_list | count %}\n {%- set ns.groups_playing\ \ = ns.groups_playing + [ group ] if group_playing else ns.groups_playing\ \ %}\n {%- endfor %}\n {%- set groups_playing = ns.groups_playing\ \ %}\n {%- if type == 'speaker' %}\n {% set groups = speaker_groups.items()\ \ | selectattr('1', 'search', entity.entity_id) | map(attribute='0') | list\ \ %}\n {% set playing = groups | select('in', groups_playing) | list\ \ | count > 0 %}\n {% set type = 'playing_member' if playing else type\ \ %}\n {%- endif %}\n {%- set state = 'off' if type == 'group' and\ \ not entity.entity_id in groups_playing else entity.state %}\n {%- set\ \ general = dict(\n data_source = data_source,\n\ \ entity_id = entity.entity_id,\n \ \ state = state,\n type = type,\n\ \ members = members\n \ \ )\n if type = 'playing_member'\n \ \ else dict(entity_id = entity.entity_id, type = type, members=[])\n\ \ %}\n {# check if there is a Spotify account playing on this entity\ \ #}\n {%- set list_check = expand([ entity.entity_id ] + members) |\ \ map(attribute='name') | list %}\n {%- set spotify_entity = expand(spotify_entities)\n\ \ | selectattr('state', 'eq', 'playing')\n\ \ | selectattr('attributes.source', 'in',\ \ list_check)\n | map(attribute='object_id')\n\ \ | join\n \ \ | replace('spotify_', '')\n %}\n {# add volume level #}\n \ \ {%- if not state in ['off', 'unavailable', 'unknown'] or type == 'playing_member'\ \ %}\n {%- set additional = dict(volume_level = entity.attributes.get('volume_level',\ \ settings.get('default_volume_level')) | round(2, default=0.25)) %}\n \ \ {%- else %}\n {%- set additional = {} %}\n {%- endif %}\n\ \ {# add metadata for playing entities #}\n {%- if type == 'playing_member'%}\n\ \ {%- elif (spotify_entity or\n (\n entity.state\ \ == 'playing'\n and expand(speaker_groups.items()\n \ \ | selectattr('0', 'eq', entity.entity_id)\n \ \ | list) \n | rejectattr('state',\ \ 'eq', 'playing')\n | list\n \ \ | count == 0\n )) and (type = 'group' or entity.entity_id\ \ in groups_playing)\n %}\n {%- set additional = dict(additional,\ \ **dict(\n state = 'playing',\n \ \ app_name = entity.attributes.get('app_name', 'no\ \ app'),\n media_content_id = (entity.attributes.get('media_content_id',\ \ {}) | from_json).get('contentId', 'no media_content')\n \ \ if entity.attributes.get('app_name')\ \ == 'Google Podcasts'\n \ \ else entity.attributes.get('media_content_id', 'no media_content'),\n\ \ media_position = (as_timestamp(now()) |\ \ round(2)\n - as_timestamp(entity.attributes.get('media_position_updated_at',\ \ now())) | round(2)\n \ \ + entity.attributes.get('media_position', 0)) | round(2)\n \ \ ))\n %}\n {# add Spotify account #}\n\ \ {%- if entity.attributes.get('app_name') == 'Spotify' %}\n \ \ {%- set spotcast = spotify_entity if spotify_entity\n \ \ and settings.primary_spotcast is defined\n \ \ and spotify_entity = settings.primary_spotcast\n\ \ and spotify_entities | count > 1\n \ \ and primary_spotcast_check\n \ \ else 'primary_account' %}\n {%- set additional\ \ = dict(additional,\n **dict(state='playing',\n\ \ spotcast = spotcast\n \ \ )\n )\ \ \n %}\n {# add information for ytube_music_player integration\ \ #}\n {%- elif entity.entity_id in expand(ytube_music_entities)\n\ \ | selectattr('state', 'eq', 'playing')\n\ \ | selectattr('attributes.remote_player_id',\ \ 'defined')\n | map(attribute='attributes.remote_player_id')\n\ \ | list\n %}\n {%- set\ \ additional = dict(additional,\n **dict(app_name='Ytube\ \ Music Player',\n yt_player=expand(ytube_music_entities)\ \ | selectattr('attributes.remote_player_id', 'defined') | selectattr('attributes.remote_player_id',\ \ 'eq', entity.entity_id) | map(attribute='entity_id') | join,\n \ \ media_content_id = 'ytube_music'\n \ \ )\n \ \ ) \n %}\n {# add information for web streams (including\ \ TuneIn) #}\n {%- elif entity.attributes.get('app_name') not in ['Spotify',\ \ 'YouTube', 'YouTube Music'] %}\n {%- if entity.attributes.get('media_artist')\ \ in (settings.get('radio_data') | default({}, true)).keys() | list %}\n \ \ {%- set data = settings.radio_data[entity.attributes.media_artist]\ \ %}\n {%- set picture, title = data.get('picture'), data.get('title')\ \ %}\n {%- endif %}\n {%- set additional = dict(additional,\ \ **dict(\n media_artist = 'Google\ \ Podcasts' if entity.attributes.get('app_name') == 'Google Podcasts'\n \ \ else entity.attributes.get('media_artist',\ \ 'no artist'),\n media_title = title\ \ if title is defined else entity.attributes.get('media_title', 'no title'),\n\ \ media_content_type = '' ~ entity.attributes.get('media_content_type',\ \ 'no type'),\n entity_picture = picture\ \ if picture is defined else entity.attributes.get('entity_picture', 'no pic')\n\ \ ))\n %}\n {%- endif\ \ %}\n {%- endif %}\n {# cobmine all data #}\n {%- set ns.info\ \ = ns.info + [ dict(general, **additional) if additional is defined else\ \ general ] %}\n {%- endfor %}\n {% set player_data = ns.info %}\n{%- endif\ \ %} {{ player_data }}\n" - alias: Interrupt YouTube music if needed if: '{{ player_data | selectattr(''entity_id'', ''in'', target_list) | selectattr(''yt_player'', ''defined'') | list | count > 0 }} ' then: - service: ytube_music_player.call_method data: entity_id: '{{ player_data | selectattr(''entity_id'', ''in'', target_list) | selectattr(''yt_player'', ''defined'') | map(attribute=''yt_player'') | list }} ' command: interrupt_start - if: '{{ trigger.id == ''play'' and announce_volume is defined and iif(announce_volume) }}' then: - wait_template: '{{ is_state(entities|first, ''idle'') }}' - alias: Set volume for announcement service: media_player.volume_set target: entity_id: '{{ entities }}' data: volume_level: '{{ announce_volume }}' - alias: Short delay delay: 0.5 - alias: Check again if target is already being resumed condition: template value_template: "{%- set groups = states.group\n | selectattr('entity_id',\ \ 'search', 'resume_script_active_ghresume_')\n | map(attribute='entity_id')\n\ \ | list\n%} {%- set active = expand(groups)\n | rejectattr('state',\ \ 'in', ['unknown', 'unavailable'])\n | map(attribute='entity_id')\n\ \ | unique\n | list\n%} {%- set members =\ \ speaker_groups.items() | selectattr('0', 'in', active) | map(attribute='1')\ \ | sum(start=[]) %} {%- set active = active + members %} {%- set target_members\ \ = speaker_groups.items() | selectattr('0', 'in', entities) | map(attribute='1')\ \ | sum(start=[]) %} {%- set entities = (entities + target_members) | reject('in',\ \ speaker_group_list) | unique | list %} {{ entities | reject('in', active)\ \ | list | count > 0 }}\n" - alias: Send actions using Google Home Resume script service: script.turn_on target: entity_id: script.google_home_resume data: variables: start_time: '{{ start_time }}' automation: true target_list: '{{ target_list }}' player_data: '{{ player_data }}' - id: '1699583739347' alias: 'Switch: Bedroom All Lights Off' description: Long Press Off Button trigger: - device_id: 3f330cd2e69e8ee831d5c5f0ab4bc433 domain: hue platform: device type: long_press subtype: 4 unique_id: 96d604ca-c2a4-4d4f-84f2-dbc6728ae2ae - device_id: c0fe949098f7ff63239d22535cf3240a domain: hue platform: device type: long_press subtype: 4 unique_id: bce336b1-6bc2-4a46-bdd5-1c7bf7bbfd13 condition: [] action: - service: light.turn_off data: transition: 5 target: null entity_id: light.all_lights mode: single - id: '1699583900858' alias: 'Switch: Bedroom All Lights On' description: Long Press On Button trigger: - device_id: 3f330cd2e69e8ee831d5c5f0ab4bc433 domain: hue platform: device type: long_press subtype: 1 unique_id: b21ca135-d892-465c-91f0-934426a4a5c9 condition: [] action: - service: light.turn_on data: transition: 60 color_temp: 228 brightness_pct: 100 target: entity_id: light.all_lights mode: single - id: '1699584786811' alias: 'Switch: Bedroom Lights On' description: Short Press On Button trigger: - device_id: 3f330cd2e69e8ee831d5c5f0ab4bc433 domain: hue platform: device type: short_release subtype: 1 unique_id: b21ca135-d892-465c-91f0-934426a4a5c9 condition: [] action: - data: transition: 5 color_temp: 234 brightness_pct: 100 target: device_id: - 3e85e140da7932a78fa8c0c855488192 - 0df99c2f064682cb887bdbc6004b11ff - 4f72c3af81e2dbfec9b42c8daa27bff6 - e2863f42283465b7f5d3f51bdbf80ca2 action: light.turn_on mode: single - id: '1699584786811' alias: 'Switch: Bedroom Lights On' description: Short Press On Button trigger: - device_id: 3f330cd2e69e8ee831d5c5f0ab4bc433 domain: hue platform: device type: short_release subtype: 1 unique_id: b21ca135-d892-465c-91f0-934426a4a5c9 condition: [] action: - data: transition: 5 color_temp: 234 brightness_pct: 100 target: device_id: - 3e85e140da7932a78fa8c0c855488192 - 0df99c2f064682cb887bdbc6004b11ff - 4f72c3af81e2dbfec9b42c8daa27bff6 - e2863f42283465b7f5d3f51bdbf80ca2 action: light.turn_on mode: single - id: '1699584906064' alias: 'Switch: Bedroom Lights Off' description: Short Press Off Button trigger: - device_id: 3f330cd2e69e8ee831d5c5f0ab4bc433 domain: hue platform: device type: short_release subtype: 4 unique_id: 96d604ca-c2a4-4d4f-84f2-dbc6728ae2ae condition: [] action: - data: transition: 5 target: device_id: - 3e85e140da7932a78fa8c0c855488192 - 0df99c2f064682cb887bdbc6004b11ff - 4f72c3af81e2dbfec9b42c8daa27bff6 - e2863f42283465b7f5d3f51bdbf80ca2 action: light.turn_off mode: single - id: '1699590281953' alias: 'Switch: Downstairs Lights Off' description: Short Press Off Button trigger: - device_id: c0fe949098f7ff63239d22535cf3240a domain: hue platform: device type: short_release subtype: 4 unique_id: bce336b1-6bc2-4a46-bdd5-1c7bf7bbfd13 condition: [] action: - service: light.turn_off data: transition: 5 target: device_id: - ae9a7a6ecc1a78fb729248e254f52b32 - 2fbfe2a1a69c726b59f2876e08c597f9 - 04b3402eedc91e13a89c8d108bc7fd56 - 1e2569baf7100aa8803bea93d7c70707 - 4285466a8f1c5d3a42b2db310dff1f69 - 303d1584166e2c7c7de70d806228e855 mode: single - id: '1699590566951' alias: 'Switch: Downstairs Lights On' description: Short Press On Button trigger: - device_id: c0fe949098f7ff63239d22535cf3240a domain: hue platform: device type: short_release subtype: 1 unique_id: 28d403aa-6339-4a1e-a63f-7f0e98dbccf0 condition: [] action: - service: light.turn_on data: color_temp: 412 brightness_pct: 100 transition: 15 target: device_id: - ae9a7a6ecc1a78fb729248e254f52b32 - 2fbfe2a1a69c726b59f2876e08c597f9 - 04b3402eedc91e13a89c8d108bc7fd56 - 4285466a8f1c5d3a42b2db310dff1f69 - 303d1584166e2c7c7de70d806228e855 - 1e2569baf7100aa8803bea93d7c70707 mode: single - id: '1727766777846' alias: Toggle Sleep Sensor description: Turns someone sleeping input boolean on and off trigger: - device_id: 3f330cd2e69e8ee831d5c5f0ab4bc433 domain: hue platform: device type: long_press subtype: 3 unique_id: b6bc9eb5-6ddc-45d4-a74e-85261136851d condition: [] action: - action: input_boolean.toggle target: entity_id: input_boolean.someone_sleeping data: {} mode: single - alias: Auto populate Hue group input select id: Auto populate Hue group input select mode: restart trigger: platform: event event_type: delayed_homeassistant_start action: service: input_select.set_options target: entity_id: input_select.hue_group data: options: "{{states.light\n |selectattr('attributes.is_hue_group','eq',true)\n\ \ |map(attribute='name')|list}}\n" - alias: Auto populate Hue dynamic scene input select id: Auto populate Hue dynamic scene input select mode: restart trigger: - platform: event event_type: delayed_homeassistant_start - platform: state entity_id: input_select.hue_group action: service: input_select.set_options target: entity_id: input_select.hue_dynamic_scene data: options: "{% set hue_group = states('input_select.hue_group') %} {{states.scene\n\ \ |selectattr('attributes.group_name','eq',hue_group)\n |selectattr('attributes.is_dynamic','eq',true)\n\ \ |map(attribute='name')|list}}\n" - id: '1710545712946' alias: Turn Off Lights on No Motion description: Turns off lights in various areas when no motion is detected, with room-specific delays. trigger: - platform: state entity_id: binary_sensor.bedroom_motion_sensor to: 'off' for: 00:{{ '%02d' | format(states('input_number.bedroom_no_motion_delay') | int) }}:00 id: bedroom_no_motion - platform: state entity_id: binary_sensor.kitchen_motion_sensor to: 'off' for: 00:{{ '%02d' | format(states('input_number.kitchen_no_motion_delay') | int) }}:00 id: kitchen_no_motion - platform: state entity_id: binary_sensor.stair_motion_sensor to: 'off' for: 00:{{ '%02d' | format(states('input_number.stairs_no_motion_delay') | int) }}:00 id: stairs_no_motion - platform: state entity_id: binary_sensor.media_room_motion_sensor to: 'off' for: 00:{{ '%02d' | format(states('input_number.media_room_no_motion_delay') | int) }}:00 id: media_room_no_motion - platform: state entity_id: binary_sensor.front_door_contact to: 'off' for: 00:{{ '%02d' | format(states('input_number.downstairs_no_motion_delay') | int) }}:00 id: front_door_closed - platform: state entity_id: binary_sensor.back_door_contact to: 'off' for: 00:{{ '%02d' | format(states('input_number.downstairs_no_motion_delay') | int) }}:00 id: back_door_closed condition: - condition: state entity_id: input_boolean.sync_music_lights state: 'off' - condition: state entity_id: input_boolean.theme_mode state: 'off' action: - choose: - conditions: - condition: trigger id: bedroom_no_motion sequence: - service: light.turn_off entity_id: - light.bedroom_overhead_light - light.bed_light_strip_1 - light.bed_light_strip_2 - light.floorlamp - light.media_room_overhead_light - conditions: - condition: trigger id: kitchen_no_motion sequence: - service: light.turn_off entity_id: - light.kitchen_overhead_1 - light.kitchen_overhead_2 - light.laundry_room_overhead_1 - light.laundry_room_overhead_2 - conditions: - condition: trigger id: stairs_no_motion sequence: - service: light.turn_off entity_id: - light.stairs_light_strip - light.stairs_overhead_light - conditions: - condition: trigger id: media_room_no_motion sequence: - service: light.turn_off entity_id: - light.media_room_overhead_light - conditions: - condition: trigger id: front_door_closed sequence: - service: light.turn_off entity_id: - light.living_room_light - light.dining_room_light - conditions: - condition: trigger id: back_door_closed sequence: - service: light.turn_off entity_id: - light.kitchen_overhead_1 - light.kitchen_overhead_2 - light.laundry_room_overhead_1 - light.laundry_room_overhead_2 mode: parallel max: 10 - id: '1710639809027' alias: Turn On Lights on Motion description: Turns on lights in various areas when no motion is detected, with room-specific delays. trigger: - platform: state entity_id: binary_sensor.bedroom_motion_sensor to: 'on' for: 00:00:{{ '%02d' | format(states('input_number.bedroom_motion_delay') | int) }} id: bedroom_motion - platform: state entity_id: binary_sensor.kitchen_motion_sensor to: 'on' for: 00:00:{{ '%02d' | format(states('input_number.kitchen_motion_delay') | int) }} id: kitchen_motion - platform: state entity_id: binary_sensor.media_room_motion_sensor to: 'on' for: 00:00:{{ '%02d' | format(states('input_number.media_room_motion_delay') | int) }} id: media_room_motion - platform: state entity_id: binary_sensor.stair_motion_sensor to: 'on' for: 00:00:{{ '%02d' | format(states('input_number.stairs_motion_delay') | int) }} id: stairs_motion - platform: state entity_id: binary_sensor.front_door_contact to: 'on' for: 00:00:{{ '%02d' | format(states('input_number.downstairs_motion_delay')| int) }} id: front_door_opened - platform: state entity_id: binary_sensor.back_door_contact to: 'on' for: 00:00:{{ '%02d' | format(states('input_number.downstairs_motion_delay')| int) }} id: back_door_opened condition: - condition: state entity_id: input_boolean.sync_music_lights state: 'off' - condition: state entity_id: input_boolean.theme_mode state: 'off' action: - choose: - conditions: - condition: trigger id: kitchen_motion sequence: - choose: - conditions: - condition: state state: 'on' entity_id: input_boolean.enable_color_mode sequence: - service: light.turn_on entity_id: - light.kitchen_overhead_1 - light.kitchen_overhead_2 - light.laundry_room_overhead_1 - light.laundry_room_overhead_2 data: brightness_pct: '{{ light_brightness }}' color_name: '{{ light_color }}' default: - service: light.turn_on entity_id: - light.kitchen_overhead_1 - light.kitchen_overhead_2 - light.laundry_room_overhead_1 - light.laundry_room_overhead_2 data: brightness_pct: '{{ light_brightness }}' kelvin: '{{ light_kelvin }}' - conditions: - condition: trigger id: stairs_motion sequence: - choose: - conditions: - condition: state state: 'on' entity_id: input_boolean.enable_color_mode sequence: - service: light.turn_ON entity_id: - light.stairs_overhead_light - light.stairs_light_strip data: brightness_pct: '{{ light_brightness }}' color_name: '{{ light_color }}' default: - service: light.turn_ON entity_id: - light.stairs_overhead_light - light.stairs_light_strip data: brightness_pct: '{{ light_brightness }}' kelvin: '{{ light_kelvin }}' - conditions: - condition: trigger id: bedroom_motion sequence: - choose: - conditions: - condition: state entity_id: input_boolean.someone_sleeping state: 'on' sequence: - choose: - conditions: - condition: state state: 'on' entity_id: input_boolean.enable_color_mode sequence: - service: light.turn_on entity_id: - light.bed_light_strip_1 - light.bed_light_strip_2 data: color_name: '{{ light_color }}' brightness_pct: 10 default: - service: light.turn_on entity_id: - light.bed_light_strip_1 - light.bed_light_strip_2 data: kelvin: '{{ light_kelvin }}' brightness_pct: 10 - conditions: - condition: and conditions: - condition: state state: 'on' entity_id: input_boolean.enable_color_mode - condition: state entity_id: input_boolean.someone_sleeping state: 'off' sequence: - service: light.turn_on entity_id: - light.floorlamp - light.bedroom_overhead_light - light.bed_light_strip_1 - light.bed_light_strip_2 data: color_name: '{{ light_color }}' brightness_pct: 10 default: - service: light.turn_on entity_id: - light.floorlamp - light.bedroom_overhead_light - light.bed_light_strip_1 - light.bed_light_strip_2 data: brightness_pct: '{{ light_brightness }}' kelvin: '{{ light_kelvin }}' - conditions: - condition: trigger id: media_room_motion sequence: - choose: - conditions: - condition: state state: 'on' entity_id: input_boolean.enable_color_mode sequence: - service: light.turn_ON entity_id: - light.media_room_overhead_light data: brightness_pct: '{{ light_brightness }}' color_name: '{{ light_color }}' default: - service: light.turn_ON entity_id: - light.media_room_overhead_light data: brightness_pct: '{{ light_brightness }}' kelvin: '{{ light_kelvin }}' - conditions: - condition: trigger id: front_door_opened sequence: - choose: - conditions: - condition: state state: 'on' entity_id: input_boolean.enable_color_mode sequence: - service: light.turn_on entity_id: - light.living_room_light - light.dining_room_light data: brightness_pct: '{{ light_brightness }}' color_name: '{{ light_color }}' default: - service: light.turn_on entity_id: - light.living_room_light - light.dining_room_light data: brightness_pct: '{{ light_brightness }}' kelvin: '{{ light_kelvin }}' - conditions: - condition: trigger id: back_door_opened sequence: - choose: - conditions: - condition: state state: 'on' entity_id: input_boolean.enable_color_mode sequence: - service: light.turn_ON entity_id: - light.kitchen_overhead_1 - light.kitchen_overhead_2 - light.laundry_room_overhead_1 - light.laundry_room_overhead_2 data: brightness_pct: '{{ light_brightness }}' color_name: '{{ light_color }}' default: - service: light.turn_ON entity_id: - light.kitchen_overhead_1 - light.kitchen_overhead_2 - light.laundry_room_overhead_1 - light.laundry_room_overhead_2 data: brightness_pct: '{{ light_brightness }}' kelvin: '{{ light_kelvin }}' variables: light_brightness: '{{ states(''input_number.home_light_brightness'') | int }}' light_color: '{{ states(''input_select.light_color'') }}' light_kelvin: '{{ states(''input_select.light_kelvin'') }}' mode: single - alias: Adjust Brightness of On Lights Except Screens description: Adjusts the brightness of lights that are currently on (except screen lights) when input_number for brightness changes trigger: - platform: state entity_id: input_number.home_light_brightness action: - service: light.turn_on data: brightness_pct: '{{ states(''input_number.home_light_brightness'') | int }}' target: entity_id: "{% set ns = namespace(lights=[]) %} {% for light in states.light\ \ %}\n {% if light.state == 'on' and '_screen' not in light.entity_id %}\n\ \ {% set ns.lights = ns.lights + [ light.entity_id ] %}\n {% endif %}\n\ {% endfor %} {{ ns.lights }}\n" mode: parallel id: 1cdcc41b990443baad193c766e929fa4 - id: cc5b7c3fd79a4d5ea054d706af05c445 alias: Set Light to Selected Color trigger: - platform: state entity_id: input_select.light_color action: - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: - input_boolean.normal_lights - input_boolean.sync_music_lights - input_boolean.theme_mode - service: input_boolean.turn_on target: entity_id: input_boolean.enable_color_mode data: {} - service: light.turn_on target: entity_id: light.all_lights data: color_name: '{{ states(''input_select.light_color'') }}' mode: parallel - id: '1721875125353' alias: Outdoor Night Light description: '' trigger: - platform: state entity_id: - binary_sensor.back_door_contact from: 'off' to: 'on' condition: - condition: sun after: sunset action: - service: switch.toggle data: {} target: device_id: 985b699e0a29cb7a1bcc100865344644 - delay: hours: 0 minutes: 15 seconds: 0 milliseconds: 0 - service: switch.toggle metadata: {} data: {} target: device_id: 985b699e0a29cb7a1bcc100865344644 mode: single - id: '1711417104881' alias: Normal Light On description: '' trigger: - platform: state entity_id: - input_boolean.normal_lights to: 'on' from: 'off' condition: [] action: - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: - input_boolean.enable_color_mode - input_boolean.sync_music_lights - input_boolean.theme_mode mode: single - id: '1710456822979' alias: Theme is off description: '' trigger: - platform: state entity_id: - input_boolean.theme_mode from: 'on' to: 'off' condition: [] action: - service: input_boolean.turn_on data: {} target: entity_id: input_boolean.normal_lights mode: single - id: '1711150276270' alias: Set Lights to Selected Temperature description: '' trigger: - platform: state entity_id: - input_select.light_kelvin condition: [] action: - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: - input_boolean.enable_color_mode - input_boolean.theme_mode - input_boolean.sync_music_lights - service: input_boolean.turn_on data: {} target: entity_id: input_boolean.normal_lights - service: light.turn_on target: entity_id: light.all_lights data: kelvin: '{{ light_kelvin }}' variables: light_kelvin: '{{ states(''input_select.light_kelvin'') }}' mode: parallel - id: '1710103968772' alias: Sync Sengled with Hue - Dynamic Palette description: Mimic Hue dynamic scene on Sengled lights trigger: - platform: template value_template: '{{ state_attr(''light.home'', ''dynamics'') }}' enabled: true action: - service: light.turn_on data: entity_id: - light.bed_light_strip_1 - light.laundry_room_overhead_1 brightness: '{{ state_attr(''light.media_room_overhead_light'', ''brightness'')}}' rgb_color: '{{ state_attr(''light.media_room_overhead_light'', ''rgb_color'') }}' - service: light.turn_on data: entity_id: - light.stairs_light_strip - light.kitchen_overhead_1 - light.living_room_light brightness: '{{ state_attr(''light.stairs_overhead_light'', ''brightness'') }}' rgb_color: '{{ state_attr(''light.stairs_overhead_light'', ''rgb_color'') }}' - service: light.turn_on data: entity_id: - light.kitchen_overhead_2 - light.laundry_room_overhead_2 brightness: '{{ state_attr(''light.bedroom_overhead_light'', ''brightness'') }}' rgb_color: '{{ state_attr(''light.bedroom_overhead_light'', ''rgb_color'') }}' - service: light.turn_on data: entity_id: - light.dining_room_light - light.bed_light_strip_2 brightness: '{{ state_attr(''light.floorlamp'', ''brightness'') }}' rgb_color: '{{ state_attr(''light.floorlamp'', ''rgb_color'') }}' mode: single max: 10 - id: '1710456631644' alias: Persistent Theme Lights description: '' trigger: - platform: state entity_id: - binary_sensor.hue_groups_dynamic_scening from: 'off' to: 'on' condition: [] action: - service: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.theme_mode mode: single - id: '1710456739075' alias: Theme Is Running description: '' trigger: - platform: state entity_id: - input_boolean.theme_mode from: null to: 'on' condition: [] action: - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: - input_boolean.normal_lights - input_boolean.enable_color_mode - input_boolean.sync_music_lights mode: single - id: '1711221914901' alias: Setup Evening Lights description: '' trigger: - platform: state entity_id: - input_select.time_of_day to: Evening condition: [] action: - service: input_number.set_value metadata: {} data: value: 5 target: entity_id: input_number.bedroom_no_motion_delay - service: input_number.set_value metadata: {} data: value: 10 target: entity_id: input_number.kitchen_no_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.downstairs_no_motion_delay - service: input_number.set_value metadata: {} data: value: 2 target: entity_id: input_number.stairs_no_motion_delay - service: input_number.set_value metadata: {} data: value: 10 target: entity_id: input_number.media_room_no_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.bedroom_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.downstairs_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.kitchen_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.stairs_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.media_room_motion_delay mode: single - id: '1711221871324' alias: Setup Afternoon Lights description: '' trigger: - platform: state entity_id: - input_select.time_of_day to: Afternoon condition: [] action: - service: input_number.set_value metadata: {} data: value: 5 target: entity_id: input_number.bedroom_no_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.bedroom_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.downstairs_motion_delay - service: input_number.set_value metadata: {} data: value: 15 target: entity_id: input_number.downstairs_no_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.kitchen_motion_delay - service: input_number.set_value metadata: {} data: value: 15 target: entity_id: input_number.kitchen_no_motion_delay - service: input_number.set_value metadata: {} data: value: 5 target: entity_id: input_number.stairs_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.stairs_no_motion_delay - service: input_number.set_value metadata: {} data: value: 30 target: entity_id: input_number.media_room_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.media_room_no_motion_delay mode: single - id: '1711155740786' alias: Setup Morning Lights description: '' trigger: - platform: state entity_id: - input_select.time_of_day to: Morning condition: [] action: - service: input_number.set_value metadata: {} data: value: 15 target: entity_id: input_number.bedroom_no_motion_delay - service: input_number.set_value metadata: {} data: value: 30 target: entity_id: input_number.downstairs_no_motion_delay - service: input_number.set_value metadata: {} data: value: 15 target: entity_id: input_number.kitchen_no_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.stairs_no_motion_delay - service: input_number.set_value metadata: {} data: value: 10 target: entity_id: input_number.media_room_no_motion_delay - service: input_number.set_value metadata: {} data: value: 30 target: entity_id: input_number.bedroom_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.downstairs_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.kitchen_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.stairs_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.media_room_motion_delay mode: single - id: '1711155393194' alias: Setup Late Night Lights description: '' trigger: - platform: state entity_id: - input_select.time_of_day to: Late Night condition: [] action: - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.bedroom_no_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.downstairs_no_motion_delay - service: input_number.set_value metadata: {} data: value: 10 target: entity_id: input_number.kitchen_no_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.media_room_no_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.stairs_no_motion_delay - service: input_number.set_value metadata: {} data: value: 30 target: entity_id: input_number.bedroom_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.downstairs_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.kitchen_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.stairs_motion_delay - service: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.media_room_motion_delay mode: single - id: '1710642496243' alias: Update Time of Day description: Automatically updates the 'time_of_day' input select based on the current time and predefined start times. trigger: - platform: time at: 00:00:01 - platform: time at: input_datetime.morning_start - platform: time at: input_datetime.afternoon_start - platform: time at: input_datetime.evening_start - platform: time at: input_datetime.late_night_start condition: [] action: - choose: - conditions: - condition: template value_template: '{{ now().time() >= strptime(states(''input_datetime.morning_start''), ''%H:%M:%S'').time() and now().time() < strptime(states(''input_datetime.afternoon_start''), ''%H:%M:%S'').time() }}' sequence: - service: input_select.select_option data: entity_id: input_select.time_of_day option: Morning - conditions: - condition: template value_template: '{{ now().time() >= strptime(states(''input_datetime.afternoon_start''), ''%H:%M:%S'').time() and now().time() < strptime(states(''input_datetime.evening_start''), ''%H:%M:%S'').time() }}' sequence: - service: input_select.select_option data: entity_id: input_select.time_of_day option: Afternoon - conditions: - condition: template value_template: '{{ now().time() >= strptime(states(''input_datetime.evening_start''), ''%H:%M:%S'').time() and now().time() < strptime(states(''input_datetime.late_night_start''), ''%H:%M:%S'').time() }}' sequence: - service: input_select.select_option data: entity_id: input_select.time_of_day option: Evening - conditions: - condition: template value_template: '{{ now().time() >= strptime(states(''input_datetime.late_night_start''), ''%H:%M:%S'').time() or now().time() < strptime(states(''input_datetime.morning_start''), ''%H:%M:%S'').time() }}' sequence: - service: input_select.select_option data: entity_id: input_select.time_of_day option: Late Night mode: single - id: '1707603165027' alias: Play Clock Sound on the Half-Hour description: Plays a clock sound every half-hour when the sun is up trigger: - platform: time_pattern minutes: '30' condition: - condition: state entity_id: sun.sun state: above_horizon action: - service: media_player.play_media target: entity_id: media_player.home data: media_content_id: media-source://media_source/local/antique-wood-chime-bell-ring.wav media_content_type: music - id: '1709497089270' alias: Play Clock Sound on the Hour description: Plays a clock sound every hour when the sun is up and not playing frog sounds trigger: - platform: time_pattern minutes: '0' condition: - condition: state entity_id: sun.sun state: above_horizon - condition: state entity_id: input_boolean.frog_sounds_today state: 'off' action: - service: media_player.play_media target: entity_id: media_player.home data: media_content_id: media-source://media_source/local/antique-wood-chime-bell-ring.wav media_content_type: music mode: single - id: '1709228035694' alias: Random Frog Chime During Daylight Hours description: Plays a random frog call every hour during daylight hours on randomly selected days. trigger: - platform: time_pattern hours: '01' condition: - condition: state entity_id: sun.sun state: above_horizon - condition: state entity_id: input_boolean.frog_sounds_today state: 'on' enabled: true action: - variables: chosen_frog: '{{ [''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/barking-treefrog-chorus.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/bird-voiced-treefrog.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/bronze-frog.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/carpenter-frog.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2020/11/southern-gray-treefrog-mating-call.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2020/11/southern-gray-treefrog-rain-call.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/narrow-mouthed-toad.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/florida-gopher-frog.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/green-treefrog.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/green-treefrog-chorus.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/green-treefrog-rain-call.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/little-grass-frog.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/little-grass-frog-rhythmic.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/oak-toad-breeding-call.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/ornate-chorus-frog.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/pig-frog.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/pinewoods-treefrog.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/pinewoods-treefrog-chorus.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/florida-chorus-frog.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/southern-cricket-frog.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/southern-cricket-frog-chorus.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/southern-leopard-frog-chorus.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/southern-toad-breeding-chorus.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/spring-peeper.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2020/11/spring-peeper-chorus-mating-call.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/squirrel-treefrog.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/squirrel-treefrog-chorus.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/group-chorus-spring.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/group-chorus-summer-july.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/group-chorus-summer-august.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2018/11/group-chorus-winter.mp3'', ''https://www.floridamuseum.ufl.edu/wp-content/uploads/sites/108/2020/10/Cuban-treefrog-calls_03.mp3'' ][(range(0, 32) | random)] }} ' - service: media_player.volume_set data: volume_level: 1 target: entity_id: media_player.bedroom_speaker - service: media_player.play_media data: entity_id: media_player.bedroom_speaker media_content_id: '{{ chosen_frog }}' media_content_type: music - service: media_player.volume_set data: volume_level: 1 target: entity_id: media_player.kitchen_speaker - service: media_player.play_media data: entity_id: media_player.kitchen_speaker media_content_id: '{{ chosen_frog }}' media_content_type: music mode: single - id: '1709326067269' alias: Determine Daily Frog Sound Playback description: This automation will run the script just after midnight each day to randomly determine if the frog sounds should play that day. trigger: - platform: time at: 00:01:00 action: - service: script.1709327333198 data: {}