diff --git a/.HA_VERSION b/.HA_VERSION index 22851916f..11c0ecbdd 100644 --- a/.HA_VERSION +++ b/.HA_VERSION @@ -1 +1 @@ -2024.11.3 \ No newline at end of file +2024.12.0b4 \ No newline at end of file diff --git a/automations/alarm/alarm_bypassed_sensor.yaml b/automations/alarm/alarm_bypassed_sensor.yaml index 32cae516d..974efce55 100644 --- a/automations/alarm/alarm_bypassed_sensor.yaml +++ b/automations/alarm/alarm_bypassed_sensor.yaml @@ -38,7 +38,7 @@ data: tag: bypassed_sensor group: Alarm - channel: Alert + channel: Urgent persistant: true sticky: true notification_icon: "{{ state_attr('binary_sensor.alarm_bypassed_sensor_alert', 'icon') }}" diff --git a/automations/alarm/alarm_code_error.yaml b/automations/alarm/alarm_code_error.yaml index 1925f6545..2fe0f47bd 100644 --- a/automations/alarm/alarm_code_error.yaml +++ b/automations/alarm/alarm_code_error.yaml @@ -36,7 +36,7 @@ data: tag: alarm_code_error group: Alarm - channel: Alert + channel: Urgent notification_icon: mdi:shield-alert icon_url: !secret ALERT_ICON ledColor: !secret SEVERE_COLOR diff --git a/automations/alarm/alarm_open_sensor.yaml b/automations/alarm/alarm_open_sensor.yaml index 924ec8322..4a3b7ee54 100644 --- a/automations/alarm/alarm_open_sensor.yaml +++ b/automations/alarm/alarm_open_sensor.yaml @@ -74,7 +74,7 @@ data: tag: open_sensor group: Alarm - channel: Alert + channel: Urgent persistant: true sticky: true notification_icon: "{{ state_attr('binary_sensor.alarm_open_sensor_alert', 'icon') }}" diff --git a/automations/alarm/alarm_triggered_notification.yaml b/automations/alarm/alarm_triggered_notification.yaml index 3bd1a2570..989de19da 100644 --- a/automations/alarm/alarm_triggered_notification.yaml +++ b/automations/alarm/alarm_triggered_notification.yaml @@ -323,7 +323,7 @@ data: tag: alarm_pending group: Alarm - channel: Alert + channel: Urgent persistent: true sticky: true chronometer: true diff --git a/automations/camera/camera_object_detected.yaml b/automations/camera/camera_object_detected.yaml index 7e2f98202..b096a0432 100644 --- a/automations/camera/camera_object_detected.yaml +++ b/automations/camera/camera_object_detected.yaml @@ -100,7 +100,7 @@ data: tag: "{{ id }}" group: Camera - channel: Alert + channel: Camera visibility: public when: "{{ start_time }}" notification_icon: mdi:cctv diff --git a/automations/climate/climate_fireplace.yaml b/automations/climate/climate_fireplace.yaml index 40403644c..756318a5c 100644 --- a/automations/climate/climate_fireplace.yaml +++ b/automations/climate/climate_fireplace.yaml @@ -39,7 +39,7 @@ data: tag: fireplace_emergency_on group: Alert - channel: Alert + channel: Urgent notification_icon: mdi:fireplace icon_url: !secret FIREPLACE_ICON ledColor: !secret WARNING_COLOR @@ -138,7 +138,7 @@ data: tag: fireplace_off group: Alert - channel: Alert + channel: Urgent visibility: public notification_icon: mdi:fireplace icon_url: !secret FIREPLACE_ICON diff --git a/automations/climate/climate_temperature_alert.yaml b/automations/climate/climate_temperature_alert.yaml index dbd88f025..85d00c8dd 100644 --- a/automations/climate/climate_temperature_alert.yaml +++ b/automations/climate/climate_temperature_alert.yaml @@ -48,7 +48,7 @@ data: tag: emergency_heat group: Alert - channel: Alert + channel: Urgent notification_icon: mdi:thermostat icon_url: !secret LOW_TEMP_ICON ledColor: !secret WARNING_COLOR diff --git a/automations/hass/hass_log_error.yaml b/automations/hass/hass_log_error.yaml index bb31bfc7d..231bd531b 100644 --- a/automations/hass/hass_log_error.yaml +++ b/automations/hass/hass_log_error.yaml @@ -19,7 +19,9 @@ event_type: system_log_event event_data: level: ERROR - conditions: "{{ error != none }}" + conditions: + - condition: template + value_template: "{{ error != none }}" actions: - action: browser_mod.notification data: diff --git a/automations/media/alarm_clock/alarm_clock_turn_on.yaml b/automations/media/alarm_clock/alarm_clock_turn_on.yaml index 7fa1caf90..0583670c9 100644 --- a/automations/media/alarm_clock/alarm_clock_turn_on.yaml +++ b/automations/media/alarm_clock/alarm_clock_turn_on.yaml @@ -21,6 +21,7 @@ conditions: - condition: template value_template: "{{ is_state('switch.alarm_clock_' ~ trigger.id, 'off') }}" + - condition: template value_template: "{{ iif(trigger.id == 'nap', is_state('input_boolean.alarm_clock_nap', 'on'), true) }}" actions: @@ -30,6 +31,24 @@ target: entity_id: input_boolean.alarm_clock_skip_next else: - - action: switch.turn_on - target: - entity_id: "switch.alarm_clock_{{ trigger.id }}" + - if: + - condition: state #TEST + entity_id: input_select.occupancy_mode + state: + - Home + - Guest + - Night + + - condition: template #TEST + value_template: "{{ iif(trigger.id == 'wake', is_state('input_select.occupancy_mode', 'Night'), true) }}" + then: + - action: switch.turn_on + target: + entity_id: "switch.alarm_clock_{{ trigger.id }}" + else: + - action: notify.jason #TEST + data: + title: "Alarm Clock" + message: "Alarm clock scheduled but nobody home!" + + diff --git a/automations/spa/spa_temperature_selection.yaml b/automations/spa/spa_temperature_selection.yaml index 4fbfc71be..dfd53172b 100644 --- a/automations/spa/spa_temperature_selection.yaml +++ b/automations/spa/spa_temperature_selection.yaml @@ -25,28 +25,32 @@ then: - repeat: # repeats in case balboa is disconnected sequence: - - action: switch.turn_off + - action: select.select_option target: - entity_id: switch.spa_temp_range + entity_id: select.spa_temperature_range + data: + option: Low - - wait_template: "{{ is_state('switch.spa_temp_range', 'off') }}" + - wait_template: "{{ is_state('select.spa_temperature_range', 'Low') }}" timeout: minutes: 30 until: - condition: state - entity_id: switch.spa_temp_range - state: "off" + entity_id: select.spa_temperature_range + state: Low else: - repeat: # repeats in case balboa is disconnected sequence: - - action: switch.turn_on + - action: select.select_option target: - entity_id: switch.spa_temp_range + entity_id: select.spa_temperature_range + data: + option: High - - wait_template: "{{ is_state('switch.spa_temp_range', 'on') }}" + - wait_template: "{{ is_state('select.spa_temperature_range', 'High') }}" timeout: minutes: 30 until: - condition: state - entity_id: switch.spa_temp_range - state: "on" + entity_id: select.spa_temperature_range + state: High diff --git a/automations/zwave/zwave_keypress_events.yaml b/automations/zwave/zwave_keypress_events.yaml index 0519ab9fa..d06707e26 100644 --- a/automations/zwave/zwave_keypress_events.yaml +++ b/automations/zwave/zwave_keypress_events.yaml @@ -136,7 +136,7 @@ sequence: - action: input_boolean.toggle target: - entity_id: input_boolean.charlie_home #IDEA use tracker + entity_id: input_boolean.charlie_home #NEXT use tracker - action: script.inovelli_led_control data: diff --git a/custom_templates/door.jinja b/custom_templates/door.jinja index 7cf76c2a7..c9b9a644d 100644 --- a/custom_templates/door.jinja +++ b/custom_templates/door.jinja @@ -5,7 +5,7 @@ {%- endif %} {%- endmacro -%} -{%- macro door_icon_color(entity) -%} +{%- macro door_color(entity) -%} {%- set alert_entity = entity ~ '_open_alert' %} {%- set open = state_attr('alarm_control_panel.master', 'open_sensors') if state_attr('alarm_control_panel.master', 'open_sensors') != none else '' %} diff --git a/custom_templates/lock.jinja b/custom_templates/lock.jinja index 73dccf278..25397c076 100644 --- a/custom_templates/lock.jinja +++ b/custom_templates/lock.jinja @@ -12,7 +12,7 @@ {%- endif %} {%- endmacro -%} -{%- macro lock_icon_color(entity) -%} +{%- macro lock_color(entity) -%} {%- if not has_value(entity) %} grey {%- elif is_state(entity, 'unlocked') %} yellow {%- else %} white diff --git a/custom_templates/style.jinja b/custom_templates/style.jinja index ed942d635..5e017be68 100644 --- a/custom_templates/style.jinja +++ b/custom_templates/style.jinja @@ -83,7 +83,7 @@ div.mdc-dialog__surface { } {%- endmacro -%} -{%- macro status_alert_style(value, base, minor, warning, severe, critical) -%} +{%- macro status_alert_color(value, base, minor, warning, severe, critical) -%} :host { --state-alert-on-color: {%- set value = value | float(-1) -%} diff --git a/custom_templates/weather.jinja b/custom_templates/weather.jinja index a0a294b82..a687e07c8 100644 --- a/custom_templates/weather.jinja +++ b/custom_templates/weather.jinja @@ -18,6 +18,186 @@ The storm is {{ iif(dist > 0, {%- endif -%} {%- endmacro -%} +{%- macro condition_icon(condition) -%} + {%- if condition == 'sunny' %} mdi:weather-sunny + {%- elif condition == 'clear-night' %} mdi:weather-night + {%- elif condition == 'fog' %} mdi:weather-fog + {%- elif condition == 'partlycloudy' %} mdi:weather-partly-cloudy + {%- elif condition == 'cloudy' %} mdi:weather-cloudy + {%- elif condition == 'rainy' %} mdi:weather-rainy + {%- elif condition == 'pouring' %} mdi:weather-pouring + {%- elif condition == 'snowy' %} mdi:weather-snowy + {%- elif condition == 'hail' %} mdi:weather-hail + {%- elif condition == 'lighting' %} mdi:weather-lightning + {%- elif condition == 'lightning-rainy' %} mdi:weather-lightning-rainy + {%- elif condition == 'snowy-rainy' %} mdi:weather-snowy-rainy + {%- elif condition == 'windy' %} mdi:weather-windy + {%- elif condition == 'windy-variant' %} mdi:weather-windy-variant + {%- elif condition == 'exceptional' %} mdi:alert + {%- else %} mdi:eye + {%- endif -%} +{%- endmacro -%} + +{%- macro condition_color(condition) -%} +:host { + --paper-item-icon-color: + {%- if condition == 'sunny' %} rgb(232, 235, 87) + {%- elif condition == 'clear-night' %} rgb(47, 19, 92) + {%- elif condition == 'fog' %} rgb(113, 99, 128) + {%- elif condition == 'partlycloudy' %} rgb(173, 186, 196) + {%- elif condition == 'cloudy' %} rgb(79, 80, 82) + {%- elif condition == 'rainy' %} rgb(4, 61, 176) + {%- elif condition == 'pouring' %} rgb(2, 33, 94) + {%- elif condition == 'snowy' %} rgb(255, 255, 255) + {%- elif condition == 'hail' %} rgb(172, 82, 196) + {%- elif condition == 'lighting' %} rgb(100, 100, 100) + {%- elif condition == 'lightning-rainy' %} rgb(100, 100, 100) + {%- elif condition == 'snowy-rainy' %} rgb(82, 193, 196) + {%- elif condition == 'windy' %} rgb(61, 135, 58) + {%- elif condition == 'windy-variant' %} rgb(117, 145, 116) + {%- elif condition == 'exceptional' %} rgb(158, 27, 51) + {% else %} var(--entity-disabled-color) + {%- endif -%} + ; +} +{%- endmacro -%} + +{%- macro temp_color(temp) -%} +:host { + --paper-item-icon-color: + {%- set temp = temp | float(none) %} + {% if temp == none %} var(--entity-disabled-color) + {%- elif temp < -20 %} rgb(143, 89, 169) + {%- elif temp < -15 %} rgb(157, 219, 217) + {%- elif temp < -10 %} rgb(106, 191, 181) + {%- elif temp < -5 %} rgb(100, 166, 189) + {%- elif temp < 0 %} rgb(93, 133, 198) + {%- elif temp < 5 %} rgb(68, 125, 99) + {%- elif temp < 10 %} rgb(128, 147, 24) + {%- elif temp < 15 %} rgb(209, 212, 78) + {%- elif temp < 20 %} rgb(243, 183, 4) + {%- elif temp < 25 %} rgb(250, 223, 86) + {%- elif temp < 30 %} rgb(232, 83, 25) + {%- elif temp < 35 %} rgb(209, 54, 54) + {%- elif temp < 40 %} rgb(71, 14, 0) + {%- else %} rgb(177, 67, 45) + {%- endif %} + ; +} +{%- endmacro -%} + +{%- macro humidity_color(humidity) -%} +:host { + --paper-item-icon-color: + {%- set humidity = humidity | float(none) %} + {% if humidity == none %} var(--entity-disabled-color) + {%- elif humidity < 10 %} rgb(200, 254, 0) + {%- elif humidity < 20 %} rgb(200, 254, 0) + {%- elif humidity < 30 %} rgb(129, 254, 0) + {%- elif humidity < 40 %} rgb(58, 253, 0) + {%- elif humidity < 50 %} rgb(0, 253, 12) + {%- elif humidity < 60 %} rgb(0, 253, 82) + {%- elif humidity < 70 %} rgb(0, 253, 153) + {%- elif humidity < 80 %} rgb(0, 253, 223) + {%- elif humidity < 90 %} rgb(0, 210, 253) + {%- elif humidity < 100 %} rgb(0, 143, 219) + {%- else %} rgb(0, 70, 253) + {%- endif %} + ; +} +{%- endmacro -%} + +{%- macro pop_color(pop) -%} +:host { + --paper-item-icon-color: + {%- set pop = pop | float(none) %} + {% if pop == none %} var(--entity-disabled-color) + {%- elif pop < 10 %} var(--state-icon-color) + {%- elif pop < 20 %} rgb(163, 225, 250) + {%- elif pop < 30 %} rgb(124, 211, 253) + {%- elif pop < 40 %} rgb(81, 196, 255) + {%- elif pop < 50 %} rgb(0, 180, 255) + {%- elif pop < 60 %} rgb(0, 163, 255) + {%- elif pop < 70 %} rgb(0, 146, 252) + {%- elif pop < 80 %} rgb(0, 130, 241) + {%- elif pop < 90 %} rgb(0, 113, 233) + {%- elif pop < 100 %} rgb(0, 87, 244) + {%- else %} rgb(35, 46, 251) + {%- endif %} + ; +} +{%- endmacro -%} + +{%- macro wind_color(wind) -%} +:host { + --paper-item-icon-color: + {%- set wind = wind | float(none) %} + {% if wind == none %} var(--entity-disabled-color) + {%- elif wind == 0 %} var(--state-icon-color) + {%- elif wind < 4 %} rgb(98, 113, 183) + {%- elif wind < 11 %} rgb(57, 97, 159) + {%- elif wind < 18 %} rgb(74, 148, 169) + {%- elif wind < 25 %} rgb(77, 141, 123) + {%- elif wind < 32 %} rgb(83, 165, 83) + {%- elif wind < 40 %} rgb(53, 159, 53) + {%- elif wind < 47 %} rgb(167, 157, 81) + {%- elif wind < 54 %} rgb(159, 127, 58) + {%- elif wind < 61 %} rgb(161, 108, 92) + {%- elif wind < 68 %} rgb(129, 58, 78) + {%- elif wind < 76 %} rgb(175, 80, 136) + {%- elif wind < 86 %} rgb(117, 74, 147) + {%- else %} rgb(109, 97, 163) + {%- endif %} + ; +} +{%- endmacro -%} + +{%- macro pressure_color(pressure) -%} +:host { + --paper-item-icon-color: + {%- set pressure = pressure | float(none) %} + {% if pressure == none %} var(--entity-disabled-color) + {%- elif pressure < 900 %} rgb(8, 16, 48) + {%- elif pressure < 950 %} rgb(0, 32, 96) + {%- elif pressure < 976 %} rgb(0, 52, 146) + {%- elif pressure < 986 %} rgb(0, 90, 148) + {%- elif pressure < 995 %} rgb(0, 117, 146) + {%- elif pressure < 1002 %} rgb(26, 140, 147) + {%- elif pressure < 1007 %} rgb(103, 162, 155) + {%- elif pressure < 1011 %} rgb(155, 183, 172) + {%- elif pressure < 1013 %} rgb(182, 182, 182) + {%- elif pressure < 1015 %} rgb(176, 174, 152) + {%- elif pressure < 1019 %} rgb(167, 147, 107) + {%- elif pressure < 1024 %} rgb(163, 116, 67) + {%- elif pressure < 1030 %} rgb(159, 81, 44) + {%- elif pressure < 1038 %} rgb(142, 47, 57) + {%- elif pressure < 1046 %} rgb(111, 24, 64) + {%- else %} rgb(48, 8, 24) + {%- endif %} + ; +} +{%- endmacro -%} + +{%- macro cloud_color(cloud) -%} +:host { + --paper-item-icon-color: + {%- set cloud = cloud | float(none) %} + {% if cloud == none %} var(--entity-disabled-color) + {%- elif cloud < 10 %} rgb(148, 223, 255) + {%- elif cloud < 20 %} rgb(146, 208, 239) + {%- elif cloud < 30 %} rgb(144, 192, 223) + {%- elif cloud < 40 %} rgb(140, 179, 206) + {%- elif cloud < 50 %} rgb(136, 165, 189) + {%- elif cloud < 60 %} rgb(131, 151, 172) + {%- elif cloud < 70 %} rgb(125, 138, 155) + {%- elif cloud < 80 %} rgb(117, 125, 138) + {%- elif cloud < 90 %} rgb(109, 113, 121) + {%- else %} rgb(100, 101, 104) + {%- endif %} + ; +} +{%- endmacro -%} + {%- macro uv_risk(index) -%} {%- set index = index | float(-1) %} {%- if index < 0 %} unknown @@ -29,7 +209,7 @@ The storm is {{ iif(dist > 0, {%- endif %} {%- endmacro -%} -{%- macro uv_index_icon(index) -%} +{%- macro uv_index_color(index) -%} :host { --paper-item-icon-color: {%- set index = index | float(-1) %} @@ -44,7 +224,7 @@ The storm is {{ iif(dist > 0, } {%- endmacro -%} -{%- macro iqvia_index_icon(index) -%} +{%- macro iqvia_index_color(index) -%} :host { --paper-item-icon-color: {%- set index = index | float(-1) %} @@ -71,7 +251,7 @@ The storm is {{ iif(dist > 0, {%- endif %} {%- endmacro -%} -{%- macro aqi_index_icon(index) -%} +{%- macro aqi_index_color(index) -%} :host { --paper-item-icon-color: {%- set index = index | int(-1) %} @@ -86,7 +266,7 @@ The storm is {{ iif(dist > 0, } {%- endmacro -%} -{%- macro fire_index_icon(index) -%} +{%- macro fire_index_color(index) -%} :host { --paper-item-icon-color: {%- set index = index | int(-1) %} @@ -112,7 +292,7 @@ The storm is {{ iif(dist > 0, {%- endif %} {%- endmacro -%} -{%- macro smoke_level_icon(level) -%} +{%- macro smoke_level_color(level) -%} :host { --paper-item-icon-color: {%- set level = level | float(-1) %} diff --git a/custom_templates/window.jinja b/custom_templates/window.jinja index 7624eb257..49f056280 100644 --- a/custom_templates/window.jinja +++ b/custom_templates/window.jinja @@ -5,7 +5,7 @@ {%- endif %} {%- endmacro -%} -{%- macro window_icon_color(entity) -%} +{%- macro window_color(entity) -%} {%- set alert_entity = entity ~ '_open_alert' %} {%- set open = state_attr('alarm_control_panel.master', 'open_sensors') if state_attr('alarm_control_panel.master', 'open_sensors') != none else '' %} diff --git a/include/ignored_entities.yaml b/include/ignored_entities.yaml index 3e39a93a7..0a2e162ce 100644 --- a/include/ignored_entities.yaml +++ b/include/ignored_entities.yaml @@ -50,14 +50,14 @@ - sensor.alarm_clock_other #BUG Balboa Spa - often unavailable https://github.com/jazzyisj/home-assistant-config/issues/29 -- binary_sensor.spa_filter1 -- binary_sensor.spa_filter2 -- climate.spa_climate -- fan.spa_pump1 -- fan.spa_pump2 -- fan.spa_pump3 -- switch.spa_light1 -- switch.spa_temp_range +- binary_sensor.spa_filter_cycle_1 +- binary_sensor.spa_filter_cycle_2 +- climate.spa +- fan.spa_pump_1 +- fan.spa_pump_2 +- fan.spa_pump_3 +- light.spa_light +- select.spa_temperature_range - sensor.spa_temperature - sensor.spa_target_temperature - binary_sensor.spa_low_temperature_alert diff --git a/logging/logger.yaml b/logging/logger.yaml index 6b2df8ba0..103e20d61 100644 --- a/logging/logger.yaml +++ b/logging/logger.yaml @@ -4,38 +4,27 @@ ############################################################################### default: warn filters: - pybalboa.balboa: - - "Cannot connect to spa at 192.168.1.125:4257" #ERROR (MainThread) [pybalboa.balboa] Cannot connect to spa at 192.168.1.125:4257 - - "Spa stopped responding, requesting panel config" #ERROR (MainThread) [pybalboa.balboa] Spa stopped responding, requesting panel config. - - "Lost connection to spa, attempting reconnect" #ERROR (MainThread) [pybalboa.balboa] Lost connection to spa, attempting reconnect. - - "Error connecting to spa" #ERROR (MainThread) [pybalboa.balboa] Error connecting to spa at 192.168.1.125:4257: [Errno 110] Connect call failed ('192.168.1.125', 4257) - - "Connection reset by peer" #ERROR (MainThread) [pybalboa.balboa] Connection reset by peer - - "Message had bad CRC" #ERROR (MainThread) [pybalboa.balboa] Message had bad CRC, discarding - - "Spa unreachable" #ERROR (MainThread) [pybalboa.balboa] Spa unreachable - - "Spa sent an unknown message" #ERROR (MainThread) [pybalboa.balboa] Spa sent an unknown message: 7e17ffaf26008700000002000001000000000000000000087e - - "Spa read failed" #ERROR (MainThread) [pybalboa.balboa] Spa read failed: 0 bytes read on a total of 2 expected bytes - - "Error sending message: Connection lost" #ERROR (MainThread) [pybalboa.balboa] Error sending message: Connection lost - custom_components.balboa.const: # homeassistant.components.balboa.const: - - "Failed to connect to spa" #ERROR (MainThread) [homeassistant.components.balboa.const] Failed to connect to spa at 192.168.1.125 - # pychromecast.socket_client: - # - "Heartbeat timeout, resetting connection" #WARNING (Thread-26) [pychromecast.socket_client] [Laundry Room Speaker(192.168.1.197):8009] Heartbeat timeout, resetting connection - # - "Failed to connect to service" #ERROR (Thread-26) [pychromecast.socket_client] [Laundry Room Speaker(192.168.1.197):8009] Failed to connect to service ServiceInfo(type='host', data=('192.168.1.197', 8009)), retrying in 5.0s - # - "Error reading from socket" #ERROR (Thread-9) [pychromecast.socket_client] [Bedroom Hub(192.168.1.194):8009] Error reading from socket. - # - "Error communicating with socket, resetting connection" #WARNING (Thread-9) [pychromecast.socket_client] [Bedroom Hub(192.168.1.194):8009] Error communicating with socket, resetting connection - homeassistant.helpers.entity: # always takes more than 10 seconds - - "Update of sensor.speedtest_download is taking over 10 seconds" + homeassistant.helpers.entity: #ISSUE always takes more than 10 seconds + - "Update of sensor.speedtest_download is taking over 10 seconds" #WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.speedtest_download is taking over 10 seconds + - "Update of media_player.bedroom_tv is taking over 10 seconds" #WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.bedroom_tv is taking over 10 seconds + - "Update of media_player.living_room_tv is taking over 10 seconds" #WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.living_room_tv is taking over 10 seconds - "Updating state for" #WARNING (MainThread) [homeassistant.helpers.entity] Updating state for sensor.pirateweather_liquid_accumulation_4h () took 2.788 seconds. Please create a bug report at https://github.com/alexander0042/pirate-weather-ha/issues homeassistant.components.mold_indicator.sensor: # triggered when templates are reloaded - "Unable to parse temperature sensor sensor.outdoor_temperature with state: unavailable" #ERROR (MainThread) [homeassistant.components.mold_indicator.sensor] Unable to parse temperature sensor sensor.outdoor_temperature with state: unavailable custom_components.nest_protect: #TEMP until fix - "Unknown exception." #ERROR (MainThread) [custom_components.nest_protect] Unknown exception. Please create an issue on GitHub with your logfile. Updates paused for 5 minutes. - "Unknown pynest exception." # ERROR (MainThread) [custom_components.nest_protect] Unknown pynest exception. Please create an issue on GitHub with your logfile. Updates paused for 1 minute. - homeassistant.components.fully_kiosk: + homeassistant.components.fully_kiosk: #ISSUE - "Error fetching 192.168.1.70 data" #ERROR (MainThread) [homeassistant.components.fully_kiosk] Error fetching 192.168.1.70 data: (500, "Remote admin server can't find a running Fully activity...") - "Error requesting 192.168.1.70 data" #ERROR (MainThread) [homeassistant.components.fully_kiosk] Error requesting 192.168.1.70 data: Cannot connect to host 192.168.1.70:2323 ssl:False [Connect call failed ('192.168.1.70', 2323)] - fullykiosk: + fullykiosk: #ISSUE - "Invalid response from Fully Kiosk Browser API" #WARNING (MainThread) [fullykiosk] Invalid response from Fully Kiosk Browser API: 500 - homeassistant.components.media_player: + homeassistant.components.media_player: #ISSUE - "Updating webostv media_player took longer than the scheduled update interval" # WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10 - # homeassistant.components.uptimerobot: - # - "Error fetching uptimerobot data" #ERROR (MainThread) [homeassistant.components.uptimerobot] Error fetching uptimerobot data: Request timeout for 'https://api.uptimerobot.com/v2/getMonitors' + homeassistant.components.uptimerobot: #ISSUE + - "Error fetching uptimerobot data" #ERROR (MainThread) [homeassistant.components.uptimerobot] Error fetching uptimerobot data: Request timeout for 'https://api.uptimerobot.com/v2/getMonitors' + homeassistant.components.roku.coordinator: #ISSUE + - "Error fetching roku data" #ERROR (mainthread) [homeassistant.components.roku.coordinator] Error fetching roku data: Invalid response from API: Timeout occurred while connecting to device + homeassistant.components.hydrawise: #ISSUE spams log + - "Unexpected error fetching hydrawise data" #ERROR (mainthread) [homeassistant.components.hydrawise] Unexpected error fetching hydrawise data + diff --git a/logging/recorder.yaml b/logging/recorder.yaml index 1cadb32fa..76a8455b3 100644 --- a/logging/recorder.yaml +++ b/logging/recorder.yaml @@ -97,8 +97,13 @@ include: - sensor.cloud_coverage - sensor.visibility - sensor.air_quality_index + - sensor.allergy_index_today + - sensor.asthma_index_today + - sensor.cold_flu_index_today - sensor.uv_index - - sensor.ozone + - sensor.uv_index_today + - sensor.ozone_index + - sensor.ozone_level - sensor.nitrogen_dioxide - sensor.carbon_monoxide - sensor.sulphur_dioxide @@ -106,22 +111,16 @@ include: - sensor.fire_index - sensor.atmospheric_smoke #TEST - - sensor.home_sensors_precipitation_today - sensor.tempest_st_00057689_rain_today + - sensor.home_sensors_precipitation_today - sensor.home_sensors_precipitation_today_checked - sensor.home_sensors_precipitation_yesterday_checked - - sensor.pirateweather_precip_accumulation_0d - - sensor.pirateweather_liquid_accumulation_0d - - sensor.pirateweather_ice_accumulation_0d - - sensor.pirateweather_snow_accumulation_0d - - sensor.pirateweather_current_day_liquid_accumulation - - sensor.pirateweather_current_day_snow_accumulation - - sensor.pirateweather_current_day_ice_accumulation - sensor.pirateweather_cloud_coverage - sensor.home_sensors_distance_last_lightning_strike - sensor.home_sensors_lightnings_strikes + # ~~~~ Tempest ~~~~ # graphs - sensor.tempest_st_00057689_battery - sensor.tempest_st_00057689_voltage diff --git a/packages/locks.yaml b/packages/locks.yaml index a89502ff5..8abd727b3 100644 --- a/packages/locks.yaml +++ b/packages/locks.yaml @@ -77,7 +77,7 @@ alert: data: tag: door_lock_intrusion group: Alarm - channel: Alert + channel: Urgent persistent: true sticky: true notification_icon: mdi:lock-alert @@ -112,7 +112,7 @@ alert: data: tag: door_lock_keypad_disabled group: Alarm - channel: Alert + channel: Urgent persistent: true sticky: true notification_icon: mdi:lock-alert @@ -147,7 +147,7 @@ alert: data: tag: door_lock_jammed group: Alarm - channel: Alert + channel: Urgent persistent: true sticky: true notification_icon: mdi:lock-alert @@ -182,7 +182,7 @@ alert: data: tag: door_lock_failed group: Alarm - channel: Alert + channel: Urgent persistent: true sticky: true notification_icon: mdi:lock-alert diff --git a/packages/mass_play_media.yaml b/packages/mass_play_media.yaml index bf72cd3ec..0ed1ed04e 100644 --- a/packages/mass_play_media.yaml +++ b/packages/mass_play_media.yaml @@ -39,6 +39,14 @@ input_select: - Playlist - Radio + mass_repeat_mode: + name: &repeat_name "Repeat Mode" + icon: &repeat_icon mdi:repeat + options: + - "Off" + - All + - One + input_text: mass_media_player: mass_artist: @@ -61,7 +69,7 @@ input_number: template: ############################################################################### - ## Update Media Button + ## Update Media Button - used to force update of media select templates ############################################################################### - button: - name: "MASS Update Media" @@ -70,7 +78,7 @@ template: press: [] ############################################################################### - ## Play Media Button + ## Play Media Button - used to start media play with selected options ############################################################################### - button: - name: "MASS Play Media" @@ -100,7 +108,7 @@ template: target: entity_id: "{{ media_player }}" data: - repeat: "{{ iif(is_state('input_boolean.mass_repeat', 'on'), 'all', 'off') }}" + repeat: "{{ states('input_select.mass_repeat_mode') | lower }}" continue_on_error: true # set media player volume to zero to try and avoid google power on bloop @@ -188,10 +196,12 @@ template: - input_text.mass_artist - button.mass_update_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: - favorite: false limit: 500 album_artists_only: true media_type: artist @@ -235,10 +245,12 @@ template: - input_text.mass_album - button.mass_update_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: - favorite: false limit: 500 media_type: album order_by: sort_name @@ -287,6 +299,9 @@ template: - input_text.mass_track - button.mass_update_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -332,10 +347,12 @@ template: - input_text.mass_playlist - button.mass_update_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: - favorite: false limit: 500 media_type: playlist order_by: sort_name @@ -378,10 +395,12 @@ template: - input_text.mass_radio - button.mass_update_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: - favorite: false limit: 500 media_type: radio order_by: sort_name @@ -533,8 +552,13 @@ template: automation: ############################################################################### - ## Update Mass Media Player Group - This automation automatically creates a - ## group of all the Music Assistant media players available in Home Assistant + ## Update Mass Media Player Group + ## + ## This automation automatically creates a group of all the Music Assistant + ## media players available in Home Assistant. + ## + ## Listed media players are removed from the group if they become unavailable + ## and are automatically readded to the group when them become available again. ############################################################################### - id: mass_update_media_players alias: "Update Mass Media Players" @@ -587,19 +611,3 @@ automation: | selectattr('attributes.mass_player_type', 'defined') | map(attribute='entity_id') | list | select('has_value') | sort }} - - ############################################################################### - ## Update Mass Media Library Items - ############################################################################### - - id: mass_update_media - alias: "MASS Update Media" - description: "Update mass media library items." - mode: single - max_exceeded: silent - triggers: - - trigger: time_pattern - minutes: 30 # every hour at 30 min after - actions: - - action: button.press - target: - entity_id: button.mass_update_media diff --git a/packages/weather.yaml b/packages/weather.yaml index ee120cf2c..253883229 100644 --- a/packages/weather.yaml +++ b/packages/weather.yaml @@ -90,7 +90,7 @@ weather: wind_bearing_template: "{{ states('sensor.wind_bearing') | float(-1) }}" cloud_coverage_template: "{{ states('sensor.cloud_coverage') | float(-1) }}" visibility_template: "{{ states('sensor.visibility') | float(-1) }}" - ozone_template: "{{ states('sensor.ozone') | float(-1) }}" + ozone_template: "{{ states('sensor.ozone_index') | float(-1) }}" temperature_unit: °C pressure_unit: hPa wind_speed_unit: km/h diff --git a/scripts/appliance/sump_error_notification.yaml b/scripts/appliance/sump_error_notification.yaml index 0ba68f65f..4eef1c100 100644 --- a/scripts/appliance/sump_error_notification.yaml +++ b/scripts/appliance/sump_error_notification.yaml @@ -26,7 +26,7 @@ sump_error_notification: data: tag: "{{ sump }}_sump_error" group: Alert - channel: Alert + channel: Urgent notification_icon: mdi:pump-off icon_url: !secret ALERT_ICON ledColor: !secret WARNING_COLOR diff --git a/templates/media/preset/media_preset_charlie.yaml b/templates/media/preset/media_preset_charlie.yaml index 081d407cf..839ef2fdd 100644 --- a/templates/media/preset/media_preset_charlie.yaml +++ b/templates/media/preset/media_preset_charlie.yaml @@ -17,6 +17,11 @@ - trigger: state entity_id: input_text.media_speaker_charlie to: + condition: + - condition: template + value_template: > + {{ state_attr('group.media_preset_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Speaker Charlie" unique_id: media_speaker_charlie @@ -51,8 +56,13 @@ for: 30 - trigger: state - entity_id: input_text.media_video_display_charlie + entity_id: input_text.media_video_display_play to: + condition: + - condition: template + value_template: > + {{ state_attr('group.cast_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Video Display Charlie" unique_id: media_video_display_charlie @@ -85,6 +95,9 @@ - input_text.media_artist_charlie - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -115,73 +128,6 @@ value: "{{ option }}" options: "{{ artists }}" -############################################################################### -## Media Artist Filter Charlie -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_charlie - - input_text.media_artist_filter_charlie - - select.media_track_charlie - - select.media_album_charlie - - select.media_album_filter_charlie - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - action: mass.get_library - data: - media_type: album - response_variable: mass_albums - - - variables: - artists: > - {% set artist_list = namespace(names=['']) %} - {% if states('input_select.media_type_charlie') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_charlie') - and states('select.media_album_filter_charlie') - in ['', 'unknown', track.album.name] %} - {% set artist_list.names = artist_list.names + [track.artists[0].name] %} - {% endif %} - {% endfor %} - {% elif states('input_select.media_type_charlie') == 'Album' %} - {% for album in mass_albums['albums'] %} - {% if album.name == states('select.media_album_charlie') %} - {% set artist_list.names = artist_list.names + [album.artists[0].name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ artist_list.names | unique | list }} - select: - - name: "Media Artist Filter Charlie" - unique_id: media_artist_filter_charlie - state: "{{ states('input_text.media_artist_filter_charlie') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_artist_filter_charlie - data: - value: "{{ option }}" - options: "{{ artists }}" - ############################################################################### ## Media Album Charlie ############################################################################### @@ -197,6 +143,9 @@ - input_text.media_album_charlie - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -225,61 +174,6 @@ value: "{{ option }}" options: "{{ albums }}" -############################################################################### -## Media Album Filter Charlie -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_charlie - - input_text.media_album_filter_charlie - - select.media_track_charlie - - select.media_artist_filter_charlie - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - variables: - albums: > - {% set album_list = namespace(names=['']) %} - {% if states('input_select.media_type_charlie') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_charlie') - and states('select.media_artist_filter_charlie') - in ['', 'unknown', track.artists[0].name] %} - {% set album_list.names = album_list.names + [track.album.name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ album_list.names | unique | list }} - select: - - name: "Media Album Filter Charlie" - unique_id: media_album_filter_charlie - state: "{{ states('input_text.media_album_filter_charlie') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_album_filter_charlie - data: - value: "{{ option }}" - options: "{{ albums }}" - ############################################################################### ## Media Track Charlie ############################################################################### @@ -297,6 +191,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -342,6 +239,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -387,6 +287,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -415,6 +318,128 @@ value: "{{ option }}" options: "{{ radios }}" +############################################################################### +## Media Artist Filter Charlie +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_charlie + - input_text.media_artist_filter_charlie + - select.media_track_charlie + - select.media_album_charlie + - select.media_album_filter_charlie + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - action: mass.get_library + data: + media_type: album + response_variable: mass_albums + + - variables: + artists: > + {% set artist_list = namespace(names=['']) %} + {% if states('input_select.media_type_charlie') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_charlie') + and states('select.media_album_filter_charlie') + in ['', 'unknown', track.album.name] %} + {% set artist_list.names = artist_list.names + [track.artists[0].name] %} + {% endif %} + {% endfor %} + {% elif states('input_select.media_type_charlie') == 'Album' %} + {% for album in mass_albums['albums'] %} + {% if album.name == states('select.media_album_charlie') %} + {% set artist_list.names = artist_list.names + [album.artists[0].name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ artist_list.names | unique | list }} + select: + - name: "Media Artist Filter Charlie" + unique_id: media_artist_filter_charlie + state: "{{ states('input_text.media_artist_filter_charlie') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_artist_filter_charlie + data: + value: "{{ option }}" + options: "{{ artists }}" + +############################################################################### +## Media Album Filter Charlie +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_charlie + - input_text.media_album_filter_charlie + - select.media_track_charlie + - select.media_artist_filter_charlie + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - variables: + albums: > + {% set album_list = namespace(names=['']) %} + {% if states('input_select.media_type_charlie') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_charlie') + and states('select.media_artist_filter_charlie') + in ['', 'unknown', track.artists[0].name] %} + {% set album_list.names = album_list.names + [track.album.name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ album_list.names | unique | list }} + select: + - name: "Media Album Filter Charlie" + unique_id: media_album_filter_charlie + state: "{{ states('input_text.media_album_filter_charlie') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_album_filter_charlie + data: + value: "{{ option }}" + options: "{{ albums }}" + ############################################################################### ## Media Video Charlie ############################################################################### @@ -432,6 +457,9 @@ - trigger: state entity_id: button.update_mass_media to: + #DISABLED not required until automatic video list + # - trigger: time_pattern + # minutes: 30 # sync with library every hour at 30 min after select: - name: "Media Video Charlie" unique_id: media_video_charlie diff --git a/templates/media/preset/media_preset_chill.yaml b/templates/media/preset/media_preset_chill.yaml index f457b94e9..6b823035f 100644 --- a/templates/media/preset/media_preset_chill.yaml +++ b/templates/media/preset/media_preset_chill.yaml @@ -17,6 +17,11 @@ - trigger: state entity_id: input_text.media_speaker_chill to: + condition: + - condition: template + value_template: > + {{ state_attr('group.media_preset_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Speaker Chill" unique_id: media_speaker_chill @@ -51,8 +56,13 @@ for: 30 - trigger: state - entity_id: input_text.media_video_display_chill + entity_id: input_text.media_video_display_play to: + condition: + - condition: template + value_template: > + {{ state_attr('group.cast_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Video Display Chill" unique_id: media_video_display_chill @@ -85,6 +95,9 @@ - input_text.media_artist_chill - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -115,73 +128,6 @@ value: "{{ option }}" options: "{{ artists }}" -############################################################################### -## Media Artist Filter Chill -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_chill - - input_text.media_artist_filter_chill - - select.media_track_chill - - select.media_album_chill - - select.media_album_filter_chill - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - action: mass.get_library - data: - media_type: album - response_variable: mass_albums - - - variables: - artists: > - {% set artist_list = namespace(names=['']) %} - {% if states('input_select.media_type_chill') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_chill') - and states('select.media_album_filter_chill') - in ['', 'unknown', track.album.name] %} - {% set artist_list.names = artist_list.names + [track.artists[0].name] %} - {% endif %} - {% endfor %} - {% elif states('input_select.media_type_chill') == 'Album' %} - {% for album in mass_albums['albums'] %} - {% if album.name == states('select.media_album_chill') %} - {% set artist_list.names = artist_list.names + [album.artists[0].name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ artist_list.names | unique | list }} - select: - - name: "Media Artist Filter Chill" - unique_id: media_artist_filter_chill - state: "{{ states('input_text.media_artist_filter_chill') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_artist_filter_chill - data: - value: "{{ option }}" - options: "{{ artists }}" - ############################################################################### ## Media Album Chill ############################################################################### @@ -197,6 +143,9 @@ - input_text.media_album_chill - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -225,61 +174,6 @@ value: "{{ option }}" options: "{{ albums }}" -############################################################################### -## Media Album Filter Chill -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_chill - - input_text.media_album_filter_chill - - select.media_track_chill - - select.media_artist_filter_chill - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - variables: - albums: > - {% set album_list = namespace(names=['']) %} - {% if states('input_select.media_type_chill') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_chill') - and states('select.media_artist_filter_chill') - in ['', 'unknown', track.artists[0].name] %} - {% set album_list.names = album_list.names + [track.album.name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ album_list.names | unique | list }} - select: - - name: "Media Album Filter Chill" - unique_id: media_album_filter_chill - state: "{{ states('input_text.media_album_filter_chill') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_album_filter_chill - data: - value: "{{ option }}" - options: "{{ albums }}" - ############################################################################### ## Media Track Chill ############################################################################### @@ -297,6 +191,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -342,6 +239,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -387,6 +287,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -415,6 +318,128 @@ value: "{{ option }}" options: "{{ radios }}" +############################################################################### +## Media Artist Filter Chill +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_chill + - input_text.media_artist_filter_chill + - select.media_track_chill + - select.media_album_chill + - select.media_album_filter_chill + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - action: mass.get_library + data: + media_type: album + response_variable: mass_albums + + - variables: + artists: > + {% set artist_list = namespace(names=['']) %} + {% if states('input_select.media_type_chill') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_chill') + and states('select.media_album_filter_chill') + in ['', 'unknown', track.album.name] %} + {% set artist_list.names = artist_list.names + [track.artists[0].name] %} + {% endif %} + {% endfor %} + {% elif states('input_select.media_type_chill') == 'Album' %} + {% for album in mass_albums['albums'] %} + {% if album.name == states('select.media_album_chill') %} + {% set artist_list.names = artist_list.names + [album.artists[0].name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ artist_list.names | unique | list }} + select: + - name: "Media Artist Filter Chill" + unique_id: media_artist_filter_chill + state: "{{ states('input_text.media_artist_filter_chill') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_artist_filter_chill + data: + value: "{{ option }}" + options: "{{ artists }}" + +############################################################################### +## Media Album Filter Chill +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_chill + - input_text.media_album_filter_chill + - select.media_track_chill + - select.media_artist_filter_chill + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - variables: + albums: > + {% set album_list = namespace(names=['']) %} + {% if states('input_select.media_type_chill') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_chill') + and states('select.media_artist_filter_chill') + in ['', 'unknown', track.artists[0].name] %} + {% set album_list.names = album_list.names + [track.album.name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ album_list.names | unique | list }} + select: + - name: "Media Album Filter Chill" + unique_id: media_album_filter_chill + state: "{{ states('input_text.media_album_filter_chill') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_album_filter_chill + data: + value: "{{ option }}" + options: "{{ albums }}" + ############################################################################### ## Media Video Chill ############################################################################### @@ -432,6 +457,9 @@ - trigger: state entity_id: button.update_mass_media to: + #DISABLED not required until automatic video list + # - trigger: time_pattern + # minutes: 30 # sync with library every hour at 30 min after select: - name: "Media Video Chill" unique_id: media_video_chill diff --git a/templates/media/preset/media_preset_company.yaml b/templates/media/preset/media_preset_company.yaml index 50e41b7f8..11bda6654 100644 --- a/templates/media/preset/media_preset_company.yaml +++ b/templates/media/preset/media_preset_company.yaml @@ -17,6 +17,11 @@ - trigger: state entity_id: input_text.media_speaker_company to: + condition: + - condition: template + value_template: > + {{ state_attr('group.media_preset_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Speaker Company" unique_id: media_speaker_company @@ -51,8 +56,13 @@ for: 30 - trigger: state - entity_id: input_text.media_video_display_company + entity_id: input_text.media_video_display_play to: + condition: + - condition: template + value_template: > + {{ state_attr('group.cast_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Video Display Company" unique_id: media_video_display_company @@ -85,6 +95,9 @@ - input_text.media_artist_company - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -115,73 +128,6 @@ value: "{{ option }}" options: "{{ artists }}" -############################################################################### -## Media Artist Filter Company -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_company - - input_text.media_artist_filter_company - - select.media_track_company - - select.media_album_company - - select.media_album_filter_company - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - action: mass.get_library - data: - media_type: album - response_variable: mass_albums - - - variables: - artists: > - {% set artist_list = namespace(names=['']) %} - {% if states('input_select.media_type_company') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_company') - and states('select.media_album_filter_company') - in ['', 'unknown', track.album.name] %} - {% set artist_list.names = artist_list.names + [track.artists[0].name] %} - {% endif %} - {% endfor %} - {% elif states('input_select.media_type_company') == 'Album' %} - {% for album in mass_albums['albums'] %} - {% if album.name == states('select.media_album_company') %} - {% set artist_list.names = artist_list.names + [album.artists[0].name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ artist_list.names | unique | list }} - select: - - name: "Media Artist Filter Company" - unique_id: media_artist_filter_company - state: "{{ states('input_text.media_artist_filter_company') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_artist_filter_company - data: - value: "{{ option }}" - options: "{{ artists }}" - ############################################################################### ## Media Album Company ############################################################################### @@ -197,6 +143,9 @@ - input_text.media_album_company - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -225,61 +174,6 @@ value: "{{ option }}" options: "{{ albums }}" -############################################################################### -## Media Album Filter Company -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_company - - input_text.media_album_filter_company - - select.media_track_company - - select.media_artist_filter_company - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - variables: - albums: > - {% set album_list = namespace(names=['']) %} - {% if states('input_select.media_type_company') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_company') - and states('select.media_artist_filter_company') - in ['', 'unknown', track.artists[0].name] %} - {% set album_list.names = album_list.names + [track.album.name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ album_list.names | unique | list }} - select: - - name: "Media Album Filter Company" - unique_id: media_album_filter_company - state: "{{ states('input_text.media_album_filter_company') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_album_filter_company - data: - value: "{{ option }}" - options: "{{ albums }}" - ############################################################################### ## Media Track Company ############################################################################### @@ -297,6 +191,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -342,6 +239,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -387,6 +287,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -415,6 +318,128 @@ value: "{{ option }}" options: "{{ radios }}" +############################################################################### +## Media Artist Filter Company +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_company + - input_text.media_artist_filter_company + - select.media_track_company + - select.media_album_company + - select.media_album_filter_company + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - action: mass.get_library + data: + media_type: album + response_variable: mass_albums + + - variables: + artists: > + {% set artist_list = namespace(names=['']) %} + {% if states('input_select.media_type_company') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_company') + and states('select.media_album_filter_company') + in ['', 'unknown', track.album.name] %} + {% set artist_list.names = artist_list.names + [track.artists[0].name] %} + {% endif %} + {% endfor %} + {% elif states('input_select.media_type_company') == 'Album' %} + {% for album in mass_albums['albums'] %} + {% if album.name == states('select.media_album_company') %} + {% set artist_list.names = artist_list.names + [album.artists[0].name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ artist_list.names | unique | list }} + select: + - name: "Media Artist Filter Company" + unique_id: media_artist_filter_company + state: "{{ states('input_text.media_artist_filter_company') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_artist_filter_company + data: + value: "{{ option }}" + options: "{{ artists }}" + +############################################################################### +## Media Album Filter Company +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_company + - input_text.media_album_filter_company + - select.media_track_company + - select.media_artist_filter_company + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - variables: + albums: > + {% set album_list = namespace(names=['']) %} + {% if states('input_select.media_type_company') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_company') + and states('select.media_artist_filter_company') + in ['', 'unknown', track.artists[0].name] %} + {% set album_list.names = album_list.names + [track.album.name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ album_list.names | unique | list }} + select: + - name: "Media Album Filter Company" + unique_id: media_album_filter_company + state: "{{ states('input_text.media_album_filter_company') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_album_filter_company + data: + value: "{{ option }}" + options: "{{ albums }}" + ############################################################################### ## Media Video Company ############################################################################### @@ -432,6 +457,9 @@ - trigger: state entity_id: button.update_mass_media to: + #DISABLED not required until automatic video list + # - trigger: time_pattern + # minutes: 30 # sync with library every hour at 30 min after select: - name: "Media Video Company" unique_id: media_video_company diff --git a/templates/media/preset/media_preset_guest.yaml b/templates/media/preset/media_preset_guest.yaml index c86e6cb13..abda61db3 100644 --- a/templates/media/preset/media_preset_guest.yaml +++ b/templates/media/preset/media_preset_guest.yaml @@ -17,6 +17,11 @@ - trigger: state entity_id: input_text.media_speaker_guest to: + condition: + - condition: template + value_template: > + {{ state_attr('group.media_preset_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Speaker Guest" unique_id: media_speaker_guest @@ -51,8 +56,13 @@ for: 30 - trigger: state - entity_id: input_text.media_video_display_guest + entity_id: input_text.media_video_display_play to: + condition: + - condition: template + value_template: > + {{ state_attr('group.cast_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Video Display Guest" unique_id: media_video_display_guest @@ -85,6 +95,9 @@ - input_text.media_artist_guest - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -115,73 +128,6 @@ value: "{{ option }}" options: "{{ artists }}" -############################################################################### -## Media Artist Filter Guest -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_guest - - input_text.media_artist_filter_guest - - select.media_track_guest - - select.media_album_guest - - select.media_album_filter_guest - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - action: mass.get_library - data: - media_type: album - response_variable: mass_albums - - - variables: - artists: > - {% set artist_list = namespace(names=['']) %} - {% if states('input_select.media_type_guest') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_guest') - and states('select.media_album_filter_guest') - in ['', 'unknown', track.album.name] %} - {% set artist_list.names = artist_list.names + [track.artists[0].name] %} - {% endif %} - {% endfor %} - {% elif states('input_select.media_type_guest') == 'Album' %} - {% for album in mass_albums['albums'] %} - {% if album.name == states('select.media_album_guest') %} - {% set artist_list.names = artist_list.names + [album.artists[0].name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ artist_list.names | unique | list }} - select: - - name: "Media Artist Filter Guest" - unique_id: media_artist_filter_guest - state: "{{ states('input_text.media_artist_filter_guest') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_artist_filter_guest - data: - value: "{{ option }}" - options: "{{ artists }}" - ############################################################################### ## Media Album Guest ############################################################################### @@ -197,6 +143,9 @@ - input_text.media_album_guest - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -225,61 +174,6 @@ value: "{{ option }}" options: "{{ albums }}" -############################################################################### -## Media Album Filter Guest -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_guest - - input_text.media_album_filter_guest - - select.media_track_guest - - select.media_artist_filter_guest - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - variables: - albums: > - {% set album_list = namespace(names=['']) %} - {% if states('input_select.media_type_guest') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_guest') - and states('select.media_artist_filter_guest') - in ['', 'unknown', track.artists[0].name] %} - {% set album_list.names = album_list.names + [track.album.name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ album_list.names | unique | list }} - select: - - name: "Media Album Filter Guest" - unique_id: media_album_filter_guest - state: "{{ states('input_text.media_album_filter_guest') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_album_filter_guest - data: - value: "{{ option }}" - options: "{{ albums }}" - ############################################################################### ## Media Track Guest ############################################################################### @@ -297,6 +191,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -342,6 +239,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -387,6 +287,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -415,6 +318,128 @@ value: "{{ option }}" options: "{{ radios }}" +############################################################################### +## Media Artist Filter Guest +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_guest + - input_text.media_artist_filter_guest + - select.media_track_guest + - select.media_album_guest + - select.media_album_filter_guest + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - action: mass.get_library + data: + media_type: album + response_variable: mass_albums + + - variables: + artists: > + {% set artist_list = namespace(names=['']) %} + {% if states('input_select.media_type_guest') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_guest') + and states('select.media_album_filter_guest') + in ['', 'unknown', track.album.name] %} + {% set artist_list.names = artist_list.names + [track.artists[0].name] %} + {% endif %} + {% endfor %} + {% elif states('input_select.media_type_guest') == 'Album' %} + {% for album in mass_albums['albums'] %} + {% if album.name == states('select.media_album_guest') %} + {% set artist_list.names = artist_list.names + [album.artists[0].name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ artist_list.names | unique | list }} + select: + - name: "Media Artist Filter Guest" + unique_id: media_artist_filter_guest + state: "{{ states('input_text.media_artist_filter_guest') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_artist_filter_guest + data: + value: "{{ option }}" + options: "{{ artists }}" + +############################################################################### +## Media Album Filter Guest +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_guest + - input_text.media_album_filter_guest + - select.media_track_guest + - select.media_artist_filter_guest + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - variables: + albums: > + {% set album_list = namespace(names=['']) %} + {% if states('input_select.media_type_guest') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_guest') + and states('select.media_artist_filter_guest') + in ['', 'unknown', track.artists[0].name] %} + {% set album_list.names = album_list.names + [track.album.name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ album_list.names | unique | list }} + select: + - name: "Media Album Filter Guest" + unique_id: media_album_filter_guest + state: "{{ states('input_text.media_album_filter_guest') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_album_filter_guest + data: + value: "{{ option }}" + options: "{{ albums }}" + ############################################################################### ## Media Video Guest ############################################################################### @@ -432,6 +457,9 @@ - trigger: state entity_id: button.update_mass_media to: + #DISABLED not required until automatic video list + # - trigger: time_pattern + # minutes: 30 # sync with library every hour at 30 min after select: - name: "Media Video Guest" unique_id: media_video_guest diff --git a/templates/media/preset/media_preset_jason.yaml b/templates/media/preset/media_preset_jason.yaml index 2086b9f9f..f36e4507b 100644 --- a/templates/media/preset/media_preset_jason.yaml +++ b/templates/media/preset/media_preset_jason.yaml @@ -17,6 +17,11 @@ - trigger: state entity_id: input_text.media_speaker_jason to: + condition: + - condition: template + value_template: > + {{ state_attr('group.media_preset_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Speaker Jason" unique_id: media_speaker_jason @@ -51,8 +56,13 @@ for: 30 - trigger: state - entity_id: input_text.media_video_display_jason + entity_id: input_text.media_video_display_play to: + condition: + - condition: template + value_template: > + {{ state_attr('group.cast_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Video Display Jason" unique_id: media_video_display_jason @@ -85,6 +95,9 @@ - input_text.media_artist_jason - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -115,73 +128,6 @@ value: "{{ option }}" options: "{{ artists }}" -############################################################################### -## Media Artist Filter Jason -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_jason - - input_text.media_artist_filter_jason - - select.media_track_jason - - select.media_album_jason - - select.media_album_filter_jason - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - action: mass.get_library - data: - media_type: album - response_variable: mass_albums - - - variables: - artists: > - {% set artist_list = namespace(names=['']) %} - {% if states('input_select.media_type_jason') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_jason') - and states('select.media_album_filter_jason') - in ['', 'unknown', track.album.name] %} - {% set artist_list.names = artist_list.names + [track.artists[0].name] %} - {% endif %} - {% endfor %} - {% elif states('input_select.media_type_jason') == 'Album' %} - {% for album in mass_albums['albums'] %} - {% if album.name == states('select.media_album_jason') %} - {% set artist_list.names = artist_list.names + [album.artists[0].name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ artist_list.names | unique | list }} - select: - - name: "Media Artist Filter Jason" - unique_id: media_artist_filter_jason - state: "{{ states('input_text.media_artist_filter_jason') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_artist_filter_jason - data: - value: "{{ option }}" - options: "{{ artists }}" - ############################################################################### ## Media Album Jason ############################################################################### @@ -197,6 +143,9 @@ - input_text.media_album_jason - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -225,61 +174,6 @@ value: "{{ option }}" options: "{{ albums }}" -############################################################################### -## Media Album Filter Jason -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_jason - - input_text.media_album_filter_jason - - select.media_track_jason - - select.media_artist_filter_jason - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - variables: - albums: > - {% set album_list = namespace(names=['']) %} - {% if states('input_select.media_type_jason') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_jason') - and states('select.media_artist_filter_jason') - in ['', 'unknown', track.artists[0].name] %} - {% set album_list.names = album_list.names + [track.album.name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ album_list.names | unique | list }} - select: - - name: "Media Album Filter Jason" - unique_id: media_album_filter_jason - state: "{{ states('input_text.media_album_filter_jason') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_album_filter_jason - data: - value: "{{ option }}" - options: "{{ albums }}" - ############################################################################### ## Media Track Jason ############################################################################### @@ -297,6 +191,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -342,6 +239,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -387,6 +287,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -415,6 +318,128 @@ value: "{{ option }}" options: "{{ radios }}" +############################################################################### +## Media Artist Filter Jason +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_jason + - input_text.media_artist_filter_jason + - select.media_track_jason + - select.media_album_jason + - select.media_album_filter_jason + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - action: mass.get_library + data: + media_type: album + response_variable: mass_albums + + - variables: + artists: > + {% set artist_list = namespace(names=['']) %} + {% if states('input_select.media_type_jason') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_jason') + and states('select.media_album_filter_jason') + in ['', 'unknown', track.album.name] %} + {% set artist_list.names = artist_list.names + [track.artists[0].name] %} + {% endif %} + {% endfor %} + {% elif states('input_select.media_type_jason') == 'Album' %} + {% for album in mass_albums['albums'] %} + {% if album.name == states('select.media_album_jason') %} + {% set artist_list.names = artist_list.names + [album.artists[0].name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ artist_list.names | unique | list }} + select: + - name: "Media Artist Filter Jason" + unique_id: media_artist_filter_jason + state: "{{ states('input_text.media_artist_filter_jason') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_artist_filter_jason + data: + value: "{{ option }}" + options: "{{ artists }}" + +############################################################################### +## Media Album Filter Jason +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_jason + - input_text.media_album_filter_jason + - select.media_track_jason + - select.media_artist_filter_jason + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - variables: + albums: > + {% set album_list = namespace(names=['']) %} + {% if states('input_select.media_type_jason') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_jason') + and states('select.media_artist_filter_jason') + in ['', 'unknown', track.artists[0].name] %} + {% set album_list.names = album_list.names + [track.album.name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ album_list.names | unique | list }} + select: + - name: "Media Album Filter Jason" + unique_id: media_album_filter_jason + state: "{{ states('input_text.media_album_filter_jason') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_album_filter_jason + data: + value: "{{ option }}" + options: "{{ albums }}" + ############################################################################### ## Media Video Jason ############################################################################### @@ -432,6 +457,9 @@ - trigger: state entity_id: button.update_mass_media to: + #DISABLED not required until automatic video list + # - trigger: time_pattern + # minutes: 30 # sync with library every hour at 30 min after select: - name: "Media Video Jason" unique_id: media_video_jason diff --git a/templates/media/preset/media_preset_morning.yaml b/templates/media/preset/media_preset_morning.yaml index e02dee5a5..1095103bd 100644 --- a/templates/media/preset/media_preset_morning.yaml +++ b/templates/media/preset/media_preset_morning.yaml @@ -17,6 +17,11 @@ - trigger: state entity_id: input_text.media_speaker_morning to: + condition: + - condition: template + value_template: > + {{ state_attr('group.media_preset_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Speaker Morning" unique_id: media_speaker_morning @@ -51,8 +56,13 @@ for: 30 - trigger: state - entity_id: input_text.media_video_display_morning + entity_id: input_text.media_video_display_play to: + condition: + - condition: template + value_template: > + {{ state_attr('group.cast_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Video Display Morning" unique_id: media_video_display_morning @@ -85,6 +95,9 @@ - input_text.media_artist_morning - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -115,73 +128,6 @@ value: "{{ option }}" options: "{{ artists }}" -############################################################################### -## Media Artist Filter Morning -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_morning - - input_text.media_artist_filter_morning - - select.media_track_morning - - select.media_album_morning - - select.media_album_filter_morning - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - action: mass.get_library - data: - media_type: album - response_variable: mass_albums - - - variables: - artists: > - {% set artist_list = namespace(names=['']) %} - {% if states('input_select.media_type_morning') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_morning') - and states('select.media_album_filter_morning') - in ['', 'unknown', track.album.name] %} - {% set artist_list.names = artist_list.names + [track.artists[0].name] %} - {% endif %} - {% endfor %} - {% elif states('input_select.media_type_morning') == 'Album' %} - {% for album in mass_albums['albums'] %} - {% if album.name == states('select.media_album_morning') %} - {% set artist_list.names = artist_list.names + [album.artists[0].name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ artist_list.names | unique | list }} - select: - - name: "Media Artist Filter Morning" - unique_id: media_artist_filter_morning - state: "{{ states('input_text.media_artist_filter_morning') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_artist_filter_morning - data: - value: "{{ option }}" - options: "{{ artists }}" - ############################################################################### ## Media Album Morning ############################################################################### @@ -197,6 +143,9 @@ - input_text.media_album_morning - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -225,61 +174,6 @@ value: "{{ option }}" options: "{{ albums }}" -############################################################################### -## Media Album Filter Morning -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_morning - - input_text.media_album_filter_morning - - select.media_track_morning - - select.media_artist_filter_morning - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - variables: - albums: > - {% set album_list = namespace(names=['']) %} - {% if states('input_select.media_type_morning') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_morning') - and states('select.media_artist_filter_morning') - in ['', 'unknown', track.artists[0].name] %} - {% set album_list.names = album_list.names + [track.album.name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ album_list.names | unique | list }} - select: - - name: "Media Album Filter Morning" - unique_id: media_album_filter_morning - state: "{{ states('input_text.media_album_filter_morning') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_album_filter_morning - data: - value: "{{ option }}" - options: "{{ albums }}" - ############################################################################### ## Media Track Morning ############################################################################### @@ -297,6 +191,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -342,6 +239,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -387,6 +287,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -415,6 +318,128 @@ value: "{{ option }}" options: "{{ radios }}" +############################################################################### +## Media Artist Filter Morning +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_morning + - input_text.media_artist_filter_morning + - select.media_track_morning + - select.media_album_morning + - select.media_album_filter_morning + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - action: mass.get_library + data: + media_type: album + response_variable: mass_albums + + - variables: + artists: > + {% set artist_list = namespace(names=['']) %} + {% if states('input_select.media_type_morning') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_morning') + and states('select.media_album_filter_morning') + in ['', 'unknown', track.album.name] %} + {% set artist_list.names = artist_list.names + [track.artists[0].name] %} + {% endif %} + {% endfor %} + {% elif states('input_select.media_type_morning') == 'Album' %} + {% for album in mass_albums['albums'] %} + {% if album.name == states('select.media_album_morning') %} + {% set artist_list.names = artist_list.names + [album.artists[0].name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ artist_list.names | unique | list }} + select: + - name: "Media Artist Filter Morning" + unique_id: media_artist_filter_morning + state: "{{ states('input_text.media_artist_filter_morning') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_artist_filter_morning + data: + value: "{{ option }}" + options: "{{ artists }}" + +############################################################################### +## Media Album Filter Morning +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_morning + - input_text.media_album_filter_morning + - select.media_track_morning + - select.media_artist_filter_morning + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - variables: + albums: > + {% set album_list = namespace(names=['']) %} + {% if states('input_select.media_type_morning') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_morning') + and states('select.media_artist_filter_morning') + in ['', 'unknown', track.artists[0].name] %} + {% set album_list.names = album_list.names + [track.album.name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ album_list.names | unique | list }} + select: + - name: "Media Album Filter Morning" + unique_id: media_album_filter_morning + state: "{{ states('input_text.media_album_filter_morning') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_album_filter_morning + data: + value: "{{ option }}" + options: "{{ albums }}" + ############################################################################### ## Media Video Morning ############################################################################### @@ -432,6 +457,9 @@ - trigger: state entity_id: button.update_mass_media to: + #DISABLED not required until automatic video list + # - trigger: time_pattern + # minutes: 30 # sync with library every hour at 30 min after select: - name: "Media Video Morning" unique_id: media_video_morning diff --git a/templates/media/preset/media_preset_play.yaml b/templates/media/preset/media_preset_play.yaml index 3001f763b..2bc1a9b04 100644 --- a/templates/media/preset/media_preset_play.yaml +++ b/templates/media/preset/media_preset_play.yaml @@ -1,8 +1,12 @@ +############################################################################### +## Update MASS Media Button +############################################################################### - button: - name: "Update MASS Media" unique_id: udpate_mass_media icon: mdi:multimedia press: [] + ############################################################################### ## Media Speaker Play ############################################################################### @@ -22,6 +26,11 @@ - trigger: state entity_id: input_text.media_speaker_play to: + condition: + - condition: template + value_template: > + {{ state_attr('group.media_preset_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Speaker Play" unique_id: media_speaker_play @@ -58,6 +67,11 @@ - trigger: state entity_id: input_text.media_video_display_play to: + condition: + - condition: template + value_template: > + {{ state_attr('group.cast_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Video Display Play" unique_id: media_video_display_play @@ -90,6 +104,9 @@ - input_text.media_artist_play - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -135,6 +152,9 @@ - input_text.media_album_play - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -180,6 +200,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -225,6 +248,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -270,6 +296,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -437,6 +466,9 @@ - trigger: state entity_id: button.update_mass_media to: + #DISABLED not required until automatic video list + # - trigger: time_pattern + # minutes: 30 # sync with library every hour at 30 min after select: - name: "Media Video Play" unique_id: media_video_play diff --git a/templates/media/preset/media_preset_shower.yaml b/templates/media/preset/media_preset_shower.yaml index 74a1fa2e9..d19fdc2e4 100644 --- a/templates/media/preset/media_preset_shower.yaml +++ b/templates/media/preset/media_preset_shower.yaml @@ -17,6 +17,11 @@ - trigger: state entity_id: input_text.media_speaker_shower to: + condition: + - condition: template + value_template: > + {{ state_attr('group.media_preset_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Speaker Shower" unique_id: media_speaker_shower @@ -51,8 +56,13 @@ for: 30 - trigger: state - entity_id: input_text.media_video_display_shower + entity_id: input_text.media_video_display_play to: + condition: + - condition: template + value_template: > + {{ state_attr('group.cast_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Video Display Shower" unique_id: media_video_display_shower @@ -85,6 +95,9 @@ - input_text.media_artist_shower - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -115,73 +128,6 @@ value: "{{ option }}" options: "{{ artists }}" -############################################################################### -## Media Artist Filter Shower -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_shower - - input_text.media_artist_filter_shower - - select.media_track_shower - - select.media_album_shower - - select.media_album_filter_shower - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - action: mass.get_library - data: - media_type: album - response_variable: mass_albums - - - variables: - artists: > - {% set artist_list = namespace(names=['']) %} - {% if states('input_select.media_type_shower') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_shower') - and states('select.media_album_filter_shower') - in ['', 'unknown', track.album.name] %} - {% set artist_list.names = artist_list.names + [track.artists[0].name] %} - {% endif %} - {% endfor %} - {% elif states('input_select.media_type_shower') == 'Album' %} - {% for album in mass_albums['albums'] %} - {% if album.name == states('select.media_album_shower') %} - {% set artist_list.names = artist_list.names + [album.artists[0].name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ artist_list.names | unique | list }} - select: - - name: "Media Artist Filter Shower" - unique_id: media_artist_filter_shower - state: "{{ states('input_text.media_artist_filter_shower') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_artist_filter_shower - data: - value: "{{ option }}" - options: "{{ artists }}" - ############################################################################### ## Media Album Shower ############################################################################### @@ -197,6 +143,9 @@ - input_text.media_album_shower - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -225,61 +174,6 @@ value: "{{ option }}" options: "{{ albums }}" -############################################################################### -## Media Album Filter Shower -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_shower - - input_text.media_album_filter_shower - - select.media_track_shower - - select.media_artist_filter_shower - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - variables: - albums: > - {% set album_list = namespace(names=['']) %} - {% if states('input_select.media_type_shower') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_shower') - and states('select.media_artist_filter_shower') - in ['', 'unknown', track.artists[0].name] %} - {% set album_list.names = album_list.names + [track.album.name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ album_list.names | unique | list }} - select: - - name: "Media Album Filter Shower" - unique_id: media_album_filter_shower - state: "{{ states('input_text.media_album_filter_shower') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_album_filter_shower - data: - value: "{{ option }}" - options: "{{ albums }}" - ############################################################################### ## Media Track Shower ############################################################################### @@ -297,6 +191,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -342,6 +239,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -387,6 +287,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -415,6 +318,128 @@ value: "{{ option }}" options: "{{ radios }}" +############################################################################### +## Media Artist Filter Shower +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_shower + - input_text.media_artist_filter_shower + - select.media_track_shower + - select.media_album_shower + - select.media_album_filter_shower + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - action: mass.get_library + data: + media_type: album + response_variable: mass_albums + + - variables: + artists: > + {% set artist_list = namespace(names=['']) %} + {% if states('input_select.media_type_shower') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_shower') + and states('select.media_album_filter_shower') + in ['', 'unknown', track.album.name] %} + {% set artist_list.names = artist_list.names + [track.artists[0].name] %} + {% endif %} + {% endfor %} + {% elif states('input_select.media_type_shower') == 'Album' %} + {% for album in mass_albums['albums'] %} + {% if album.name == states('select.media_album_shower') %} + {% set artist_list.names = artist_list.names + [album.artists[0].name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ artist_list.names | unique | list }} + select: + - name: "Media Artist Filter Shower" + unique_id: media_artist_filter_shower + state: "{{ states('input_text.media_artist_filter_shower') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_artist_filter_shower + data: + value: "{{ option }}" + options: "{{ artists }}" + +############################################################################### +## Media Album Filter Shower +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_shower + - input_text.media_album_filter_shower + - select.media_track_shower + - select.media_artist_filter_shower + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - variables: + albums: > + {% set album_list = namespace(names=['']) %} + {% if states('input_select.media_type_shower') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_shower') + and states('select.media_artist_filter_shower') + in ['', 'unknown', track.artists[0].name] %} + {% set album_list.names = album_list.names + [track.album.name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ album_list.names | unique | list }} + select: + - name: "Media Album Filter Shower" + unique_id: media_album_filter_shower + state: "{{ states('input_text.media_album_filter_shower') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_album_filter_shower + data: + value: "{{ option }}" + options: "{{ albums }}" + ############################################################################### ## Media Video Shower ############################################################################### @@ -432,6 +457,9 @@ - trigger: state entity_id: button.update_mass_media to: + #DISABLED not required until automatic video list + # - trigger: time_pattern + # minutes: 30 # sync with library every hour at 30 min after select: - name: "Media Video Shower" unique_id: media_video_shower diff --git a/templates/media/preset/media_preset_sleep.yaml b/templates/media/preset/media_preset_sleep.yaml index a35541b25..f9a1afb42 100644 --- a/templates/media/preset/media_preset_sleep.yaml +++ b/templates/media/preset/media_preset_sleep.yaml @@ -17,6 +17,11 @@ - trigger: state entity_id: input_text.media_speaker_sleep to: + condition: + - condition: template + value_template: > + {{ state_attr('group.media_preset_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Speaker Sleep" unique_id: media_speaker_sleep @@ -51,8 +56,13 @@ for: 30 - trigger: state - entity_id: input_text.media_video_display_sleep + entity_id: input_text.media_video_display_play to: + condition: + - condition: template + value_template: > + {{ state_attr('group.cast_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Video Display Sleep" unique_id: media_video_display_sleep @@ -85,6 +95,9 @@ - input_text.media_artist_sleep - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -115,73 +128,6 @@ value: "{{ option }}" options: "{{ artists }}" -############################################################################### -## Media Artist Filter Sleep -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_sleep - - input_text.media_artist_filter_sleep - - select.media_track_sleep - - select.media_album_sleep - - select.media_album_filter_sleep - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - action: mass.get_library - data: - media_type: album - response_variable: mass_albums - - - variables: - artists: > - {% set artist_list = namespace(names=['']) %} - {% if states('input_select.media_type_sleep') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_sleep') - and states('select.media_album_filter_sleep') - in ['', 'unknown', track.album.name] %} - {% set artist_list.names = artist_list.names + [track.artists[0].name] %} - {% endif %} - {% endfor %} - {% elif states('input_select.media_type_sleep') == 'Album' %} - {% for album in mass_albums['albums'] %} - {% if album.name == states('select.media_album_sleep') %} - {% set artist_list.names = artist_list.names + [album.artists[0].name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ artist_list.names | unique | list }} - select: - - name: "Media Artist Filter Sleep" - unique_id: media_artist_filter_sleep - state: "{{ states('input_text.media_artist_filter_sleep') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_artist_filter_sleep - data: - value: "{{ option }}" - options: "{{ artists }}" - ############################################################################### ## Media Album Sleep ############################################################################### @@ -197,6 +143,9 @@ - input_text.media_album_sleep - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -225,61 +174,6 @@ value: "{{ option }}" options: "{{ albums }}" -############################################################################### -## Media Album Filter Sleep -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_sleep - - input_text.media_album_filter_sleep - - select.media_track_sleep - - select.media_artist_filter_sleep - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - variables: - albums: > - {% set album_list = namespace(names=['']) %} - {% if states('input_select.media_type_sleep') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_sleep') - and states('select.media_artist_filter_sleep') - in ['', 'unknown', track.artists[0].name] %} - {% set album_list.names = album_list.names + [track.album.name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ album_list.names | unique | list }} - select: - - name: "Media Album Filter Sleep" - unique_id: media_album_filter_sleep - state: "{{ states('input_text.media_album_filter_sleep') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_album_filter_sleep - data: - value: "{{ option }}" - options: "{{ albums }}" - ############################################################################### ## Media Track Sleep ############################################################################### @@ -297,6 +191,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -342,6 +239,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -387,6 +287,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -415,6 +318,128 @@ value: "{{ option }}" options: "{{ radios }}" +############################################################################### +## Media Artist Filter Sleep +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_sleep + - input_text.media_artist_filter_sleep + - select.media_track_sleep + - select.media_album_sleep + - select.media_album_filter_sleep + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - action: mass.get_library + data: + media_type: album + response_variable: mass_albums + + - variables: + artists: > + {% set artist_list = namespace(names=['']) %} + {% if states('input_select.media_type_sleep') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_sleep') + and states('select.media_album_filter_sleep') + in ['', 'unknown', track.album.name] %} + {% set artist_list.names = artist_list.names + [track.artists[0].name] %} + {% endif %} + {% endfor %} + {% elif states('input_select.media_type_sleep') == 'Album' %} + {% for album in mass_albums['albums'] %} + {% if album.name == states('select.media_album_sleep') %} + {% set artist_list.names = artist_list.names + [album.artists[0].name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ artist_list.names | unique | list }} + select: + - name: "Media Artist Filter Sleep" + unique_id: media_artist_filter_sleep + state: "{{ states('input_text.media_artist_filter_sleep') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_artist_filter_sleep + data: + value: "{{ option }}" + options: "{{ artists }}" + +############################################################################### +## Media Album Filter Sleep +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_sleep + - input_text.media_album_filter_sleep + - select.media_track_sleep + - select.media_artist_filter_sleep + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - variables: + albums: > + {% set album_list = namespace(names=['']) %} + {% if states('input_select.media_type_sleep') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_sleep') + and states('select.media_artist_filter_sleep') + in ['', 'unknown', track.artists[0].name] %} + {% set album_list.names = album_list.names + [track.album.name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ album_list.names | unique | list }} + select: + - name: "Media Album Filter Sleep" + unique_id: media_album_filter_sleep + state: "{{ states('input_text.media_album_filter_sleep') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_album_filter_sleep + data: + value: "{{ option }}" + options: "{{ albums }}" + ############################################################################### ## Media Video Sleep ############################################################################### @@ -432,6 +457,9 @@ - trigger: state entity_id: button.update_mass_media to: + #DISABLED not required until automatic video list + # - trigger: time_pattern + # minutes: 30 # sync with library every hour at 30 min after select: - name: "Media Video Sleep" unique_id: media_video_sleep diff --git a/templates/media/preset/media_preset_wake.yaml b/templates/media/preset/media_preset_wake.yaml index 4581d9876..6a71b21c3 100644 --- a/templates/media/preset/media_preset_wake.yaml +++ b/templates/media/preset/media_preset_wake.yaml @@ -17,6 +17,11 @@ - trigger: state entity_id: input_text.media_speaker_wake to: + condition: + - condition: template + value_template: > + {{ state_attr('group.media_preset_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Speaker Wake" unique_id: media_speaker_wake @@ -51,8 +56,13 @@ for: 30 - trigger: state - entity_id: input_text.media_video_display_wake + entity_id: input_text.media_video_display_play to: + condition: + - condition: template + value_template: > + {{ state_attr('group.cast_media_players', 'entity_id') + not in ['', '[]', none] }} select: - name: "Media Video Display Wake" unique_id: media_video_display_wake @@ -85,6 +95,9 @@ - input_text.media_artist_wake - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -115,73 +128,6 @@ value: "{{ option }}" options: "{{ artists }}" -############################################################################### -## Media Artist Filter Wake -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_wake - - input_text.media_artist_filter_wake - - select.media_track_wake - - select.media_album_wake - - select.media_album_filter_wake - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - action: mass.get_library - data: - media_type: album - response_variable: mass_albums - - - variables: - artists: > - {% set artist_list = namespace(names=['']) %} - {% if states('input_select.media_type_wake') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_wake') - and states('select.media_album_filter_wake') - in ['', 'unknown', track.album.name] %} - {% set artist_list.names = artist_list.names + [track.artists[0].name] %} - {% endif %} - {% endfor %} - {% elif states('input_select.media_type_wake') == 'Album' %} - {% for album in mass_albums['albums'] %} - {% if album.name == states('select.media_album_wake') %} - {% set artist_list.names = artist_list.names + [album.artists[0].name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ artist_list.names | unique | list }} - select: - - name: "Media Artist Filter Wake" - unique_id: media_artist_filter_wake - state: "{{ states('input_text.media_artist_filter_wake') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_artist_filter_wake - data: - value: "{{ option }}" - options: "{{ artists }}" - ############################################################################### ## Media Album Wake ############################################################################### @@ -197,6 +143,9 @@ - input_text.media_album_wake - button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -225,61 +174,6 @@ value: "{{ option }}" options: "{{ albums }}" -############################################################################### -## Media Album Filter Wake -############################################################################### -- trigger: - - trigger: homeassistant - event: start - - - trigger: event - event_type: event_template_reloaded - - - trigger: state - entity_id: - - input_select.media_type_wake - - input_text.media_album_filter_wake - - select.media_track_wake - - select.media_artist_filter_wake - - button.update_mass_media - to: - not_from: - - unknown - - unavailable - action: - - action: mass.get_library - data: - media_type: track - response_variable: mass_tracks - - - variables: - albums: > - {% set album_list = namespace(names=['']) %} - {% if states('input_select.media_type_wake') == 'Track' %} - {% for track in mass_tracks['tracks'] %} - {% if track.name == states('select.media_track_wake') - and states('select.media_artist_filter_wake') - in ['', 'unknown', track.artists[0].name] %} - {% set album_list.names = album_list.names + [track.album.name] %} - {% endif %} - {% endfor %} - {% endif %} - {{ album_list.names | unique | list }} - select: - - name: "Media Album Filter Wake" - unique_id: media_album_filter_wake - state: "{{ states('input_text.media_album_filter_wake') }}" - select_option: - - condition: template - value_template: "{{ option not in ['', none] }}" - - - action: input_text.set_value - target: - entity_id: input_text.media_album_filter_wake - data: - value: "{{ option }}" - options: "{{ albums }}" - ############################################################################### ## Media Track Wake ############################################################################### @@ -297,6 +191,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -342,6 +239,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -387,6 +287,9 @@ - trigger: state entity_id: button.update_mass_media to: + + - trigger: time_pattern + minutes: 30 # sync with library every hour at 30 min after action: - action: mass.get_library data: @@ -415,6 +318,128 @@ value: "{{ option }}" options: "{{ radios }}" +############################################################################### +## Media Artist Filter Wake +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_wake + - input_text.media_artist_filter_wake + - select.media_track_wake + - select.media_album_wake + - select.media_album_filter_wake + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - action: mass.get_library + data: + media_type: album + response_variable: mass_albums + + - variables: + artists: > + {% set artist_list = namespace(names=['']) %} + {% if states('input_select.media_type_wake') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_wake') + and states('select.media_album_filter_wake') + in ['', 'unknown', track.album.name] %} + {% set artist_list.names = artist_list.names + [track.artists[0].name] %} + {% endif %} + {% endfor %} + {% elif states('input_select.media_type_wake') == 'Album' %} + {% for album in mass_albums['albums'] %} + {% if album.name == states('select.media_album_wake') %} + {% set artist_list.names = artist_list.names + [album.artists[0].name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ artist_list.names | unique | list }} + select: + - name: "Media Artist Filter Wake" + unique_id: media_artist_filter_wake + state: "{{ states('input_text.media_artist_filter_wake') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_artist_filter_wake + data: + value: "{{ option }}" + options: "{{ artists }}" + +############################################################################### +## Media Album Filter Wake +############################################################################### +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: + - input_select.media_type_wake + - input_text.media_album_filter_wake + - select.media_track_wake + - select.media_artist_filter_wake + - button.update_mass_media + to: + not_from: + - unknown + - unavailable + action: + - action: mass.get_library + data: + media_type: track + response_variable: mass_tracks + + - variables: + albums: > + {% set album_list = namespace(names=['']) %} + {% if states('input_select.media_type_wake') == 'Track' %} + {% for track in mass_tracks['tracks'] %} + {% if track.name == states('select.media_track_wake') + and states('select.media_artist_filter_wake') + in ['', 'unknown', track.artists[0].name] %} + {% set album_list.names = album_list.names + [track.album.name] %} + {% endif %} + {% endfor %} + {% endif %} + {{ album_list.names | unique | list }} + select: + - name: "Media Album Filter Wake" + unique_id: media_album_filter_wake + state: "{{ states('input_text.media_album_filter_wake') }}" + select_option: + - condition: template + value_template: "{{ option not in ['', none] }}" + + - action: input_text.set_value + target: + entity_id: input_text.media_album_filter_wake + data: + value: "{{ option }}" + options: "{{ albums }}" + ############################################################################### ## Media Video Wake ############################################################################### @@ -432,6 +457,9 @@ - trigger: state entity_id: button.update_mass_media to: + #DISABLED not required until automatic video list + # - trigger: time_pattern + # minutes: 30 # sync with library every hour at 30 min after select: - name: "Media Video Wake" unique_id: media_video_wake diff --git a/templates/spa.yaml b/templates/spa.yaml index 5e2058621..32fa2e24e 100644 --- a/templates/spa.yaml +++ b/templates/spa.yaml @@ -75,7 +75,7 @@ - name: "Spa Heating" unique_id: spa_heating device_class: heat - state: "{{ is_state_attr('climate.spa_climate', 'hvac_action', 'heating') }}" + state: "{{ is_state_attr('climate.spa', 'hvac_action', 'heating') }}" - sensor: - name: "Spa Temperature" @@ -83,16 +83,16 @@ icon: mdi:thermometer device_class: temperature unit_of_measurement: "°C" - state: "{{ state_attr('climate.spa_climate', 'current_temperature') | float }}" - availability: "{{ is_number(state_attr('climate.spa_climate', 'current_temperature')) }}" + state: "{{ state_attr('climate.spa', 'current_temperature') | float }}" + availability: "{{ is_number(state_attr('climate.spa', 'current_temperature')) }}" - name: "Spa Target Temperature" unique_id: spa_target_temperature icon: mdi:thermometer device_class: temperature unit_of_measurement: "°C" - state: "{{ state_attr('climate.spa_climate', 'temperature') | float }}" - availability: "{{ is_number(state_attr('climate.spa_climate', 'temperature')) }}" + state: "{{ state_attr('climate.spa', 'temperature') | float }}" + availability: "{{ is_number(state_attr('climate.spa', 'temperature')) }}" - name: "Hot Tub Power" unique_id: hot_tub_power diff --git a/templates/weather/weather.yaml b/templates/weather/weather.yaml index df4f2563a..dda1aefb6 100644 --- a/templates/weather/weather.yaml +++ b/templates/weather/weather.yaml @@ -380,7 +380,7 @@ value: "{{ now() }}" sensor: - name: "Lightning Last Strike Distance" - unique_id: lightning_last_strike_distance #VERIFY + unique_id: lightning_last_strike_distance icon: mdi:clock-star-four-points device_class: distance state_class: measurement @@ -412,7 +412,7 @@ value: "{{ now() }}" sensor: - name: "Lightning Last Strike" - unique_id: lightning_last_strike #VERIFY + unique_id: lightning_last_strike icon: mdi:clock-star-four-points device_class: timestamp state: > @@ -521,6 +521,38 @@ provider: "Pirate Weather" availability: "{{ is_number(states('sensor.pirateweather_current_day_ice_accumulation')) }}" +- trigger: + - trigger: homeassistant + event: start + + - trigger: event + event_type: event_template_reloaded + + - trigger: state + entity_id: sensor.precipitation_accumulation_today_calculated + to: + action: + - variables: + previous: "{{ states('input_number.precipitation_accumulation_today_checked') | float(-1) }}" + current: "{{ states('sensor.precipitation_accumulation_today_calculated') | float(-1) }}" + + - action: input_number.set_value + target: + entity_id: input_number.precipitation_accumulation_today_checked + data: + value: "{{ 0 if current == 0 else iif(current > previous, current, previous) }}" + sensor: + - name: "Precipitation Accumulation Today" + unique_id: precipitation_accumulation_today + icon: mdi:weather-pouring + device_class: precipitation + state_class: measurement + unit_of_measurement: mm + state: "{{ states('input_number.precipitation_accumulation_today_checked') }}" + attributes: + provider: "Pirate Weather" + availability: "{{ is_number(states('sensor.precipitation_accumulation_today_calculated')) }}" + - binary_sensor: ############################################################################### ## Integrations @@ -618,7 +650,7 @@ - name: "Precipitation Active" unique_id: precipitation_active icon: mdi:weather-pouring - state: "{{ states('sensor.precipitation_type') in ['rain', 'snow', 'ice'] }}" + state: "{{ states('sensor.precipitation_type') in ['rain', 'snow'] }}" - name: "Precipitation Likely Soon" # next 2 hours unique_id: precipitation_likely_soon @@ -728,12 +760,12 @@ ############################################################################### ## Condition ############################################################################### - #IDEA add icons for envcan extra values - req custom weather card - #NOTE need most accurate for precipitation_type - envcan - name: "Current Condition" unique_id: current_condition - icon: mdi:weather-partly-snowy-rainy - state: > + icon: > + {% from 'weather.jinja' import condition_icon %} + {{ condition_icon(states(this.entity_id)) }} + state: > #NOTE need accurate for precipitation_type - envcan {% set condition = states('weather.windsor_forecast') %} {% if condition | lower == 'clear' and is_state('sun.sun', 'above_horizon') %} sunny {% elif condition | lower == 'clear' and is_state('sun.sun', 'below_horizon') %} clear-night @@ -755,7 +787,9 @@ - name: "Condition Today" unique_id: condition_today - icon: mdi:weather-partly-snowy-rainy + icon: > + {% from 'weather.jinja' import condition_icon %} + {{ condition_icon(states(this.entity_id)) }} state: "{{ state_attr('sensor.daily_weather', 'forecast')[0].condition }}" attributes: provider: "Daily Weather" @@ -766,7 +800,9 @@ - name: "Condition Tomorrow" unique_id: condition_tomorrow - icon: mdi:weather-partly-snowy-rainy + icon: > + {% from 'weather.jinja' import condition_icon %} + {{ condition_icon(states(this.entity_id)) }} state: "{{ state_attr('sensor.daily_weather', 'forecast')[1].condition }}" attributes: provider: "Daily Weather" @@ -807,7 +843,7 @@ icon: mdi:thermometer state: > {% set temp = states('sensor.outdoor_temperature') | float %} - {% if temp >= 40 %} Inferno + {% if temp >= 40 %} Extreme Heat {% elif temp >= 35 %} Very Hot {% elif temp >= 30 %} Hot {% elif temp >= 25 %} Warm @@ -815,8 +851,9 @@ {% elif temp >= 15 %} Cool {% elif temp >= 5 %} Chilly {% elif temp >= 0 %} Cold - {% elif temp >= -7 %} Freezing - {% else %} Frigid + {% elif temp >= -5 %} Freezing + {% elif temp >= -15 %} Frigid + {% else %} Extreme Cold {% endif %} attributes: provider: "{{ state_attr('sensor.outdoor_temperature', 'provider') }}" @@ -1033,20 +1070,22 @@ - name: "Dew Point Comfort Level" unique_id: dew_point_comfort_level icon: mdi:thermometer-water + device_class: enum state: > {% set dewpoint = states('sensor.dew_point') | float %} - {% if dewpoint >= 80 %} Severely High - {% elif dewpoint >= 75 %} Miserable - {% elif dewpoint >= 70 %} Oppressive - {% elif dewpoint >= 65 %} Uncomfortable - {% elif dewpoint >= 60 %} Ok for Most - {% elif dewpoint >= 55 %} Comfortable - {% elif dewpoint >= 50 %} Very Comfortable - {% elif dewpoint >= 30 %} Somewhat Dry - {% elif dewpoint >= -0.5 %} Dry + {% if dewpoint >= 26 %} Severely High + {% elif dewpoint >= 24 %} Oppressive + {% elif dewpoint >= 21 %} Very Humid + {% elif dewpoint >= 18 %} Uncomfortable + {% elif dewpoint >= 16 %} Ok For Most + {% elif dewpoint >= 12 %} Comfortable + {% elif dewpoint >= 10 %} Very Comfortable + {% elif dewpoint >= 8 %} Somewhat Dry + {% elif dewpoint >= 5 %} Dry {% else %} Very Dry {% endif %} attributes: + options: "{{ ['Severely High', 'Oppressive', 'Very Humid', 'Uncomfortable', 'Ok For Most', 'Comfortable', 'Very Comfortable', 'Somewhat Dry', 'Dry', 'Very Dry'] }}" provider: "{{ state_attr('sensor.dew_point', 'provider') }}" availability: "{{ is_number(states('sensor.dew_point')) }}" @@ -1136,17 +1175,13 @@ and is_number(states('sensor.tempest_st_00057689_snow_probability')) }} - name: "Precipitation Intensity" - unique_id: precipitation_intensity #TEST use pirate or weatherflow? + unique_id: precipitation_intensity icon: mdi:weather-pouring device_class: precipitation_intensity state_class: measurement unit_of_measurement: mm/h - # sensor.home_sensors_precipitation_rate - # sensor.pirateweather_precip_intensity state: "{{ states('sensor.home_sensors_precipitation_rate') | float }}" attributes: - # Pirate Weather - # Weatherflow provider: "Weatherflow" availability: "{{ is_number(states('sensor.home_sensors_precipitation_rate')) }}" @@ -1187,6 +1222,28 @@ provider: "Pirate Weather" availability: "{{ is_number(states('sensor.pirateweather_daily_max_precip_intensity_0d')) }}" + - name: "Precipitation Accumulation Today Calculated" + unique_id: precipitation_accumulation_today_calculated + icon: mdi:weather-pouring + device_class: precipitation + state_class: measurement + unit_of_measurement: mm + state: > + {% set rain = states('sensor.rain_accumulation_today') | float(-1) %} + {% set snow = states('sensor.snow_accumulation_today') | float(-1) %} + {% set ice = states('sensor.ice_accumulation_today') | float(-1) %} + {% set total = -1 %} + {% if rain >= 0 %}{% set total = total + rain if total >= 0 else rain %}{% endif %} + {% if snow >= 0 %}{% set total = total + snow if total >= 0 else snow %}{% endif %} + {% if ice >= 0 %}{% set total = total + ice if total >= 0 else ice %}{% endif %} + {{ none if total < 0 else total }} + attributes: + provider: "{{ state_attr('sensor.rain_accumulation_today', 'provider') }}" + availability: > + {{ is_number(states('sensor.rain_accumulation_today')) + or is_number(states('sensor.snow_accumulation_today')) + or is_number(states('sensor.ice_accumulation_today')) }} + - name: "Precipitation Expected Today" unique_id: precipitation_expected_today icon: mdi:weather-pouring @@ -1202,7 +1259,7 @@ and is_number(state_attr('sensor.daily_weather', 'forecast')[0].precipitation) }} - name: "Precipitation Expected Tomorrow" - unique_id: precipitation_expected_tomorrow #VERIFY does this include snow / ice? + unique_id: precipitation_expected_tomorrow icon: mdi:weather-pouring device_class: precipitation unit_of_measurement: mm @@ -1285,28 +1342,6 @@ provider: "Pirate Weather" availability: "{{ is_number(states('sensor.pirateweather_ice_accumulation_1d')) }}" - - name: "Precipitation Accumulation Today" - unique_id: precipitation_accumulation_today - icon: mdi:weather-pouring - device_class: precipitation - state_class: measurement - unit_of_measurement: mm - state: > - {% set rain = states('sensor.rain_accumulation_today') | float(-1) %} - {% set snow = states('sensor.snow_accumulation_today') | float(-1) %} - {% set ice = states('sensor.snow_accumulation_today') | float(-1) %} - {%- set total = -1 %} - {% if rain >= 0 %}{%- set total = total + rain if total >= 0 else rain %}{% endif %} - {% if snow >= 0 %}{%- set total = total + snow if total >= 0 else snow %}{% endif %} - {% if ice >= 0 %}{%- set total = total + ice if total >= 0 else ice %}{% endif %} - {{ none if total < 0 else total }} - attributes: - provider: "{{ state_attr('sensor.rain_accumulation_today', 'provider') }}" - availability: > - {{ is_number(states('sensor.rain_accumulation_today')) - or is_number(states('sensor.snow_accumulation_today')) - or is_number(states('sensor.snow_accumulation_today')) }} - - name: "Precipitation Accumulation Yesterday" unique_id: precipitation_accumulation_yesterday icon: mdi:weather-pouring @@ -1319,7 +1354,7 @@ availability: "{{ is_number(states('sensor.home_sensors_precipitation_yesterday_checked')) }}" - name: "Precipitation Type" - unique_id: precipitation_type #TODO type ice + unique_id: precipitation_type icon: > {% set type = states(this.entity_id) %} {% if type == 'rain' %} mdi:weather-pouring @@ -1329,7 +1364,7 @@ # check tempest intensity > 0 when condition is rain for local accuaracy state: > {% set condition = states('sensor.current_condition') %} - {% if condition | contains('snow') %} Snow + {% if condition | contains('snow') %} snow {% elif states('sensor.tempest_st_00057689_rain_intensity') | float(0) > 0 and (condition | contains('rain') or condition | contains('pouring')) %} rain @@ -1591,7 +1626,7 @@ unique_id: wind_direction icon: mdi:weather-windy state: > - {%- from 'speech.jinja' import cardinal_direction %} + {% from 'speech.jinja' import cardinal_direction %} {{- cardinal_direction(states('sensor.wind_bearing')) -}} attributes: provider: "{{ state_attr('sensor.wind_bearing', 'provider') }}" @@ -1601,7 +1636,7 @@ unique_id: wind_full_direction icon: mdi:weather-windy state: > - {%- from 'speech.jinja' import full_cardinal_direction %} + {% from 'speech.jinja' import full_cardinal_direction %} {{- full_cardinal_direction(states('sensor.wind_bearing')) -}} attributes: provider: "{{ state_attr('sensor.wind_bearing', 'provider') }}" @@ -1742,6 +1777,15 @@ provider: "OpenUV" availability: "{{ is_number(states('sensor.max_uv_index')) }}" + - name: "Ozone Level" + unique_id: ozone_level + device_class: aqi + state_class: measurement + state: "{{ states('sensor.current_ozone_level') }}" + attributes: + provider: "OpenUV" + availability: "{{ is_number(states('sensor.current_ozone_level')) }}" + ############################################################################### ## Air Quality ############################################################################### @@ -1763,8 +1807,8 @@ {{ aqi_risk(states('sensor.air_quality_index')) }} availability: "{{ is_number(states('sensor.air_quality_index')) }}" - - name: "Ozone" - unique_id: ozone + - name: "Ozone Index" + unique_id: ozone_index device_class: aqi state_class: measurement state: "{{ states('sensor.windsor_ozone') }}" @@ -1900,7 +1944,7 @@ - name: "Fire Risk Today" unique_id: fire_risk_today icon: mdi:fire - state: "{{ '%0.1f' | format(states('sensor.pirateweather_fire_risk_level_0d') | float(-1)) }}" + state: "{{ states('sensor.pirateweather_fire_risk_level_0d') }}" attributes: provider: "Pirate Weather" availability: "{{ has_value('sensor.pirateweather_fire_risk_level_0d') }}" diff --git a/ui-kiosk.yaml b/ui-kiosk.yaml index 28dc886df..21875425c 100644 --- a/ui-kiosk.yaml +++ b/ui-kiosk.yaml @@ -75,7 +75,6 @@ views: - !include /config/ui/dashboard/subview/camera/security/side_gate_front.yaml # weather subviews - - !include /config/ui/dashboard/subview/weather/weather_statistics.yaml - !include /config/ui/dashboard/subview/weather/weather_forecast.yaml - !include /config/ui/dashboard/subview/weather/weather_comparison.yaml - !include /config/ui/dashboard/subview/weather/weather_data.yaml diff --git a/ui-lovelace.yaml b/ui-lovelace.yaml index dd6aa6d22..ed281d1eb 100644 --- a/ui-lovelace.yaml +++ b/ui-lovelace.yaml @@ -12,7 +12,7 @@ views: - !include /config/ui/dashboard/browser/garage.yaml - !include /config/ui/dashboard/browser/media.yaml - !include /config/ui/dashboard/browser/schedule.yaml - #DISABLED - !include /config/ui/dashboard/browser/rooms.yaml + # #DISABLED - !include /config/ui/dashboard/browser/rooms.yaml - !include /config/ui/dashboard/browser/weather.yaml ############################################################################### @@ -76,7 +76,6 @@ views: - !include /config/ui/dashboard/subview/camera/security/side_gate_front.yaml # weather subviews - - !include /config/ui/dashboard/subview/weather/weather_statistics.yaml - !include /config/ui/dashboard/subview/weather/weather_forecast.yaml - !include /config/ui/dashboard/subview/weather/weather_comparison.yaml - !include /config/ui/dashboard/subview/weather/weather_data.yaml diff --git a/ui-mobile.yaml b/ui-mobile.yaml index 134c80b72..67e489d85 100644 --- a/ui-mobile.yaml +++ b/ui-mobile.yaml @@ -74,7 +74,6 @@ views: - !include /config/ui/dashboard/subview/camera/security/side_gate_front.yaml # weather subviews - - !include /config/ui/dashboard/subview/weather/weather_statistics.yaml - !include /config/ui/dashboard/subview/weather/weather_forecast.yaml - !include /config/ui/dashboard/subview/weather/weather_comparison.yaml - !include /config/ui/dashboard/subview/weather/weather_data.yaml diff --git a/ui/button/climate/spa.yaml b/ui/button/climate/spa.yaml index 84b4ac825..6cf830672 100644 --- a/ui/button/climate/spa.yaml +++ b/ui/button/climate/spa.yaml @@ -3,7 +3,7 @@ ############################################################################### type: custom:button-card template: menu_button -entity: climate.spa_climate +entity: climate.spa icon: mdi:hot-tub show_label: true label: > @@ -20,9 +20,9 @@ styles: icon: - color: > [[[ - if (states['fan.spa_pump1'].state == 'on' - || states['fan.spa_pump2'].state == 'on' - || states['fan.spa_pump3'].state == 'on') + if (states['fan.spa_pump_1'].state == 'on' + || states['fan.spa_pump_2'].state == 'on' + || states['fan.spa_pump_3'].state == 'on') return 'var(--state-active-color)'; else return 'var(--state-icon-color)'; @@ -61,6 +61,6 @@ hold_action: perform_action: fan.turn_off target: entity_id: - - fan.spa_pump1 - - fan.spa_pump2 - - fan.spa_pump3 + - fan.spa_pump_1 + - fan.spa_pump_2 + - fan.spa_pump_3 diff --git a/ui/button/layout/weather_views.yaml b/ui/button/layout/weather_views.yaml index 24f32761d..db4cc4d01 100644 --- a/ui/button/layout/weather_views.yaml +++ b/ui/button/layout/weather_views.yaml @@ -2,12 +2,11 @@ ## Weather Button Layout ############################################################################### type: grid -columns: 6 +columns: 5 square: true cards: - !include /config/ui/button/weather/weather_forecast.yaml - !include /config/ui/button/weather/satellite.yaml - !include /config/ui/button/weather/weather_report.yaml - !include /config/ui/button/weather/weatherflow.yaml - - !include /config/ui/button/weather/weather_stats.yaml - !include /config/ui/button/weather/weather_comparison.yaml diff --git a/ui/button/weather/humidity.yaml b/ui/button/weather/humidity.yaml index edf22d891..587e64552 100644 --- a/ui/button/weather/humidity.yaml +++ b/ui/button/weather/humidity.yaml @@ -33,7 +33,7 @@ styles: ]]] tap_action: action: navigate - navigation_path: outdoor-temperature + navigation_path: atmospheric-conditions hold_action: action: navigate navigation_path: humidity-map diff --git a/ui/button/weather/weather_stats.yaml b/ui/button/weather/weather_stats.yaml deleted file mode 100644 index 16c61f8f4..000000000 --- a/ui/button/weather/weather_stats.yaml +++ /dev/null @@ -1,9 +0,0 @@ -############################################################################### -## Weather Stats Button -############################################################################### -type: custom:button-card -template: menu_button -icon: mdi:chart-areaspline -tap_action: - action: navigate - navigation_path: weather-statistics diff --git a/ui/card/alarm/door_sensors.yaml b/ui/card/alarm/door_sensors.yaml index be88f81c7..fb03fe4f4 100644 --- a/ui/card/alarm/door_sensors.yaml +++ b/ui/card/alarm/door_sensors.yaml @@ -12,7 +12,7 @@ cards: {{ door_icon('binary_sensor.front_door') }} icon_color: > {% from 'door.jinja' import door_icon_color %} - {{ door_icon_color('binary_sensor.front_door') }} + {{ door_color('binary_sensor.front_door') }} badge_icon: > {% from 'door.jinja' import door_badge %} {{ door_badge('binary_sensor.front_door') }} @@ -50,7 +50,7 @@ cards: {{ door_icon('binary_sensor.side_door') }} icon_color: > {% from 'door.jinja' import door_icon_color %} - {{ door_icon_color('binary_sensor.side_door') }} + {{ door_color('binary_sensor.side_door') }} badge_icon: > {% from 'door.jinja' import door_badge %} {{ door_badge('binary_sensor.side_door') }} @@ -88,7 +88,7 @@ cards: {{ door_icon('binary_sensor.back_door') }} icon_color: > {% from 'door.jinja' import door_icon_color %} - {{ door_icon_color('binary_sensor.back_door') }} + {{ door_color('binary_sensor.back_door') }} badge_icon: > {% from 'door.jinja' import door_badge %} {{ door_badge('binary_sensor.back_door') }} @@ -126,7 +126,7 @@ cards: {{ door_icon('binary_sensor.patio_door') }} icon_color: > {% from 'door.jinja' import door_icon_color %} - {{ door_icon_color('binary_sensor.patio_door') }} + {{ door_color('binary_sensor.patio_door') }} badge_icon: > {% from 'door.jinja' import door_badge %} {{ door_badge('binary_sensor.patio_door') }} @@ -164,7 +164,7 @@ cards: {{ door_icon('binary_sensor.garage_side_door') }} icon_color: > {% from 'door.jinja' import door_icon_color %} - {{ door_icon_color('binary_sensor.garage_side_door') }} + {{ door_color('binary_sensor.garage_side_door') }} badge_icon: > {% from 'door.jinja' import door_badge %} {{ door_badge('binary_sensor.garage_side_door') }} @@ -202,7 +202,7 @@ cards: {{ door_icon('binary_sensor.garage_side_back_door') }} icon_color: > {% from 'door.jinja' import door_icon_color %} - {{ door_icon_color('binary_sensor.garage_side_back_door') }} + {{ door_color('binary_sensor.garage_side_back_door') }} badge_icon: > {% from 'door.jinja' import door_badge %} {{ door_badge('binary_sensor.garage_side_back_door') }} diff --git a/ui/card/alarm/window/bedroom_front.yaml b/ui/card/alarm/window/bedroom_front.yaml index 70716c047..723d723c0 100644 --- a/ui/card/alarm/window/bedroom_front.yaml +++ b/ui/card/alarm/window/bedroom_front.yaml @@ -8,7 +8,7 @@ icon: > {{ window_icon('binary_sensor.bedroom_front_window') }} icon_color: > {% from 'window.jinja' import window_icon_color %} - {{ window_icon_color('binary_sensor.bedroom_front_window') }} + {{ window_color('binary_sensor.bedroom_front_window') }} badge_icon: > {% from 'window.jinja' import window_badge %} {{ window_badge('binary_sensor.bedroom_front_window') }} diff --git a/ui/card/alarm/window/bedroom_side.yaml b/ui/card/alarm/window/bedroom_side.yaml index 346da01eb..d7d8627a3 100644 --- a/ui/card/alarm/window/bedroom_side.yaml +++ b/ui/card/alarm/window/bedroom_side.yaml @@ -8,7 +8,7 @@ icon: > {{ window_icon('binary_sensor.bedroom_side_window') }} icon_color: > {% from 'window.jinja' import window_icon_color %} - {{ window_icon_color('binary_sensor.bedroom_side_window') }} + {{ window_color('binary_sensor.bedroom_side_window') }} badge_icon: > {% from 'window.jinja' import window_badge %} {{ window_badge('binary_sensor.bedroom_side_window') }} diff --git a/ui/card/alarm/window/downstairs_kitchen.yaml b/ui/card/alarm/window/downstairs_kitchen.yaml index aff20f52e..945f87128 100644 --- a/ui/card/alarm/window/downstairs_kitchen.yaml +++ b/ui/card/alarm/window/downstairs_kitchen.yaml @@ -8,7 +8,7 @@ icon: > {{ window_icon('binary_sensor.downstairs_kitchen_window') }} icon_color: > {% from 'window.jinja' import window_icon_color %} - {{ window_icon_color('binary_sensor.downstairs_kitchen_window') }} + {{ window_color('binary_sensor.downstairs_kitchen_window') }} badge_icon: > {% from 'window.jinja' import window_badge %} {{ window_badge('binary_sensor.downstairs_kitchen_window') }} diff --git a/ui/card/alarm/window/family_room.yaml b/ui/card/alarm/window/family_room.yaml index 3d22aefb1..85c9ee8c4 100644 --- a/ui/card/alarm/window/family_room.yaml +++ b/ui/card/alarm/window/family_room.yaml @@ -8,7 +8,7 @@ icon: > {{ window_icon('binary_sensor.family_room_window') }} icon_color: > {% from 'window.jinja' import window_icon_color %} - {{ window_icon_color('binary_sensor.family_room_window') }} + {{ window_color('binary_sensor.family_room_window') }} badge_icon: > {% from 'window.jinja' import window_badge %} {{ window_badge('binary_sensor.family_room_window') }} diff --git a/ui/card/alarm/window/kitchen.yaml b/ui/card/alarm/window/kitchen.yaml index 2d8f0b5ea..41a12743c 100644 --- a/ui/card/alarm/window/kitchen.yaml +++ b/ui/card/alarm/window/kitchen.yaml @@ -8,7 +8,7 @@ icon: > {{ window_icon('binary_sensor.kitchen_window') }} icon_color: > {% from 'window.jinja' import window_icon_color %} - {{ window_icon_color('binary_sensor.kitchen_window') }} + {{ window_color('binary_sensor.kitchen_window') }} badge_icon: > {% from 'window.jinja' import window_badge %} {{ window_badge('binary_sensor.kitchen_window') }} diff --git a/ui/card/alarm/window/kitchen_sink.yaml b/ui/card/alarm/window/kitchen_sink.yaml index 89024bfa4..65ba8c636 100644 --- a/ui/card/alarm/window/kitchen_sink.yaml +++ b/ui/card/alarm/window/kitchen_sink.yaml @@ -8,7 +8,7 @@ icon: > {{ window_icon('binary_sensor.kitchen_sink_window') }} icon_color: > {% from 'window.jinja' import window_icon_color %} - {{ window_icon_color('binary_sensor.kitchen_sink_window') }} + {{ window_color('binary_sensor.kitchen_sink_window') }} badge_icon: > {% from 'window.jinja' import window_badge %} {{ window_badge('binary_sensor.kitchen_sink_window') }} diff --git a/ui/card/alarm/window/laundry_room.yaml b/ui/card/alarm/window/laundry_room.yaml index e221c114a..4aff21880 100644 --- a/ui/card/alarm/window/laundry_room.yaml +++ b/ui/card/alarm/window/laundry_room.yaml @@ -8,7 +8,7 @@ icon: > {{ window_icon('binary_sensor.laundry_room_window') }} icon_color: > {% from 'window.jinja' import window_icon_color %} - {{ window_icon_color('binary_sensor.laundry_room_window') }} + {{ window_color('binary_sensor.laundry_room_window') }} badge_icon: > {% from 'window.jinja' import window_badge %} {{ window_badge('binary_sensor.laundry_room_window') }} diff --git a/ui/card/alarm/window/living_room_1.yaml b/ui/card/alarm/window/living_room_1.yaml index 5e36f3f4a..cd2c96609 100644 --- a/ui/card/alarm/window/living_room_1.yaml +++ b/ui/card/alarm/window/living_room_1.yaml @@ -8,7 +8,7 @@ icon: > {{ window_icon('binary_sensor.living_room_1_window') }} icon_color: > {% from 'window.jinja' import window_icon_color %} - {{ window_icon_color('binary_sensor.living_room_1_window') }} + {{ window_color('binary_sensor.living_room_1_window') }} badge_icon: > {% from 'window.jinja' import window_badge %} {{ window_badge('binary_sensor.living_room_1_window') }} diff --git a/ui/card/alarm/window/living_room_2.yaml b/ui/card/alarm/window/living_room_2.yaml index d8dab9e43..ff5c4d9ba 100644 --- a/ui/card/alarm/window/living_room_2.yaml +++ b/ui/card/alarm/window/living_room_2.yaml @@ -8,7 +8,7 @@ icon: > {{ window_icon('binary_sensor.living_room_2_window') }} icon_color: > {% from 'window.jinja' import window_icon_color %} - {{ window_icon_color('binary_sensor.living_room_2_window') }} + {{ window_color('binary_sensor.living_room_2_window') }} badge_icon: > {% from 'window.jinja' import window_badge %} {{ window_badge('binary_sensor.living_room_2_window') }} diff --git a/ui/card/alarm/window/living_room_3.yaml b/ui/card/alarm/window/living_room_3.yaml index cdce1ac53..33ff14f42 100644 --- a/ui/card/alarm/window/living_room_3.yaml +++ b/ui/card/alarm/window/living_room_3.yaml @@ -8,7 +8,7 @@ icon: > {{ window_icon('binary_sensor.living_room_3_window') }} icon_color: > {% from 'window.jinja' import window_icon_color %} - {{ window_icon_color('binary_sensor.living_room_3_window') }} + {{ window_color('binary_sensor.living_room_3_window') }} badge_icon: > {% from 'window.jinja' import window_badge %} {{ window_badge('binary_sensor.living_room_3_window') }} diff --git a/ui/card/alarm/window/living_room_4.yaml b/ui/card/alarm/window/living_room_4.yaml index 08a912b5d..825b50032 100644 --- a/ui/card/alarm/window/living_room_4.yaml +++ b/ui/card/alarm/window/living_room_4.yaml @@ -8,7 +8,7 @@ icon: > {{ window_icon('binary_sensor.living_room_4_window') }} icon_color: > {% from 'window.jinja' import window_icon_color %} - {{ window_icon_color('binary_sensor.living_room_4_window') }} + {{ window_color('binary_sensor.living_room_4_window') }} badge_icon: > {% from 'window.jinja' import window_badge %} {{ window_badge('binary_sensor.living_room_4_window') }} diff --git a/ui/card/alarm/window/master_bathroom.yaml b/ui/card/alarm/window/master_bathroom.yaml index 5927dc46c..f69a761ba 100644 --- a/ui/card/alarm/window/master_bathroom.yaml +++ b/ui/card/alarm/window/master_bathroom.yaml @@ -8,7 +8,7 @@ icon: > {{ window_icon('binary_sensor.master_bathroom_window') }} icon_color: > {% from 'window.jinja' import window_icon_color %} - {{ window_icon_color('binary_sensor.master_bathroom_window') }} + {{ window_color('binary_sensor.master_bathroom_window') }} badge_icon: > {% from 'window.jinja' import window_badge %} {{ window_badge('binary_sensor.master_bathroom_window') }} diff --git a/ui/card/alarm/window/master_bedroom.yaml b/ui/card/alarm/window/master_bedroom.yaml index ebc729862..ec4a23d24 100644 --- a/ui/card/alarm/window/master_bedroom.yaml +++ b/ui/card/alarm/window/master_bedroom.yaml @@ -8,7 +8,7 @@ icon: > {{ window_icon('binary_sensor.master_bedroom_window') }} icon_color: > {% from 'window.jinja' import window_icon_color %} - {{ window_icon_color('binary_sensor.master_bedroom_window') }} + {{ window_color('binary_sensor.master_bedroom_window') }} badge_icon: > {% from 'window.jinja' import window_badge %} {{ window_badge('binary_sensor.master_bedroom_window') }} diff --git a/ui/card/alarm/window/office.yaml b/ui/card/alarm/window/office.yaml index 691e51068..235b8350f 100644 --- a/ui/card/alarm/window/office.yaml +++ b/ui/card/alarm/window/office.yaml @@ -8,7 +8,7 @@ icon: > {{ window_icon('binary_sensor.office_window') }} icon_color: > {% from 'window.jinja' import window_icon_color %} - {{ window_icon_color('binary_sensor.office_window') }} + {{ window_color('binary_sensor.office_window') }} badge_icon: > {% from 'window.jinja' import window_badge %} {{ window_badge('binary_sensor.office_window') }} diff --git a/ui/card/climate/spa_control.yaml b/ui/card/climate/spa_control.yaml index b47029ea2..8029f61e0 100644 --- a/ui/card/climate/spa_control.yaml +++ b/ui/card/climate/spa_control.yaml @@ -6,14 +6,14 @@ columns: 2 square: false cards: - type: thermostat - entity: climate.spa_climate + entity: climate.spa - type: grid columns: 1 square: false cards: - type: tile - entity: switch.spa_light1 + entity: light.spa_light name: "Light" tap_action: action: toggle @@ -21,7 +21,7 @@ cards: action: more-info - type: tile - entity: fan.spa_pump1 + entity: fan.spa_pump_1 name: "Pump 1" features: - type: "fan-speed" @@ -31,7 +31,7 @@ cards: action: more-info - type: tile - entity: fan.spa_pump2 + entity: fan.spa_pump_2 name: "Pump 2" features: - type: "fan-speed" @@ -41,7 +41,7 @@ cards: action: more-info - type: tile - entity: fan.spa_pump3 + entity: fan.spa_pump_3 name: "Pump 3" features: - type: "fan-speed" @@ -51,9 +51,9 @@ cards: action: more-info - type: tile - entity: binary_sensor.spa_filter1 + entity: binary_sensor.spa_filter_cycle_1 name: "Filter Cycle 1" - type: tile - entity: binary_sensor.spa_filter2 + entity: binary_sensor.spa_filter_cycle_2 name: "Filter Cycle 2" diff --git a/ui/card/climate/spa_settings.yaml b/ui/card/climate/spa_settings.yaml index b5eee9a3f..c64508074 100644 --- a/ui/card/climate/spa_settings.yaml +++ b/ui/card/climate/spa_settings.yaml @@ -8,7 +8,7 @@ state_color: true entities: - type: custom:fold-entity-row head: - entity: climate.spa_climate + entity: climate.spa name: "Spa Thermostat" entities: - type: custom:numberbox-card @@ -22,8 +22,8 @@ entities: - entity: binary_sensor.spa_heating name: "Spa Heating" - - entity: switch.spa_temp_range - name: "High Heat" + - entity: select.spa_temperature_range + name: "Temperature Range" - entity: sensor.spa_heat_daily_runtime name: "Heating Time Today" diff --git a/ui/card/hass/hass_monitor.yaml b/ui/card/hass/hass_monitor.yaml index 56e2a89ce..4d9c167d9 100644 --- a/ui/card/hass/hass_monitor.yaml +++ b/ui/card/hass/hass_monitor.yaml @@ -20,10 +20,8 @@ entities: service: browser_mod.popup data: title: "Home Assistant Status" - content: - type: iframe - aspect_ratio: 100% - url: "https://status.home-assistant.io/#" + content: !include /config/ui/iframe/hass_status.yaml + size: fullscreen timeout: 100000 card_mod: diff --git a/ui/card/lock/entry_locks.yaml b/ui/card/lock/entry_locks.yaml index a457ef083..34e7128c8 100644 --- a/ui/card/lock/entry_locks.yaml +++ b/ui/card/lock/entry_locks.yaml @@ -12,7 +12,7 @@ cards: {{ lock_icon('lock.front_door_lock') }} icon_color: > {% from 'lock.jinja' import lock_icon_color %} - {{ lock_icon_color('lock.front_door_lock') }} + {{ lock_color('lock.front_door_lock') }} badge_icon: > {% from 'lock.jinja' import lock_badge %} {{ lock_badge('lock.front_door_lock') }} @@ -52,7 +52,7 @@ cards: {{ lock_icon('lock.back_door_lock') }} icon_color: > {% from 'lock.jinja' import lock_icon_color %} - {{ lock_icon_color('lock.back_door_lock') }} + {{ lock_color('lock.back_door_lock') }} badge_icon: > {% from 'lock.jinja' import lock_badge %} {{ lock_badge('lock.back_door_lock') }} @@ -92,7 +92,7 @@ cards: {{ lock_icon('lock.side_door_lock') }} icon_color: > {% from 'lock.jinja' import lock_icon_color %} - {{ lock_icon_color('lock.side_door_lock') }} + {{ lock_color('lock.side_door_lock') }} badge_icon: > {% from 'lock.jinja' import lock_badge %} {{ lock_badge('lock.side_door_lock') }} @@ -132,7 +132,7 @@ cards: {{ lock_icon('lock.garage_door_lock') }} icon_color: > {% from 'lock.jinja' import lock_icon_color %} - {{ lock_icon_color('lock.garage_door_lock') }} + {{ lock_color('lock.garage_door_lock') }} badge_icon: > {% from 'lock.jinja' import lock_badge %} {{ lock_badge('lock.garage_door_lock') }} diff --git a/ui/card/media/media_player/media_players/office_tv_mini.yaml b/ui/card/media/media_player/media_players/office_tv_mini.yaml index 12773d57e..3d5c822b3 100644 --- a/ui/card/media/media_player/media_players/office_tv_mini.yaml +++ b/ui/card/media/media_player/media_players/office_tv_mini.yaml @@ -24,7 +24,7 @@ states: min_volume: &min_vol 0 max_volume: &max_vol 100 idle_view: &idle when_standby #ISSUE doesn't change when idle - tap_action: &tap #IDEA hold/double_tap doesn't work (for remote/more-info ) + tap_action: &tap #BUG hold/double_tap doesn't work (for remote/more-info ) action: fire-dom-event browser_mod: service: browser_mod.popup diff --git a/ui/card/network/pi_hole.yaml b/ui/card/network/pi_hole.yaml index 36d40ef93..885f31186 100644 --- a/ui/card/network/pi_hole.yaml +++ b/ui/card/network/pi_hole.yaml @@ -78,12 +78,14 @@ entities: - entity: button.pihole_update - #IDEA hide when not on LAN? - - - type: button - entity: binary_sensor.pi_hole_status - name: "Pi-Hole Admin" - action_name: "VIEW" - tap_action: - action: url - url_path: !secret PIHOLE_ADMIN + - type: custom:state-switch + entity: deviceID #ISSUE can't get deviceID on android + states: + 1bbba1aa-fd7f3432: # jlaptop_chrome_internal + type: button + entity: binary_sensor.pi_hole_status + name: "Pi-Hole Admin" + action_name: "VIEW" + tap_action: + action: url + url_path: !secret PIHOLE_ADMIN \ No newline at end of file diff --git a/ui/card/weather/current_conditions.yaml b/ui/card/weather/current_conditions.yaml index 9fac05f3b..f25af26f4 100644 --- a/ui/card/weather/current_conditions.yaml +++ b/ui/card/weather/current_conditions.yaml @@ -9,6 +9,10 @@ entities: entity: sensor.current_condition name: "Condition" state: "{{ states('sensor.current_condition') | title }}" + card_mod: + style: > + {% from 'weather.jinja' import condition_icon_color %} + {{ condition_color(states('sensor.current_condition')) }} - type: custom:fold-entity-row padding: 10 @@ -29,15 +33,9 @@ entities: {%- endif %} {{- ' Trend: ' ~ states('sensor.outdoor_temperature_trend') }} card_mod: - style: | - :host { - --paper-item-icon-color: - {% if not is_state('alert.outdoor_high_temperature', 'idle') %} var(--entity-high-temp-color) - {% elif not is_state('alert.outdoor_low_temperature', 'idle') %} var(--entity-low-temp-color) - {% else %} var(--state-icon-color) - {% endif %} - ; - } + style: > + {% from 'weather.jinja' import temp_icon %} + {{ temp_color(states('sensor.outdoor_temperature')) }} entities: !include /config/ui/card/weather/include/outdoor_temperature_entities.yaml - type: custom:fold-entity-row @@ -48,6 +46,10 @@ entities: name: "Humidity" state: "{{ states('sensor.dew_point_comfort_level') | title }}" secondary: "{{ states('sensor.outdoor_humidity', with_unit=true) }}" + card_mod: + style: > + {% from 'weather.jinja' import humidity_icon %} + {{ humidity_color(states('sensor.outdoor_humidity')) }} entities: !include /config/ui/card/weather/include/outdoor_humidity_entities.yaml - type: custom:fold-entity-row @@ -58,6 +60,10 @@ entities: name: "Barometric Pressure" state: "{{ states('sensor.barometric_pressure_description') | title }}" secondary: "{{ states('sensor.barometric_pressure', with_unit=true) ~ ': ' ~ states('sensor.pressure_trend') }}" + card_mod: + style: > + {% from 'weather.jinja' import pressure_icon %} + {{ pressure_color(states('sensor.barometric_pressure')) }} entities: !include /config/ui/card/weather/include/barometric_pressure_entities.yaml - type: custom:fold-entity-row @@ -70,6 +76,10 @@ entities: {% set type = states('sensor.precipitation_type') %} {{ 'None­' if type == 'none' else type | title }} secondary: "Probability: {{ states('sensor.precipitation_probability', with_unit = true) }}" + card_mod: + style: > + {% from 'weather.jinja' import pop_icon %} + {{ pop_color(states('sensor.precipitation_probability')) }} entities: !include /config/ui/card/weather/include/precipitation_entities.yaml - type: conditional @@ -128,14 +138,9 @@ entities: secondary: > {{ states('sensor.wind_direction') ~ ' (' ~ states('sensor.wind_speed') ~ '/' ~ states('sensor.wind_gust', with_unit=true) }}) card_mod: - style: | - :host { - --paper-item-icon-color: - {% if not is_state('alert.wind', 'idle') %} var(--entity-severe-color) - {% else %} var(--state-icon-color) - {% endif %} - ; - } + style: > + {% from 'weather.jinja' import wind_icon %} + {{ wind_color(states('sensor.wind_gust')) }} entities: !include /config/ui/card/weather/include/wind_entities.yaml - type: custom:fold-entity-row @@ -146,19 +151,10 @@ entities: state: "{{ states('sensor.cloud_coverage_description') }}" secondary: "{{ states('sensor.cloud_coverage', with_unit=true) }}" card_mod: - style: | - :host { - --paper-item-icon-color: - {% set level = states('sensor.cloud_coverage_description') %} - {% if level == 'Cloudy' %} var(--state-icon-color) - {% elif level == 'Mostly Cloudy' %} var(--state-icon-color) - {% elif level == 'Partly Cloudy' %} var(--state-icon-color) - {% elif level == 'Clear' %} var(--state-icon-color) - {% else %} var(--entity-disabled-color) - {% endif %} - ; - } - entities: !include /config/ui/card/weather/include/atmospheric_condition_entities.yaml + style: > + {% from 'weather.jinja' import cloud_icon %} + {{ cloud_color(states('sensor.cloud_coverage')) }} + entities: !include /config/ui/card/weather/include/cloud_entities.yaml - type: custom:template-entity-row entity: sensor.uv_index @@ -168,7 +164,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import uv_index_icon %} - {{ uv_index_icon(states('sensor.uv_index')) }} + {{ uv_index_color(states('sensor.uv_index')) }} - type: custom:fold-entity-row padding: 10 @@ -181,7 +177,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import aqi_index_icon %} - {{ aqi_index_icon(states('sensor.air_quality_index')) }} + {{ aqi_index_color(states('sensor.air_quality_index')) }} entities: !include /config/ui/card/weather/include/air_quality_entities.yaml - type: custom:template-entity-row @@ -192,7 +188,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import fire_index_icon %} - {{ fire_index_icon(states('sensor.fire_index')) }} + {{ fire_index_color(states('sensor.fire_index')) }} - type: custom:template-entity-row entity: sensor.atmospheric_smoke @@ -202,7 +198,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import smoke_level_icon %} - {{ smoke_level_icon(states('sensor.atmospheric_smoke')) }} + {{ smoke_level_color(states('sensor.atmospheric_smoke')) }} - type: custom:template-entity-row entity: sensor.allergy_index_today @@ -212,7 +208,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.allergy_index_today')) }} + {{ iqvia_index_color(states('sensor.allergy_index_today')) }} - type: custom:template-entity-row entity: sensor.asthma_index_today @@ -222,7 +218,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.asthma_index_today')) }} + {{ iqvia_index_color(states('sensor.asthma_index_today')) }} - type: custom:template-entity-row entity: sensor.cold_flu_index_today @@ -232,7 +228,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.cold_flu_index_today')) }} + {{ iqvia_index_color(states('sensor.cold_flu_index_today')) }} - entity: sensor.pirateweather_time name: "Forecast Updated" diff --git a/ui/card/weather/include/air_quality_entities.yaml b/ui/card/weather/include/air_quality_entities.yaml index 67081a493..90a430c21 100644 --- a/ui/card/weather/include/air_quality_entities.yaml +++ b/ui/card/weather/include/air_quality_entities.yaml @@ -9,44 +9,44 @@ card_mod: style: > {% from 'weather.jinja' import aqi_index_icon %} - {{ aqi_index_icon(states('sensor.air_quality_index')) }} + {{ aqi_index_color(states('sensor.air_quality_index')) }} -- entity: sensor.ozone +- entity: sensor.ozone_index card_mod: style: > {% from 'weather.jinja' import aqi_index_icon %} - {{ aqi_index_icon(states('sensor.ozone')) }} + {{ aqi_index_color(states('sensor.ozone_index')) }} - entity: sensor.carbon_monoxide card_mod: style: > {% from 'weather.jinja' import aqi_index_icon %} - {{ aqi_index_icon(states('sensor.carbon_monoxide')) }} + {{ aqi_index_color(states('sensor.carbon_monoxide')) }} - entity: sensor.nitrogen_dioxide card_mod: style: > {% from 'weather.jinja' import aqi_index_icon %} - {{ aqi_index_icon(states('sensor.nitrogen_dioxide')) }} + {{ aqi_index_color(states('sensor.nitrogen_dioxide')) }} - entity: sensor.sulphur_dioxide card_mod: style: > {% from 'weather.jinja' import aqi_index_icon %} - {{ aqi_index_icon(states('sensor.sulphur_dioxide')) }} + {{ aqi_index_color(states('sensor.sulphur_dioxide')) }} - entity: sensor.particulate_matter_2_5 card_mod: style: > {% from 'weather.jinja' import aqi_index_icon %} - {{ aqi_index_icon(states('sensor.particulate_matter_2_5')) }} + {{ aqi_index_color(states('sensor.particulate_matter_2_5')) }} - entity: sensor.atmospheric_smoke name: "Smoke" card_mod: style: > {% from 'weather.jinja' import smoke_level_icon %} - {{ smoke_level_icon(states('sensor.atmospheric_smoke')) }} + {{ smoke_level_color(states('sensor.atmospheric_smoke')) }} - type: conditional conditions: diff --git a/ui/card/weather/include/allergy_entities.yaml b/ui/card/weather/include/allergy_entities.yaml index 7c8338c3c..c4e7778e7 100644 --- a/ui/card/weather/include/allergy_entities.yaml +++ b/ui/card/weather/include/allergy_entities.yaml @@ -9,7 +9,7 @@ card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.allergy_index_today')) }} + {{ iqvia_index_color(states('sensor.allergy_index_today')) }} - type: custom:template-entity-row entity: sensor.allergy_risk_tomorrow @@ -19,14 +19,14 @@ card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.allergy_index_tomorrow')) }} + {{ iqvia_index_color(states('sensor.allergy_index_tomorrow')) }} - entity: sensor.allergy_index_forecasted_average name: "Forcasted Average" card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.allergy_index_forecasted_average')) }} + {{ iqvia_index_color(states('sensor.allergy_index_forecasted_average')) }} - type: conditional conditions: @@ -39,7 +39,7 @@ - type: button entity: sensor.allergy_index_today - name: "Allergy Index Map" + name: "Allergy Forecast" action_name: "VIEW" tap_action: action: url diff --git a/ui/card/weather/include/asthma_entities.yaml b/ui/card/weather/include/asthma_entities.yaml index 1fae72562..7ea065c3f 100644 --- a/ui/card/weather/include/asthma_entities.yaml +++ b/ui/card/weather/include/asthma_entities.yaml @@ -9,7 +9,7 @@ card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.asthma_index_today')) }} + {{ iqvia_index_color(states('sensor.asthma_index_today')) }} - type: custom:template-entity-row entity: sensor.asthma_risk_tomorrow @@ -19,14 +19,14 @@ card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.asthma_index_tomorrow')) }} + {{ iqvia_index_color(states('sensor.asthma_index_tomorrow')) }} - entity: sensor.asthma_index_forecasted_average name: "Forcasted Average" card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.asthma_index_forecasted_average')) }} + {{ iqvia_index_color(states('sensor.asthma_index_forecasted_average')) }} - type: conditional conditions: @@ -39,7 +39,7 @@ - type: button entity: sensor.asthma_index_today - name: "Asthma Index Map" + name: "Asthma Forecast" action_name: "VIEW" tap_action: action: url diff --git a/ui/card/weather/include/barometric_pressure_entities.yaml b/ui/card/weather/include/barometric_pressure_entities.yaml index ebac05022..c25997c22 100644 --- a/ui/card/weather/include/barometric_pressure_entities.yaml +++ b/ui/card/weather/include/barometric_pressure_entities.yaml @@ -9,6 +9,10 @@ {%- if has_value('sensor.pressure_trend') %} Trend: {{ states('sensor.pressure_trend') }} {%- endif %} + card_mod: + style: > + {% from 'weather.jinja' import pressure_icon %} + {{ pressure_color(states('sensor.barometric_pressure')) }} - type: button entity: sensor.barometric_pressure diff --git a/ui/card/weather/include/atmospheric_condition_entities.yaml b/ui/card/weather/include/cloud_entities.yaml similarity index 82% rename from ui/card/weather/include/atmospheric_condition_entities.yaml rename to ui/card/weather/include/cloud_entities.yaml index dc253b027..a1632605b 100644 --- a/ui/card/weather/include/atmospheric_condition_entities.yaml +++ b/ui/card/weather/include/cloud_entities.yaml @@ -2,12 +2,17 @@ ## Atmospheric Condition Entities ############################################################################### - entity: sensor.cloud_coverage + card_mod: + style: > + {% from 'weather.jinja' import cloud_icon %} + {{ cloud_color(states('sensor.cloud_coverage')) }} + - entity: sensor.fog_probability - entity: sensor.visibility - type: button entity: sensor.cloud_coverage - name: "Ventusky Satellite" + name: "Ventusky Radar" action_name: "VIEW" tap_action: action: navigate @@ -22,7 +27,7 @@ navigation_path: cloud-radar - type: button - name: "Satellite" + name: "Satellite View" icon: mdi:satellite action_name: "VIEW" tap_action: diff --git a/ui/card/weather/include/flu_entities.yaml b/ui/card/weather/include/flu_entities.yaml index 5ad154020..0bd0f3a67 100644 --- a/ui/card/weather/include/flu_entities.yaml +++ b/ui/card/weather/include/flu_entities.yaml @@ -1,5 +1,5 @@ ############################################################################### -## Flu Entities +## Cold & Flu Entities ############################################################################### - type: custom:template-entity-row entity: sensor.flu_risk_today @@ -9,14 +9,14 @@ card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.cold_flu_index_today')) }} + {{ iqvia_index_color(states('sensor.cold_flu_index_today')) }} - entity: sensor.cold_flu_forecasted_average name: "Forcasted Average" card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.cold_flu_forecasted_average')) }} + {{ iqvia_index_color(states('sensor.cold_flu_forecasted_average')) }} - type: conditional conditions: @@ -29,7 +29,7 @@ - type: button entity: sensor.cold_flu_index_today - name: "Flu Risk Map" + name: "Cold & Flu Forecast" action_name: "VIEW" tap_action: action: url diff --git a/ui/card/weather/include/outdoor_humidity_entities.yaml b/ui/card/weather/include/outdoor_humidity_entities.yaml index 765e708e3..a02e4db98 100644 --- a/ui/card/weather/include/outdoor_humidity_entities.yaml +++ b/ui/card/weather/include/outdoor_humidity_entities.yaml @@ -3,12 +3,10 @@ ############################################################################### - entity: sensor.outdoor_humidity name: "Humidity" - -- entity: sensor.dew_point - name: "Dew Point" - -- entity: sensor.dew_point_comfort_level - name: "Dew Point Comfort" + card_mod: + style: > + {% from 'weather.jinja' import humidity_icon %} + {{ humidity_color(states('sensor.outdoor_humidity')) }} - type: button entity: sensor.outdoor_humidity diff --git a/ui/card/weather/include/outdoor_temperature_entities.yaml b/ui/card/weather/include/outdoor_temperature_entities.yaml index 9fba0f1bb..f2855645a 100644 --- a/ui/card/weather/include/outdoor_temperature_entities.yaml +++ b/ui/card/weather/include/outdoor_temperature_entities.yaml @@ -1,42 +1,117 @@ ############################################################################### ## Outdoor Temperature Entities ############################################################################### -- entity: sensor.outdoor_temperature +- type: custom:template-entity-row + entity: sensor.outdoor_temperature name: "Temperature" + icon: mdi:thermometer + state: "{{ states('sensor.outdoor_temperature', with_unit=true) }}" + secondary: "{{ states('sensor.outdoor_temperature_trend') | title }}" + card_mod: + style: > + {% from 'weather.jinja' import temp_icon %} + {{ temp_color(states('sensor.outdoor_temperature')) }} + +- entity: sensor.outdoor_temperature_level + name: "Relative Temperature" + card_mod: + style: > + {% from 'weather.jinja' import temp_icon %} + {{ temp_color(states('sensor.outdoor_temperature')) }} - entity: sensor.outdoor_apparent_temperature name: "Feels Like" + card_mod: + style: > + {% from 'weather.jinja' import temp_icon %} + {{ temp_color(states('sensor.outdoor_apparent_temperature')) }} -- type: conditional - conditions: - - condition: state - entity: binary_sensor.freezing - state: "on" - row: - entity: binary_sensor.freezing +- entity: sensor.dew_point + name: "Dew Point" + card_mod: + style: > + {% from 'weather.jinja' import temp_icon %} + {{ temp_color(states('sensor.dew_point')) }} -- entity: sensor.outdoor_temperature_level - name: "Relative" +- entity: sensor.dew_point_comfort_level + name: "Dew Point Comfort" + card_mod: + style: > + {% from 'weather.jinja' import temp_icon %} + {{ temp_color(states('sensor.dew_point')) }} -- entity: sensor.outdoor_temperature_trend - name: "Trend" +- entity: sensor.outdoor_temperature_daily_average + name: "Daily Average" + card_mod: + style: > + {% from 'weather.jinja' import temp_icon %} + {{ temp_color(states('sensor.outdoor_temperature_daily_average')) }} - type: custom:template-entity-row - name: "High (Last 24)" + entity: sensor.outdoor_temperature_daily_high + name: "High Temp (Last 24)" icon: mdi:sun-thermometer - state: > - {{ states('sensor.outdoor_temperature_daily_high', with_unit=true) }} + state: "{{ states('sensor.outdoor_temperature_daily_high', with_unit=true) }}" secondary: > - {{ states('sensor.outdoor_temperature_daily_high_time') | as_timestamp('unknown') - | timestamp_custom('%A, %-I:%M %p', true, 'unknown') }} + {% if has_value('sensor.outdoor_temperature_daily_high_time') %} + {%- set time = states('sensor.outdoor_temperature_daily_high_time') | as_datetime -%} + {{- iif(time.day == now().day, 'Today at ', 'Yesterday at ') }} + {{- time | as_timestamp('unknown') | timestamp_custom('%-I:%M %p', true, 'unknown') }} + {%- endif %} + card_mod: + style: > + {% from 'weather.jinja' import temp_icon %} + {{ temp_color(states('sensor.outdoor_temperature_daily_high')) }} - type: custom:template-entity-row - name: "Low (Last 24)" + entity: sensor.outdoor_temperature_daily_low + name: "Low Temp (Last 24)" icon: mdi:snowflake-thermometer state: "{{ states('sensor.outdoor_temperature_daily_low', with_unit=true) }}" secondary: > - {{ states('sensor.outdoor_temperature_daily_low_time') | as_timestamp('unknown') - | timestamp_custom('%A, %-I:%M %p', true, 'unknown') }} + {% if has_value('sensor.outdoor_temperature_daily_low_time') %} + {%- set time = states('sensor.outdoor_temperature_daily_low_time') | as_datetime -%} + {{- iif(time.day == now().day, 'Today at ', 'Yesterday at ') }} + {{- time | as_timestamp('unknown') | timestamp_custom('%-I:%M %p', true, 'unknown') }} + {%- endif %} + card_mod: + style: > + {% from 'weather.jinja' import temp_icon %} + {{ temp_color(states('sensor.outdoor_temperature_daily_low')) }} + +- type: custom:template-entity-row + entity: sensor.tempest_st_00057689_temperature + name: "High Temp (All Time)" + icon: mdi:sun-thermometer + state: "{{ state_attr('sensor.tempest_st_00057689_temperature', 'max_all') }} °C" + secondary: > + {{ state_attr('sensor.tempest_st_00057689_temperature', 'max_all_time') | as_timestamp('unknown') + | timestamp_custom('%Y-%m-%d at %-I:%M %p', true, 'unknown') }} + card_mod: + style: > + {% from 'weather.jinja' import temp_icon %} + {{ temp_color(state_attr('sensor.tempest_st_00057689_temperature', 'max_all')) }} + +- type: custom:template-entity-row + entity: sensor.tempest_st_00057689_temperature + name: "Low Temp (All Time)" + icon: mdi:sun-thermometer + state: "{{ state_attr('sensor.tempest_st_00057689_temperature', 'min_all') }} °C" + secondary: > + {{ state_attr('sensor.tempest_st_00057689_temperature', 'min_all_time') | as_timestamp('unknown') + | timestamp_custom('%Y-%m-%d at %-I:%M %p', true, 'unknown') }} + card_mod: + style: > + {% from 'weather.jinja' import temp_icon %} + {{ temp_color(state_attr('sensor.tempest_st_00057689_temperature', 'min_all')) }} + +- type: conditional + conditions: + - condition: state + entity: binary_sensor.freezing + state: "on" + row: + entity: binary_sensor.freezing - type: conditional conditions: diff --git a/ui/card/weather/include/precipitation_entities.yaml b/ui/card/weather/include/precipitation_entities.yaml index efb8f7f47..04ad991d0 100644 --- a/ui/card/weather/include/precipitation_entities.yaml +++ b/ui/card/weather/include/precipitation_entities.yaml @@ -22,9 +22,10 @@ {% set type = states('sensor.precipitation_type') %} {{ 'None­' if type == 'none' else type | title }} secondary: > - {% if is_number(states('sensor.precipitation_expected_today')) %} - Expected: {{ '%0.1f' | format(states('sensor.precipitation_expected_today') | float(-1)) }} mm - {% endif %} + {%- set exp = states('sensor.precipitation_expected_today') %} + {%- if is_number(exp) and exp | float(-1) > 0 -%} + Expected: {{ '%0.1f' | format(exp) | float(-1) }} mm + {%- endif %} - type: conditional conditions: @@ -34,7 +35,9 @@ row: type: custom:template-entity-row entity: binary_sensor.precipitation_likely_soon - name: "Precipitation Likely Soon" + name: > + {% set type = state_attr('sensor.precipitation_start', 'type') %} + {{ iif(type in ['rain', 'snow', 'ice'], type | title, 'Precipitation') }} Likely Soon icon: mdi:weather-snowy-rainy state: > {%- if has_value('sensor.precipitation_start') %} @@ -63,7 +66,9 @@ row: type: custom:template-entity-row entity: binary_sensor.precipitation_likely_next_24_hours - name: "Precipitation Likely Today" + name: > + {% set type = state_attr('sensor.precipitation_start', 'type') %} + {{ iif(type in ['rain', 'snow', 'ice'], type | title, 'Precipitation') }} Likely Next 24 Hours icon: mdi:weather-snowy-rainy state: > {% if has_value('sensor.precipitation_start') %} @@ -280,6 +285,15 @@ ; } +- type: conditional + conditions: + - condition: numeric_state + entity: sensor.precipitation_accumulation_yesterday + above: 0 + row: + - entity: sensor.precipitation_accumulation_yesterday + name: "Precipitation Yesterday" + - type: conditional conditions: - condition: or diff --git a/ui/card/weather/include/uv_entities.yaml b/ui/card/weather/include/uv_entities.yaml index 3387c0ea8..f9e53f032 100644 --- a/ui/card/weather/include/uv_entities.yaml +++ b/ui/card/weather/include/uv_entities.yaml @@ -9,7 +9,7 @@ card_mod: style: > {% from 'weather.jinja' import uv_index_icon %} - {{ uv_index_icon(states('sensor.uv_index')) }} + {{ uv_index_color(states('sensor.uv_index')) }} - type: custom:template-entity-row entity: sensor.uv_risk_today @@ -19,7 +19,7 @@ card_mod: style: > {% from 'weather.jinja' import uv_index_icon %} - {{ uv_index_icon(states('sensor.uv_index_today')) }} + {{ uv_index_color(states('sensor.uv_index_today')) }} - type: conditional conditions: diff --git a/ui/card/weather/include/weather_condition_colors.yaml b/ui/card/weather/include/weather_condition_colors.yaml new file mode 100644 index 000000000..e9c554901 --- /dev/null +++ b/ui/card/weather/include/weather_condition_colors.yaml @@ -0,0 +1,64 @@ +############################################################################### +## Weather Condition Colors (Hourly Forecast Card) +############################################################################### +clear-night: + background: rgb(47, 19, 92) + foreground: rgb(174, 186, 207) +cloudy: + background: rgb(79, 80, 82) + foreground: rgb(173, 176, 184) +fog: + background: rgb(113, 99, 128) + foreground: rgb(255, 255, 255) +hail: + background: rgb(172, 82, 196) + foreground: rgb(255, 255, 255) +lightning: + background: rgb(100, 100, 100) + foreground: rgb(232, 235, 87) +lightning-rainy: + background: rgb(4, 61, 176) + foreground: rgb(232, 235, 87) +partlycloudy: + background: rgb(90, 116, 158) + foreground: rgb(232, 235, 87) +rainy: + background: rgb(2, 33, 94) + foreground: rgb(97, 197, 250) +pouring: + background: rgb(4, 61, 176) + foreground: rgb(97, 197, 250) +snowy: + background: rgb(255, 255, 255) + foreground: rgb(18, 161, 158) +snowy-rainy: + background: rgb(255, 255, 255) + foreground: rgb(4, 61, 176) +sunny: + background: rgb(140, 200, 255) + foreground: rgb(232, 235, 87) +windy: + background: rgb(61, 135, 58) + foreground: rgb(232, 235, 87) +windy-variant: + background: rgb(117, 145, 116) + foreground: rgb(176, 176, 176) +exceptional: + background: rgb(117, 145, 116) + foreground: rgb(255, 255, 255) + +# {%- if condition == 'sunny' %} rgb(232, 235, 87) +# {%- elif condition == 'clear-night' %} rgb(47, 19, 92) +# {%- elif condition == 'fog' %} +# {%- elif condition == 'partlycloudy' %} rgb(90, 116, 158) +# {%- elif condition == 'cloudy' %} +# {%- elif condition == 'rainy' %} rgb(4, 61, 176) +# {%- elif condition == 'pouring' %} rgb(2, 33, 94) +# {%- elif condition == 'snowy' %} rgb(255, 255, 255) +# {%- elif condition == 'hail' %} +# {%- elif condition == 'lighting' %} +# {%- elif condition == 'lightning-rainy' %} +# {%- elif condition == 'snowy-rainy' %} rgb(82, 193, 196) +# {%- elif condition == 'windy' %} rgb(61, 135, 58) +# {%- elif condition == 'windy-variant' %} rgb(117, 145, 116) +# {%- elif condition == 'exceptional' %} rgb(158, 27, 51) \ No newline at end of file diff --git a/ui/card/weather/include/wind_entities.yaml b/ui/card/weather/include/wind_entities.yaml index 6e3fb041e..d8a03c765 100644 --- a/ui/card/weather/include/wind_entities.yaml +++ b/ui/card/weather/include/wind_entities.yaml @@ -3,12 +3,24 @@ ############################################################################### - entity: sensor.wind_speed name: "Speed" + card_mod: + style: > + {% from 'weather.jinja' import wind_icon %} + {{ wind_color(states('sensor.wind_speed')) }} - entity: sensor.wind_gust name: "Gust" + card_mod: + style: > + {% from 'weather.jinja' import wind_icon %} + {{ wind_color(states('sensor.wind_gust')) }} - entity: sensor.wind_lull name: "Lull" + card_mod: + style: > + {% from 'weather.jinja' import wind_icon %} + {{ wind_color(states('sensor.wind_lull')) }} - entity: sensor.wind_beaufort_display name: "Beaufort" diff --git a/ui/card/weather/today_forecast.yaml b/ui/card/weather/today_forecast.yaml index 1f2df4ff3..4e3d077f0 100644 --- a/ui/card/weather/today_forecast.yaml +++ b/ui/card/weather/today_forecast.yaml @@ -8,33 +8,46 @@ entities: - type: custom:template-entity-row entity: sensor.condition_today name: "Condition" - icon: mdi:weather-snowy-rainy state: "{{ states('sensor.condition_today') | title }}" + card_mod: + style: > + {% from 'weather.jinja' import condition_icon_color %} + {{ condition_color(states('sensor.condition_today')) }} - type: custom:template-entity-row entity: sensor.outdoor_high_temperature name: "High Temperature" state: "{{ states('sensor.outdoor_high_temperature', with_unit=true) }}" secondary: > - {{ state_attr('sensor.outdoor_high_temperature_time', '12hour') }} {%- set diff = states('sensor.outdoor_high_temperature_differential') | int(0) %} {%- if diff != 0 %} - - {{ diff | abs }}° {{ iif(diff > 0, 'above', 'below') }} than normal - {%- endif %} + {{ diff | abs }}° {{ iif(diff > 0, 'above', 'below') }} than normal - + {%- endif %} {{ state_attr('sensor.outdoor_high_temperature_time', '12hour') }} + card_mod: + style: > + {% from 'weather.jinja' import temp_icon %} + {{ temp_color(states('sensor.outdoor_high_temperature')) }} - type: custom:template-entity-row entity: sensor.outdoor_low_temperature name: "Low Temperature" state: "{{ states('sensor.outdoor_low_temperature', with_unit=true) }}" secondary: > - {{ state_attr('sensor.outdoor_low_temperature_time', '12hour') }} {%- set diff = states('sensor.outdoor_low_temperature_differential') | int(0) %} {%- if diff != 0 %} - - {{ diff | abs }}° {{ iif(diff > 0, 'above', 'below') }} normal - {%- endif %} + {{ diff | abs }}° {{ iif(diff > 0, 'above', 'below') }} normal - + {%- endif %} {{ state_attr('sensor.outdoor_low_temperature_time', '12hour') }} + card_mod: + style: > + {% from 'weather.jinja' import temp_icon %} + {{ temp_color(states('sensor.outdoor_low_temperature')) }} - entity: sensor.outdoor_humidity_today name: "Humidity" + card_mod: + style: > + {% from 'weather.jinja' import humidity_icon %} + {{ humidity_color(states('sensor.outdoor_humidity_today')) }} - type: custom:fold-entity-row head: @@ -47,6 +60,10 @@ entities: {%- if rain > 0 %} Accumulation: {{ states('sensor.precipitation_expected_today', with_unit=true) }} {%- endif %} + card_mod: + style: > + {% from 'weather.jinja' import pop_icon %} + {{ pop_color(states('sensor.precipitation_probability_today')) }} entities: - entity: sensor.max_precipitation_intensity_today name: "Maximum Precipitation Rate" @@ -90,9 +107,17 @@ entities: icon: mdi:weather-windy state: "{{ states('sensor.wind_speed_today', with_unit=true) }}" secondary: "Gusts: {{ states('sensor.wind_gust_today', with_unit=true) }}" + card_mod: + style: > + {% from 'weather.jinja' import wind_icon %} + {{ wind_color(states('sensor.wind_gust_today')) }} - entity: sensor.cloud_coverage_today name: "Cloud Coverage" + card_mod: + style: > + {% from 'weather.jinja' import cloud_icon %} + {{ cloud_color(states('sensor.cloud_coverage_today')) }} - type: custom:template-entity-row entity: sensor.uv_risk_today @@ -102,7 +127,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import uv_index_icon %} - {{ uv_index_icon(states('sensor.uv_index_today')) }} + {{ uv_index_color(states('sensor.uv_index_today')) }} - type: custom:template-entity-row entity: sensor.fire_index_today @@ -112,7 +137,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import fire_index_icon %} - {{ fire_index_icon(states('sensor.fire_index_today')) }} + {{ fire_index_color(states('sensor.fire_index_today')) }} - type: custom:template-entity-row entity: sensor.smoke_level_today @@ -122,7 +147,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import smoke_level_icon %} - {{ smoke_level_icon(states('sensor.smoke_level_today')) }} + {{ smoke_level_color(states('sensor.smoke_level_today')) }} - type: custom:template-entity-row entity: sensor.allergy_index_today @@ -132,7 +157,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.allergy_index_today')) }} + {{ iqvia_index_color(states('sensor.allergy_index_today')) }} - type: custom:template-entity-row entity: sensor.asthma_index_today @@ -142,7 +167,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.asthma_index_today')) }} + {{ iqvia_index_color(states('sensor.asthma_index_today')) }} - type: custom:template-entity-row entity: sensor.cold_flu_index_today @@ -152,7 +177,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.cold_flu_index_today')) }} + {{ iqvia_index_color(states('sensor.cold_flu_index_today')) }} - type: attribute name: "Forecast Updated" diff --git a/ui/card/weather/tomorrow_forecast.yaml b/ui/card/weather/tomorrow_forecast.yaml index 0ef9c35fc..57a0a73e0 100644 --- a/ui/card/weather/tomorrow_forecast.yaml +++ b/ui/card/weather/tomorrow_forecast.yaml @@ -8,33 +8,46 @@ entities: - type: custom:template-entity-row entity: sensor.condition_tomorrow name: "Condition" - icon: mdi:weather-snowy-rainy state: "{{ states('sensor.condition_tomorrow') | title }}" + card_mod: + style: > + {% from 'weather.jinja' import condition_icon_color %} + {{ condition_color(states('sensor.condition_tomorrow')) }} - type: custom:template-entity-row entity: sensor.outdoor_high_temperature_tomorrow name: "High Temperature" state: "{{ states('sensor.outdoor_high_temperature_tomorrow', with_unit=true) }}" secondary: > - {{ state_attr('sensor.outdoor_high_temperature_time_tomorrow', '12hour') }} {%- set diff = states('sensor.outdoor_high_temperature_differential') | int(0) %} {%- if diff != 0 %} - - {{ diff | abs }}° {{ iif(diff > 0, 'above', 'below') }} than normal - {%- endif %} + {{ diff | abs }}° {{ iif(diff > 0, 'above', 'below') }} than normal - + {%- endif %} {{ state_attr('sensor.outdoor_high_temperature_time_tomorrow', '12hour') }} + card_mod: + style: > + {% from 'weather.jinja' import temp_icon %} + {{ temp_color(states('sensor.outdoor_high_temperature_tomorrow')) }} - type: custom:template-entity-row entity: sensor.outdoor_low_temperature_tomorrow name: "Low Temperature" state: "{{ states('sensor.outdoor_low_temperature_tomorrow', with_unit=true) }}" secondary: > - {{ state_attr('sensor.outdoor_low_temperature_time_tomorrow', '12hour') }} {%- set diff = states('sensor.outdoor_low_temperature_differential') | int(0) %} {%- if diff != 0 %} - - {{ diff | abs }}° {{ iif(diff > 0, 'above', 'below') }} normal - {%- endif %} + {{ diff | abs }}° {{ iif(diff > 0, 'above', 'below') }} normal - + {%- endif %} {{ state_attr('sensor.outdoor_low_temperature_time_tomorrow', '12hour') }} + card_mod: + style: > + {% from 'weather.jinja' import temp_icon %} + {{ temp_color(states('sensor.outdoor_low_temperature_tomorrow')) }} - entity: sensor.outdoor_humidity_tomorrow name: "Humidity" + card_mod: + style: > + {% from 'weather.jinja' import humidity_icon %} + {{ humidity_color(states('sensor.outdoor_humidity_tomorrow')) }} - type: custom:fold-entity-row head: @@ -47,6 +60,10 @@ entities: {%- if rain > 0 %} Accumulation: {{ states('sensor.precipitation_expected_tomorrow', with_unit=true) }} {%- endif %} + card_mod: + style: > + {% from 'weather.jinja' import pop_icon %} + {{ pop_color(states('sensor.precipitation_probability_tomorrow')) }} entities: - entity: sensor.max_precipitation_intensity_tomorrow name: "Maximum Precipitation Rate" @@ -90,9 +107,17 @@ entities: icon: mdi:weather-windy state: "{{ states('sensor.wind_speed_tomorrow', with_unit=true) }}" secondary: "Gusts: {{ states('sensor.wind_gust_tomorrow', with_unit=true) }}" + card_mod: + style: > + {% from 'weather.jinja' import wind_icon %} + {{ wind_color(states('sensor.wind_gust_tomorrow')) }} - entity: sensor.cloud_coverage_tomorrow name: "Cloud Coverage" + card_mod: + style: > + {% from 'weather.jinja' import cloud_icon %} + {{ cloud_color(states('sensor.cloud_coverage_tomorrow')) }} - type: custom:template-entity-row entity: sensor.fire_index_tomorrow @@ -102,7 +127,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import fire_index_icon %} - {{ fire_index_icon(states('sensor.fire_index_tomorrow')) }} + {{ fire_index_color(states('sensor.fire_index_tomorrow')) }} - type: custom:template-entity-row entity: sensor.smoke_level_tomorrow @@ -112,7 +137,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import smoke_level_icon %} - {{ smoke_level_icon(states('sensor.smoke_level_tomorrow')) }} + {{ smoke_level_color(states('sensor.smoke_level_tomorrow')) }} - type: custom:template-entity-row entity: sensor.allergy_index_tomorrow @@ -122,7 +147,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.allergy_index_tomorrow')) }} + {{ iqvia_index_color(states('sensor.allergy_index_tomorrow')) }} - type: custom:template-entity-row entity: sensor.asthma_risk_tomorrow @@ -132,7 +157,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.asthma_index_tomorrow')) }} + {{ iqvia_index_color(states('sensor.asthma_index_tomorrow')) }} - type: custom:template-entity-row entity: sensor.cold_flu_forecasted_average @@ -142,7 +167,7 @@ entities: card_mod: style: > {% from 'weather.jinja' import iqvia_index_icon %} - {{ iqvia_index_icon(states('sensor.cold_flu_forecasted_average')) }} + {{ iqvia_index_color(states('sensor.cold_flu_forecasted_average')) }} - type: attribute name: "Forecast Updated" diff --git a/ui/card/weather/weather_forecast.yaml b/ui/card/weather/weather_forecast.yaml index 28418f783..544e272f5 100644 --- a/ui/card/weather/weather_forecast.yaml +++ b/ui/card/weather/weather_forecast.yaml @@ -32,36 +32,7 @@ cards: show_wind: false show_precipitation_amounts: true show_precipitation_probability: false - colors: - clear-night: - background: "#202e45" - foreground: "#aebacf" - cloudy: "#6e6d6d" - fog: "#737272" - hail: "#3105e3" - lightning: - background: "#3105e3" - foreground: "#ced108" - lightning-rainy: - background: "#3105e3" - foreground: "#ced108" - partlycloudy: - background: "#adbac4" - foreground: "#f5ee67" - pouring: "#3105e3" - rainy: "#3105e3" - snowy: - background: "#ffffff" - foreground: "#363534" - snowy-rainy: "#05a2ad" - sunny: - background: "#8cc8ff" - foreground: "#f5ee67" - windy: "#593a1f" - windy-variant: "#593a1f" - exceptional: - background: "#5e823b" - foreground: "#FFFFFF" + colors: !include /config/ui/card/weather/include/weather_condition_colors.yaml card_mod: class: sub_card diff --git a/ui/card/weather/weather_forecast_envcan.yaml b/ui/card/weather/weather_forecast_envcan.yaml index 4f49ec1db..7d638b452 100644 --- a/ui/card/weather/weather_forecast_envcan.yaml +++ b/ui/card/weather/weather_forecast_envcan.yaml @@ -26,35 +26,6 @@ cards: show_wind: barb-and-speed show_precipitation_amounts: true show_precipitation_probability: true - colors: - clear-night: - background: "#202e45" - foreground: "#aebacf" - cloudy: "#6e6d6d" - fog: "#737272" - hail: "#3105e3" - lightning: - background: "#3105e3" - foreground: "#ced108" - lightning-rainy: - background: "#3105e3" - foreground: "#ced108" - partlycloudy: - background: "#adbac4" - foreground: "#f5ee67" - pouring: "#3105e3" - rainy: "#3105e3" - snowy: - background: "#ffffff" - foreground: "#363534" - snowy-rainy: "#05a2ad" - sunny: - background: "#8cc8ff" - foreground: "#f5ee67" - windy: "#593a1f" - windy-variant: "#593a1f" - exceptional: - background: "#5e823b" - foreground: "#FFFFFF" + colors: !include /config/ui/card/weather/include/weather_condition_colors.yaml card_mod: class: sub_card \ No newline at end of file diff --git a/ui/card/weather/weather_forecast_mini.yaml b/ui/card/weather/weather_forecast_mini.yaml index 931319364..1d32138fa 100644 --- a/ui/card/weather/weather_forecast_mini.yaml +++ b/ui/card/weather/weather_forecast_mini.yaml @@ -26,41 +26,12 @@ cards: name: "" icons: true hide_bar: false - show_date: false # boundary + show_date: false hide_hours: false hide_temperatures: false - show_wind: false # barb-and-speed + show_wind: false show_precipitation_amounts: false show_precipitation_probability: false - colors: - clear-night: - background: "#202e45" - foreground: "#aebacf" - cloudy: "#6e6d6d" - fog: "#737272" - hail: "#3105e3" - lightning: - background: "#3105e3" - foreground: "#ced108" - lightning-rainy: - background: "#3105e3" - foreground: "#ced108" - partlycloudy: - background: "#adbac4" - foreground: "#f5ee67" - pouring: "#3105e3" - rainy: "#3105e3" - snowy: - background: "#ffffff" - foreground: "#363534" - snowy-rainy: "#05a2ad" - sunny: - background: "#8cc8ff" - foreground: "#f5ee67" - windy: "#593a1f" - windy-variant: "#593a1f" - exceptional: - background: "#5e823b" - foreground: "#FFFFFF" + colors: !include /config/ui/card/weather/include/weather_condition_colors.yaml card_mod: class: sub_card \ No newline at end of file diff --git a/ui/card/weather/weather_forecast_pirateweather.yaml b/ui/card/weather/weather_forecast_pirateweather.yaml index c278f9ee8..2cdbec4fe 100644 --- a/ui/card/weather/weather_forecast_pirateweather.yaml +++ b/ui/card/weather/weather_forecast_pirateweather.yaml @@ -26,35 +26,6 @@ cards: show_wind: barb-and-speed show_precipitation_amounts: true show_precipitation_probability: true - colors: - clear-night: - background: "#202e45" - foreground: "#aebacf" - cloudy: "#6e6d6d" - fog: "#737272" - hail: "#3105e3" - lightning: - background: "#3105e3" - foreground: "#ced108" - lightning-rainy: - background: "#3105e3" - foreground: "#ced108" - partlycloudy: - background: "#adbac4" - foreground: "#f5ee67" - pouring: "#3105e3" - rainy: "#3105e3" - snowy: - background: "#ffffff" - foreground: "#363534" - snowy-rainy: "#05a2ad" - sunny: - background: "#8cc8ff" - foreground: "#f5ee67" - windy: "#593a1f" - windy-variant: "#593a1f" - exceptional: - background: "#5e823b" - foreground: "#FFFFFF" + colors: !include /config/ui/card/weather/include/weather_condition_colors.yaml card_mod: class: sub_card diff --git a/ui/card/weather/weather_forecast_template.yaml b/ui/card/weather/weather_forecast_template.yaml index ebbd9825b..48f4f25cc 100644 --- a/ui/card/weather/weather_forecast_template.yaml +++ b/ui/card/weather/weather_forecast_template.yaml @@ -33,35 +33,6 @@ cards: show_wind: barb-and-speed show_precipitation_amounts: true show_precipitation_probability: true - colors: - clear-night: - background: "#202e45" - foreground: "#aebacf" - cloudy: "#6e6d6d" - fog: "#737272" - hail: "#3105e3" - lightning: - background: "#3105e3" - foreground: "#ced108" - lightning-rainy: - background: "#3105e3" - foreground: "#ced108" - partlycloudy: - background: "#adbac4" - foreground: "#f5ee67" - pouring: "#3105e3" - rainy: "#3105e3" - snowy: - background: "#ffffff" - foreground: "#363534" - snowy-rainy: "#05a2ad" - sunny: - background: "#8cc8ff" - foreground: "#f5ee67" - windy: "#593a1f" - windy-variant: "#593a1f" - exceptional: - background: "#5e823b" - foreground: "#FFFFFF" + colors: !include /config/ui/card/weather/include/weather_condition_colors.yaml card_mod: class: sub_card diff --git a/ui/card/weather/weather_forecast_weatherflow.yaml b/ui/card/weather/weather_forecast_weatherflow.yaml index 7728d3aea..ccaa512c3 100644 --- a/ui/card/weather/weather_forecast_weatherflow.yaml +++ b/ui/card/weather/weather_forecast_weatherflow.yaml @@ -26,35 +26,6 @@ cards: show_wind: barb-and-speed show_precipitation_amounts: true show_precipitation_probability: true - colors: - clear-night: - background: "#202e45" - foreground: "#aebacf" - cloudy: "#6e6d6d" - fog: "#737272" - hail: "#3105e3" - lightning: - background: "#3105e3" - foreground: "#ced108" - lightning-rainy: - background: "#3105e3" - foreground: "#ced108" - partlycloudy: - background: "#adbac4" - foreground: "#f5ee67" - pouring: "#3105e3" - rainy: "#3105e3" - snowy: - background: "#ffffff" - foreground: "#363534" - snowy-rainy: "#05a2ad" - sunny: - background: "#8cc8ff" - foreground: "#f5ee67" - windy: "#593a1f" - windy-variant: "#593a1f" - exceptional: - background: "#5e823b" - foreground: "#FFFFFF" + colors: !include /config/ui/card/weather/include/weather_condition_colors.yaml card_mod: class: sub_card diff --git a/ui/dashboard/hass/shelly.yaml b/ui/dashboard/hass/shelly.yaml index 1baa8a045..15ce1af11 100644 --- a/ui/dashboard/hass/shelly.yaml +++ b/ui/dashboard/hass/shelly.yaml @@ -6,6 +6,4 @@ path: shelly subview: true panel: true cards: - - type: iframe - aspect_ratio: 100% - url: !secret SHELLY + - !include /config/ui/iframe/allergy.yaml diff --git a/ui/dashboard/subview/schedule/traffic.yaml b/ui/dashboard/subview/schedule/traffic.yaml index d16b38986..fc6e93e4e 100644 --- a/ui/dashboard/subview/schedule/traffic.yaml +++ b/ui/dashboard/subview/schedule/traffic.yaml @@ -14,7 +14,7 @@ sections: cards: - type: horizontal-stack cards: - - !include /config/ui/card/schedule/traffic_map.yaml + - !include /config/ui/iframe/traffic.yaml - type: grid columns: 1 diff --git a/ui/dashboard/subview/schedule/waste.yaml b/ui/dashboard/subview/schedule/waste.yaml index 125e0d7e6..aee92393a 100644 --- a/ui/dashboard/subview/schedule/waste.yaml +++ b/ui/dashboard/subview/schedule/waste.yaml @@ -6,6 +6,4 @@ path: waste subview: true panel: true cards: - - type: iframe - aspect_ratio: 100% - url: !secret WASTE_SCHEDULE + - !include /config/ui/iframe/waste_schedule.yaml diff --git a/ui/dashboard/subview/weather/air_quality.yaml b/ui/dashboard/subview/weather/air_quality.yaml index 936c043d2..36b6dd818 100644 --- a/ui/dashboard/subview/weather/air_quality.yaml +++ b/ui/dashboard/subview/weather/air_quality.yaml @@ -10,11 +10,36 @@ dense_section_placement: true sections: - type: grid cards: + - type: grid + columns: 2 + square: false + cards: + - !include /config/ui/gauge/air_quality.yaml + - !include /config/ui/gauge/smoke_risk.yaml + - type: entities state_color: true show_header_toggle: false entities: !include /config/ui/card/weather/include/air_quality_entities.yaml + - type: grid + columns: 2 + square: false + cards: + - type: statistic + entity: sensor.air_quality_index + name: "AQI Avg" + stat_type: mean + period: + fixed_period: + + - type: statistic + entity: sensor.air_quality_index + name: "AQI Max" + stat_type: max + period: + fixed_period: + - type: grid column_span: 3 cards: @@ -23,3 +48,12 @@ sections: columns: full cards: - !include /config/ui/graph/weather/air_quality_detail.yaml + + - type: grid + columns: 2 + square: false + grid_options: + columns: full + cards: + - !include /config/ui/statistics_graph/air_quality.yaml + - !include /config/ui/statistics_graph/smoke_level.yaml \ No newline at end of file diff --git a/ui/dashboard/subview/weather/allergy.yaml b/ui/dashboard/subview/weather/allergy.yaml index 32cce79ee..bae646461 100644 --- a/ui/dashboard/subview/weather/allergy.yaml +++ b/ui/dashboard/subview/weather/allergy.yaml @@ -15,6 +15,8 @@ sections: show_header_toggle: false entities: !include /config/ui/card/weather/include/allergy_entities.yaml + - !include /config/ui/statistics_graph/allergy.yaml + - type: grid column_span: 3 cards: diff --git a/ui/dashboard/subview/weather/asthma.yaml b/ui/dashboard/subview/weather/asthma.yaml index 7cf56ceae..5cef13bb9 100644 --- a/ui/dashboard/subview/weather/asthma.yaml +++ b/ui/dashboard/subview/weather/asthma.yaml @@ -15,6 +15,8 @@ sections: show_header_toggle: false entities: !include /config/ui/card/weather/include/asthma_entities.yaml + - !include /config/ui/statistics_graph/allergy.yaml + - type: grid column_span: 3 cards: diff --git a/ui/dashboard/subview/weather/atmospheric_conditions.yaml b/ui/dashboard/subview/weather/atmospheric_conditions.yaml index 446709790..0243da289 100644 --- a/ui/dashboard/subview/weather/atmospheric_conditions.yaml +++ b/ui/dashboard/subview/weather/atmospheric_conditions.yaml @@ -10,9 +10,12 @@ dense_section_placement: true sections: - type: grid cards: - - type: horizontal-stack + - type: grid + columns: 3 + square: false cards: - !include /config/ui/gauge/barometric_pressure.yaml + - !include /config/ui/gauge/cloud_cover.yaml - type: conditional conditions: @@ -21,7 +24,7 @@ sections: state_not: - unknown - unavailable - card: !include /config/ui/gauge/uv_index.yaml + card: !include /config/ui/gauge/uv_risk.yaml - type: entities state_color: true @@ -31,13 +34,50 @@ sections: - type: entities state_color: true show_header_toggle: false - entities: !include /config/ui/card/weather/include/atmospheric_condition_entities.yaml + entities: !include /config/ui/card/weather/include/outdoor_humidity_entities.yaml + + - type: entities + state_color: true + show_header_toggle: false + entities: !include /config/ui/card/weather/include/cloud_entities.yaml - type: entities state_color: true show_header_toggle: false entities: !include /config/ui/card/weather/include/uv_entities.yaml + - type: grid + columns: 2 + square: false + cards: + - type: statistic + entity: sensor.barometric_pressure + name: "Pressure Avg" + stat_type: mean + period: + fixed_period: + + - type: statistic + entity: sensor.outdoor_humidity + name: "Humidity Avg" + stat_type: mean + period: + fixed_period: + + - type: statistic + entity: sensor.cloud_coverage + name: "Cloud Avg" + stat_type: mean + period: + fixed_period: + + - type: statistic + entity: sensor.uv_index_today + name: "UV Index Avg" + stat_type: mean + period: + fixed_period: + - type: grid column_span: 3 cards: @@ -46,3 +86,14 @@ sections: columns: full cards: - !include /config/ui/graph/weather/atmospheric_conditions_detail.yaml + + - type: grid + columns: 2 + square: false + grid_options: + columns: full + cards: + - !include /config/ui/statistics_graph/outdoor_humidity.yaml + - !include /config/ui/statistics_graph/barometric_pressure.yaml + - !include /config/ui/statistics_graph/cloud_cover.yaml + - !include /config/ui/statistics_graph/uv_index.yaml \ No newline at end of file diff --git a/ui/dashboard/subview/weather/flu.yaml b/ui/dashboard/subview/weather/flu.yaml index 178a34a7a..658f76002 100644 --- a/ui/dashboard/subview/weather/flu.yaml +++ b/ui/dashboard/subview/weather/flu.yaml @@ -1,7 +1,7 @@ ############################################################################### -## Flu Subview +## Cold & Flu Subview ############################################################################### -title: "Flu" +title: "Cold & Flu" path: flu type: sections subview: true @@ -15,6 +15,7 @@ sections: show_header_toggle: false entities: !include /config/ui/card/weather/include/flu_entities.yaml + - !include /config/ui/statistics_graph/flu.yaml - type: grid column_span: 3 diff --git a/ui/dashboard/subview/weather/humidity_map.yaml b/ui/dashboard/subview/weather/humidity_map.yaml index d15b35cc1..8d37905c3 100644 --- a/ui/dashboard/subview/weather/humidity_map.yaml +++ b/ui/dashboard/subview/weather/humidity_map.yaml @@ -6,6 +6,4 @@ path: humidity-map subview: true panel: true cards: - - type: iframe - aspect_ratio: 100% - url: !secret HUMIDITY_MAP_EMBED + - !include /config/ui/iframe/humidity_map.yaml diff --git a/ui/dashboard/subview/weather/lightning.yaml b/ui/dashboard/subview/weather/lightning.yaml index fdbb9a185..86b5de210 100644 --- a/ui/dashboard/subview/weather/lightning.yaml +++ b/ui/dashboard/subview/weather/lightning.yaml @@ -10,6 +10,8 @@ dense_section_placement: true sections: - type: grid cards: + - !include /config/ui/iframe/lightning.yaml + - type: entities state_color: true show_header_toggle: false @@ -33,3 +35,15 @@ sections: columns: full cards: - !include /config/ui/graph/weather/lightning_detail.yaml + + - type: grid + columns: 2 + square: false + grid_options: + columns: full + cards: + - !include /config/ui/statistics_graph/lightning.yaml + - !include /config/ui/statistics_graph/fire_index.yaml + + + diff --git a/ui/dashboard/subview/weather/precipitation.yaml b/ui/dashboard/subview/weather/precipitation.yaml index c9c94490d..279a721d0 100644 --- a/ui/dashboard/subview/weather/precipitation.yaml +++ b/ui/dashboard/subview/weather/precipitation.yaml @@ -10,9 +10,12 @@ dense_section_placement: true sections: - type: grid cards: - - type: horizontal-stack + - type: grid + columns: 3 + square: false cards: - !include /config/ui/gauge/precipitation_intensity.yaml + - !include /config/ui/gauge/cloud_cover.yaml - !include /config/ui/gauge/barometric_pressure.yaml - type: entities @@ -25,6 +28,11 @@ sections: show_header_toggle: false entities: !include /config/ui/card/weather/include/storm_entities.yaml + - type: entities + state_color: true + show_header_toggle: false + entities: !include /config/ui/card/weather/include/cloud_entities.yaml + - type: entities state_color: true show_header_toggle: false @@ -32,6 +40,38 @@ sections: position: sidebar entities: !include /config/ui/card/weather/include/barometric_pressure_entities.yaml + - type: grid + columns: 2 + square: false + cards: + - type: statistic + entity: sensor.precipitation_accumulation_yesterday + name: "Rain Avg" + stat_type: mean + period: + fixed_period: + + - type: statistic + entity: sensor.precipitation_accumulation_yesterday + name: "Rain Max" + stat_type: max + period: + fixed_period: + + - type: statistic + entity: sensor.cloud_coverage + name: "Cloud Avg" + stat_type: mean + period: + fixed_period: + + - type: statistic + entity: sensor.barometric_pressure + name: "Pressure Avg" + stat_type: mean + period: + fixed_period: + - type: grid column_span: 3 cards: @@ -40,3 +80,14 @@ sections: columns: full cards: - !include /config/ui/graph/weather/precipitation_detail.yaml + + - type: grid + columns: 2 + square: false + grid_options: + columns: full + cards: + - !include /config/ui/statistics_graph/daily_precipitation.yaml + - !include /config/ui/statistics_graph/outdoor_humidity.yaml + - !include /config/ui/statistics_graph/barometric_pressure.yaml + - !include /config/ui/statistics_graph/cloud_cover.yaml \ No newline at end of file diff --git a/ui/dashboard/subview/weather/pressure_map.yaml b/ui/dashboard/subview/weather/pressure_map.yaml index 7b32cffa5..9454361e6 100644 --- a/ui/dashboard/subview/weather/pressure_map.yaml +++ b/ui/dashboard/subview/weather/pressure_map.yaml @@ -6,6 +6,4 @@ path: pressure-map subview: true panel: true cards: - - type: iframe - aspect_ratio: 100% - url: !secret PRESSURE_MAP_EMBED + - !include /config/ui/iframe/pressure_map.yaml \ No newline at end of file diff --git a/ui/dashboard/subview/weather/rain_radar.yaml b/ui/dashboard/subview/weather/rain_radar.yaml index 42c77ab22..bd4d711a5 100644 --- a/ui/dashboard/subview/weather/rain_radar.yaml +++ b/ui/dashboard/subview/weather/rain_radar.yaml @@ -6,6 +6,4 @@ path: rain-radar subview: true panel: true cards: - - type: iframe - aspect_ratio: 100% - url: !secret RAIN_RADAR_EMBED + - !include /config/ui/iframe/rain_radar.yaml diff --git a/ui/dashboard/subview/weather/storm_radar.yaml b/ui/dashboard/subview/weather/storm_radar.yaml index 7def0abb5..faf218ee4 100644 --- a/ui/dashboard/subview/weather/storm_radar.yaml +++ b/ui/dashboard/subview/weather/storm_radar.yaml @@ -6,6 +6,4 @@ path: storm-radar subview: true panel: true cards: - - type: iframe - aspect_ratio: 100% - url: !secret STORM_RADAR_EMBED + - !include /config/ui/iframe/storm_radar.yaml diff --git a/ui/dashboard/subview/weather/temperature.yaml b/ui/dashboard/subview/weather/temperature.yaml index 0b3535df1..8c7e809cd 100644 --- a/ui/dashboard/subview/weather/temperature.yaml +++ b/ui/dashboard/subview/weather/temperature.yaml @@ -10,16 +10,82 @@ dense_section_placement: true sections: - type: grid cards: + - type: grid + columns: 3 + square: false + cards: + - !include /config/ui/gauge/outdoor_temperature.yaml + - !include /config/ui/gauge/outdoor_apparent_temperature.yaml + - !include /config/ui/gauge/dew_point.yaml + - type: entities state_color: true show_header_toggle: false entities: !include /config/ui/card/weather/include/outdoor_temperature_entities.yaml - - type: entities - state_color: true - show_header_toggle: false - entities: !include /config/ui/card/weather/include/outdoor_humidity_entities.yaml + - type: grid + columns: 2 + square: false + cards: + - type: statistic + entity: sensor.outdoor_temperature + name: "Temperature Avg" + stat_type: mean + period: + fixed_period: + + - type: statistic + entity: sensor.dew_point + name: "Dew Point Avg" + stat_type: mean + period: + fixed_period: + + - type: statistic + entity: sensor.outdoor_temperature + name: "Low Temp (Day)" + stat_type: min + period: + rolling_window: + duration: + hours: 24 + - type: statistic + entity: sensor.outdoor_temperature + name: "High Temp (Day)" + stat_type: max + period: + rolling_window: + duration: + hours: 24 + + - type: statistic + entity: sensor.outdoor_temperature + name: "Low Temp" + stat_type: min + period: + fixed_period: + + - type: statistic + entity: sensor.outdoor_temperature + name: "High Temp" + stat_type: max + period: + fixed_period: + + - type: statistic + entity: sensor.outdoor_apparent_temperature + name: "Apparent Low" + stat_type: min + period: + fixed_period: + + - type: statistic + entity: sensor.outdoor_apparent_temperature + name: "Apparent High" + stat_type: max + period: + fixed_period: - type: grid column_span: 3 cards: @@ -28,3 +94,16 @@ sections: columns: full cards: - !include /config/ui/graph/weather/temperature_detail.yaml + + - type: grid + columns: 2 + square: false + grid_options: + columns: full + cards: + - !include /config/ui/statistics_graph/outdoor_temperature.yaml + - !include /config/ui/statistics_graph/outdoor_apparent_temperature.yaml + - !include /config/ui/statistics_graph/dew_point.yaml + - !include /config/ui/statistics_graph/outdoor_average_temperature.yaml + - !include /config/ui/statistics_graph/outdoor_high_temperature_differential.yaml + - !include /config/ui/statistics_graph/outdoor_low_temperature_differential.yaml \ No newline at end of file diff --git a/ui/dashboard/subview/weather/temperature_map.yaml b/ui/dashboard/subview/weather/temperature_map.yaml index 12f402ffa..0dbaac856 100644 --- a/ui/dashboard/subview/weather/temperature_map.yaml +++ b/ui/dashboard/subview/weather/temperature_map.yaml @@ -6,6 +6,4 @@ path: temperature-map subview: true panel: true cards: - - type: iframe - aspect_ratio: 100% - url: !secret TEMPERATURE_MAP_EMBED + - !include /config/ui/iframe/temperature_map.yaml diff --git a/ui/dashboard/subview/weather/ventusky_cloud_radar.yaml b/ui/dashboard/subview/weather/ventusky_cloud_radar.yaml index e82d9ab80..79eeecb6c 100644 --- a/ui/dashboard/subview/weather/ventusky_cloud_radar.yaml +++ b/ui/dashboard/subview/weather/ventusky_cloud_radar.yaml @@ -6,6 +6,4 @@ path: ventusky-cloud-radar subview: true panel: true cards: - - type: iframe - aspect_ratio: 100% - url: !secret VENTUSKY_CLOUD_RADAR + - !include /config/ui/iframe/ventusky_cloud_radar.yaml diff --git a/ui/dashboard/subview/weather/ventusky_satellite.yaml b/ui/dashboard/subview/weather/ventusky_satellite.yaml index f5cd02dae..6ccc6f4e8 100644 --- a/ui/dashboard/subview/weather/ventusky_satellite.yaml +++ b/ui/dashboard/subview/weather/ventusky_satellite.yaml @@ -6,6 +6,4 @@ path: ventusky-satellite subview: true panel: true cards: - - type: iframe - aspect_ratio: 100% - url: !secret VENTUSKY_SATELLITE + - !include /config/ui/iframe/ventusky_satellite.yaml diff --git a/ui/dashboard/subview/weather/weather_statistics.yaml b/ui/dashboard/subview/weather/weather_statistics.yaml deleted file mode 100644 index 1c1560054..000000000 --- a/ui/dashboard/subview/weather/weather_statistics.yaml +++ /dev/null @@ -1,179 +0,0 @@ -############################################################################### -## Weather Statistics Subview -############################################################################### -title: "Weather Statistics" -path: weather-statistics -subview: true -type: sections -sections: - - type: grid - cards: - - type: grid - columns: 2 - square: false - cards: - - type: statistic - entity: sensor.outdoor_temperature - name: "Low Temp (Day)" - stat_type: min - period: - rolling_window: - duration: - hours: 24 - - - type: statistic - entity: sensor.outdoor_temperature - name: "High Temp (Day)" - stat_type: max - period: - rolling_window: - duration: - hours: 24 - - - type: statistic - entity: sensor.outdoor_temperature - name: "Low Temp" - stat_type: min - period: - fixed_period: - - - type: statistic - entity: sensor.outdoor_temperature - name: "High Temp" - stat_type: max - period: - fixed_period: - - - type: statistic - entity: sensor.outdoor_apparent_temperature - name: "Apparent Low" - stat_type: min - period: - fixed_period: - - - type: statistic - entity: sensor.outdoor_apparent_temperature - name: "Apparent High" - stat_type: max - period: - fixed_period: - - - type: statistic - entity: sensor.outdoor_temperature - name: "Temperature Avg" - stat_type: mean - period: - fixed_period: - - - type: statistic - entity: sensor.outdoor_humidity - name: "Humidity Avg" - stat_type: mean - period: - fixed_period: - - - type: statistic - entity: sensor.precipitation_accumulation_yesterday - name: "Rain Avg" - stat_type: mean - period: - fixed_period: - - - type: statistic - entity: sensor.precipitation_accumulation_yesterday - name: "Rain Max" - stat_type: max - period: - fixed_period: - - - type: statistic - entity: sensor.wind_speed - name: "Wind Avg" - stat_type: mean - period: - fixed_period: - - - type: statistic - entity: sensor.wind_gust - name: "Wind Max" - stat_type: max - period: - fixed_period: - - - type: statistic - entity: sensor.cloud_coverage - name: "Cloud Avg" - stat_type: mean - period: - fixed_period: - - - type: statistic - entity: sensor.barometric_pressure - name: "Pressure Avg" - stat_type: mean - period: - fixed_period: - - - type: entities - entities: - - entity: sensor.outdoor_temperature_daily_average - name: "Average Temperature (Last 24)" - - - type: custom:template-entity-row - name: "High Temp (Last 24)" - icon: mdi:clock-star-four-points-outline - state: > - {{ states('sensor.outdoor_temperature_daily_high', with_unit=true) }} - secondary: > - {% if has_value('sensor.outdoor_temperature_daily_high_time') %} - {%- set time = states('sensor.outdoor_temperature_daily_high_time') | as_datetime -%} - {{- iif(time.day == now().day, 'Today at ', 'Yesterday at ') }} - {{- time | as_timestamp('unknown') | timestamp_custom('%-I:%M %p', true, 'unknown') }} - {%- endif %} - - - type: custom:template-entity-row - name: "Low Temp (Last 24)" - icon: mdi:clock-star-four-points-outline - state: "{{ states('sensor.outdoor_temperature_daily_low', with_unit=true) }}" - secondary: > - {% if has_value('sensor.outdoor_temperature_daily_low_time') %} - {%- set time = states('sensor.outdoor_temperature_daily_low_time') | as_datetime -%} - {{- iif(time.day == now().day, 'Today at ', 'Yesterday at ') }} - {{- time | as_timestamp('unknown') | timestamp_custom('%-I:%M %p', true, 'unknown') }} - {%- endif %} - - - type: custom:template-entity-row - name: "High Temp (All Time)" - icon: mdi:sun-thermometer - state: "{{ state_attr('sensor.tempest_st_00057689_temperature', 'max_all') }} °C" - secondary: > - {{ state_attr('sensor.tempest_st_00057689_temperature', 'max_all_time') | as_timestamp('unknown') - | timestamp_custom('%Y-%m-%d at %-I:%M %p', true, 'unknown') }} - - - type: custom:template-entity-row - name: "Low Temp (All Time)" - icon: mdi:sun-thermometer - state: "{{ state_attr('sensor.tempest_st_00057689_temperature', 'min_all') }} °C" - secondary: > - {{ state_attr('sensor.tempest_st_00057689_temperature', 'min_all_time') | as_timestamp('unknown') - | timestamp_custom('%Y-%m-%d at %-I:%M %p', true, 'unknown') }} - - - type: grid - cards: - - !include /config/ui/statistics_graph/outdoor_temperature.yaml - - !include /config/ui/statistics_graph/outdoor_apparent_temperature.yaml - - !include /config/ui/statistics_graph/outdoor_high_temperature_differential.yaml - - !include /config/ui/statistics_graph/outdoor_low_temperature_differential.yaml - - - type: grid - cards: - - !include /config/ui/statistics_graph/daily_precipitation.yaml - - !include /config/ui/statistics_graph/outdoor_humidity.yaml - - !include /config/ui/statistics_graph/barometric_pressure.yaml - - !include /config/ui/statistics_graph/cloud_cover.yaml - - - type: grid - cards: - - !include /config/ui/statistics_graph/wind_speed.yaml - - !include /config/ui/statistics_graph/wind_gust.yaml - - !include /config/ui/statistics_graph/wind_bearing.yaml diff --git a/ui/dashboard/subview/weather/wind.yaml b/ui/dashboard/subview/weather/wind.yaml index 2b60abdb5..b9b82cce2 100644 --- a/ui/dashboard/subview/weather/wind.yaml +++ b/ui/dashboard/subview/weather/wind.yaml @@ -17,6 +17,38 @@ sections: show_header_toggle: false entities: !include /config/ui/card/weather/include/wind_entities.yaml + - type: grid + columns: 2 + square: false + cards: + - type: statistic + entity: sensor.wind_speed + name: "Wind Avg" + stat_type: mean + period: + fixed_period: + + - type: statistic + entity: sensor.wind_speed + name: "Wind Max" + stat_type: max + period: + fixed_period: + + - type: statistic + entity: sensor.wind_gust + name: "Gust Max" + stat_type: max + period: + fixed_period: + + - type: statistic + entity: sensor.wind_bearing + name: "Bearing Avg" + stat_type: mean + period: + fixed_period: + - type: grid column_span: 3 cards: @@ -25,3 +57,13 @@ sections: columns: full cards: - !include /config/ui/graph/weather/wind_detail.yaml + + - type: grid + columns: 2 + square: false + grid_options: + columns: full + cards: + - !include /config/ui/statistics_graph/wind_speed.yaml + - !include /config/ui/statistics_graph/wind_gust.yaml + - !include /config/ui/statistics_graph/wind_bearing.yaml \ No newline at end of file diff --git a/ui/dashboard/subview/weather/wind_map.yaml b/ui/dashboard/subview/weather/wind_map.yaml index bca7eff10..0c9e7705d 100644 --- a/ui/dashboard/subview/weather/wind_map.yaml +++ b/ui/dashboard/subview/weather/wind_map.yaml @@ -6,6 +6,4 @@ path: wind-map subview: true panel: true cards: - - type: iframe - aspect_ratio: 100% - url: !secret WIND_MAP_EMBED + - !include /config/ui/iframe/wind_map.yaml diff --git a/ui/gauge/air_quality.yaml b/ui/gauge/air_quality.yaml new file mode 100644 index 000000000..2de064a68 --- /dev/null +++ b/ui/gauge/air_quality.yaml @@ -0,0 +1,33 @@ +############################################################################### +## Air Quality Gauge +############################################################################### +type: gauge +name: "Air Quality" +entity: sensor.air_quality_index +needle: true +min: 0 +max: 350 +segments: + - from: 0 + label: "Low" + color: var(--success-color) + + - from: 50 + label: "Moderate" + color: var(--yellow-color) + + - from: 100 + label: "Unhealthy - Sensitive" + color: var(--amber-color) + + - from: 150 + label: "Unhealthy" + color: var(--orange-color) + + - from: 200 + label: "Very Unhealthy" + color: var(--red-color) + + - from: 300 + label: "Hazardous" + color: var(--deep-purple-color) diff --git a/ui/gauge/barometric_pressure.yaml b/ui/gauge/barometric_pressure.yaml index 8117fa7ee..f387fb547 100644 --- a/ui/gauge/barometric_pressure.yaml +++ b/ui/gauge/barometric_pressure.yaml @@ -11,15 +11,19 @@ segments: - from: 970 label: "Stormy" color: var(--entity-severe-color) + - from: 985 label: "Rain" color: var(--entity-warning-color) + - from: 1000 label: "Change" color: var(--entity-minor-color) + - from: 1015 label: "Fair" color: var(--entity-ok-color) + - from: 1030 label: "Dry" color: rgb(66, 135, 245) diff --git a/ui/gauge/cloud_cover.yaml b/ui/gauge/cloud_cover.yaml new file mode 100644 index 000000000..02bf3810d --- /dev/null +++ b/ui/gauge/cloud_cover.yaml @@ -0,0 +1,26 @@ +############################################################################### +## Cloud Cover Gauge +############################################################################### +type: gauge +name: "Cloud Cover" +entity: sensor.cloud_coverage +needle: true +min: 0 +max: 100 +segments: + - from: 0 + label: "Clear" + color: rgb(3, 190, 252) + + - from: 10 + label: "Partly Cloudy" + color: rgb(181, 221, 235) + + - from: 50 + label: "Mostly Cloudy" + color: rgb(165, 190, 199) + + - from: 80 + label: "Cloudy" + color: rgb(101, 111, 115) + diff --git a/ui/gauge/dew_point.yaml b/ui/gauge/dew_point.yaml new file mode 100644 index 000000000..aa9ae8fcd --- /dev/null +++ b/ui/gauge/dew_point.yaml @@ -0,0 +1,50 @@ +############################################################################### +## Dew Point Gauge +############################################################################### +type: gauge +name: "Dew Point" +entity: sensor.dew_point +needle: true +min: 0 +max: 30 +segments: + - from: -20 + label: "Very Dry" + color: rgb(138, 144, 150) + + - from: 5 + label: "Dry" + color: rgb(158, 184, 217) + + - from: 8 + label: "Somewhat Dry" + color: rgb(118, 205, 227) + + - from: 10 + label: "Very Comfortable" + color: rgb(70, 199, 171) + + - from: 12 + label: "Comfortable" + color: rgb(56, 214, 13) + + - from: 16 + label: "Ok For Most" + color: rgb(166, 201, 10) + + - from: 18 + label: "Uncomfortable" + color: rgb(201, 176, 10) + + - from: 21 + label: "Very Humid" + color: rgb(209, 88, 23) + + - from: 24 + label: "Oppressive" + color: rgb(189, 9, 141) + + - from: 26 + label: "Severely High" + color: rgb(181, 18, 43) + diff --git a/ui/gauge/fire_risk.yaml b/ui/gauge/fire_risk.yaml new file mode 100644 index 000000000..7ed33a814 --- /dev/null +++ b/ui/gauge/fire_risk.yaml @@ -0,0 +1,29 @@ +############################################################################### +## Fire Risk Gauge +############################################################################### +type: gauge +name: "Fire" +entity: sensor.fire_index +needle: true +min: 0 +max: 35 +segments: + - from: 0 + label: "Low" + color: var(--success-color) + + - from: 5 + label: "Moderate" + color: var(--yellow-color) + + - from: 10 + label: "High" + color: var(--amber-color) + + - from: 20 + label: "Very High" + color: var(--orange-color) + + - from: 30 + label: "Extreme" + color: var(--red-color) diff --git a/ui/gauge/outdoor_apparent_temperature.yaml b/ui/gauge/outdoor_apparent_temperature.yaml new file mode 100644 index 000000000..f69894f45 --- /dev/null +++ b/ui/gauge/outdoor_apparent_temperature.yaml @@ -0,0 +1,64 @@ +############################################################################### +## Feels Like Temperature Gauge +############################################################################### +type: gauge +name: "Feels Like" +entity: sensor.outdoor_apparent_temperature +needle: true +min: -20 +max: 35 +segments: + - from: -50 # -20 + label: "Extreme Cold" + color: rgb(143, 89, 169) + + - from: -20 # -10 + label: "Extreme Cold" + color: rgb(157, 219, 217) + + - from: -15 # 0 + label: "Frigid" + color: rgb(106, 191, 181) + + - from: -10 # 10 + label: "Frigid" + color: rgb(100, 166, 189) + + - from: -5 # 20 + label: "Freezing" + color: rgb(93, 133, 198) + + - from: 0 # 32 + label: "Freezing" + color: rgb(68, 125, 99) + + - from: 5 # 40 + label: "Cold" + color: rgb(128, 147, 24) + + - from: 10 # 50 + label: "Chilly" + color: rgb(209, 212, 78) + + - from: 15 # 60 + label: "Cool" + color: rgb(243, 183, 4) + + - from: 20 # 70 + label: "Nice" + color: rgb(250, 223, 86) + + - from: 25 # 80 + label: "Warm" + color: rgb(232, 83, 25) + + - from: 30 # 85 + label: "Hot" + color: rgb(209, 54, 54) + + - from: 35 # 90 + label: "Very Hot" + color: rgb(71, 14, 0) + + - from: 40 # 95 + label: "Extreme Heat" \ No newline at end of file diff --git a/ui/gauge/outdoor_temperature.yaml b/ui/gauge/outdoor_temperature.yaml new file mode 100644 index 000000000..515ef4f1d --- /dev/null +++ b/ui/gauge/outdoor_temperature.yaml @@ -0,0 +1,64 @@ +############################################################################### +## Temperature Gauge +############################################################################### +type: gauge +name: "Temperature" +entity: sensor.outdoor_temperature +needle: true +min: -20 +max: 35 +segments: + - from: -50 # -20 + label: "Extreme Cold" + color: rgb(143, 89, 169) + + - from: -20 # -10 + label: "Extreme Cold" + color: rgb(157, 219, 217) + + - from: -15 # 0 + label: "Frigid" + color: rgb(106, 191, 181) + + - from: -10 # 10 + label: "Frigid" + color: rgb(100, 166, 189) + + - from: -5 # 20 + label: "Freezing" + color: rgb(93, 133, 198) + + - from: 0 # 32 + label: "Freezing" + color: rgb(68, 125, 99) + + - from: 5 # 40 + label: "Cold" + color: rgb(128, 147, 24) + + - from: 10 # 50 + label: "Chilly" + color: rgb(209, 212, 78) + + - from: 15 # 60 + label: "Cool" + color: rgb(243, 183, 4) + + - from: 20 # 70 + label: "Nice" + color: rgb(250, 223, 86) + + - from: 25 # 80 + label: "Warm" + color: rgb(232, 83, 25) + + - from: 30 # 85 + label: "Hot" + color: rgb(209, 54, 54) + + - from: 35 # 90 + label: "Very Hot" + color: rgb(71, 14, 0) + + - from: 40 # 95 + label: "Extreme Heat" diff --git a/ui/gauge/precipitation_intensity.yaml b/ui/gauge/precipitation_intensity.yaml index 3c4ec423a..bce8f6848 100644 --- a/ui/gauge/precipitation_intensity.yaml +++ b/ui/gauge/precipitation_intensity.yaml @@ -13,19 +13,15 @@ cards: state: rain - condition: state - entity: sensor.precipitation_type - state: "none" - - - condition: state - entity: sensor.precipitation_type - state: unknown + entity: binary_sensor.freezing + state: "off" - - condition: state - entity: sensor.precipitation_type - state: unavailable + - condition: state + entity: sensor.precipitation_type + state_not: unavailable card: type: gauge - name: "Intensity" + name: "Rain Intensity" entity: sensor.precipitation_intensity needle: true min: 0 @@ -34,27 +30,35 @@ cards: - from: 0 label: "None" color: rgb(110, 110, 110) + - from: 0.01 label: "Drizzle" color: rgb(60, 116, 160) + - from: 0.6 label: "Very Light" color: rgb(60, 116, 160) + - from: 1 label: "Light" color: rgb(59, 161, 161) + - from: 4 label: "Moderate" color: rgb(59, 161, 61) + - from: 15 label: "Heavy" color: rgb(130, 161, 59) + - from: 20 label: "Heavy" color: rgb(161, 59, 59) + - from: 30 label: "Very Heavy" color: rgb(161, 59, 161) + - from: 50 label: "Violent" color: rgb(148, 79, 237) @@ -64,15 +68,19 @@ cards: - condition: or conditions: - condition: state - entity: sensor.precipitation_type - state: snow + entity: binary_sensor.freezing + state: "on" - condition: state entity: sensor.precipitation_type - state: ice + state: snow + + - condition: state + entity: sensor.precipitation_type + state_not: unavailable card: type: gauge - name: "Intensity" + name: "Snow Intensity" entity: sensor.precipitation_intensity needle: true min: 0 @@ -81,12 +89,15 @@ cards: - from: 0 label: "None" color: rgb(110, 110, 110) + - from: 0.01 label: "Light" - color: rgb(60, 116, 160) + color: rgb(38, 201, 163) + - from: 1 label: "Moderate" - color: rgb(59, 161, 61) + color: rgb(38, 177, 201) + - from: 5 label: "Heavy" - color: rgb(130, 161, 59) + color: rgb(38, 81, 201) diff --git a/ui/gauge/smoke_risk.yaml b/ui/gauge/smoke_risk.yaml new file mode 100644 index 000000000..bcc86f90b --- /dev/null +++ b/ui/gauge/smoke_risk.yaml @@ -0,0 +1,29 @@ +############################################################################### +## Smoke Risk Gauge +############################################################################### +type: gauge +name: "Smoke" +entity: sensor.atmospheric_smoke +needle: true +min: -10 +max: 300 +segments: + - from: -10 # show more green on gauge + label: "Low" + color: var(--success-color) + + - from: 10 + label: "Moderate" + color: var(--yellow-color) + + - from: 60 + label: "High" + color: var(--amber-color) + + - from: 120 + label: "Very High" + color: var(--orange-color) + + - from: 250 + label: "Extreme" + color: var(--red-color) diff --git a/ui/gauge/speedtest_download.yaml b/ui/gauge/speedtest_download.yaml index 13995fa0f..20b70cd8e 100644 --- a/ui/gauge/speedtest_download.yaml +++ b/ui/gauge/speedtest_download.yaml @@ -11,15 +11,19 @@ segments: - from: 0 label: "Dead" color: var(--entity-critical-color) + - from: 50 label: "Poor" color: var(--entity-severe-color) + - from: 100 label: "Slow" color: var(--entity-warning-color) + - from: 150 label: "Average" color: var(--entity-minor-color) + - from: 200 label: "Fast" color: var(--entity-ok-color) diff --git a/ui/gauge/speedtest_ping.yaml b/ui/gauge/speedtest_ping.yaml index ec80c7c66..e7f607fdb 100644 --- a/ui/gauge/speedtest_ping.yaml +++ b/ui/gauge/speedtest_ping.yaml @@ -11,15 +11,19 @@ segments: - from: 0 label: "Fast" color: var(--entity-ok-color) + - from: 20 label: "Normal" color: var(--entity-minor-color) + - from: 40 label: "Average" color: var(--entity-warning-color) + - from: 60 label: "Slow" color: var(--entity-severe-color) + - from: 80 label: "Poor" color: var(--entity-critical-color) diff --git a/ui/gauge/speedtest_upload.yaml b/ui/gauge/speedtest_upload.yaml index 76f4d1f83..08d57a36b 100644 --- a/ui/gauge/speedtest_upload.yaml +++ b/ui/gauge/speedtest_upload.yaml @@ -11,15 +11,19 @@ segments: - from: 0 label: "Dead" color: var(--entity-critical-color) + - from: 50 label: "Poor" color: var(--entity-severe-color) + - from: 100 label: "Slow" color: var(--entity-warning-color) + - from: 150 label: "Average" color: var(--entity-minor-color) + - from: 200 label: "Fast" color: var(--entity-ok-color) diff --git a/ui/gauge/uv_index.yaml b/ui/gauge/uv_risk.yaml similarity index 99% rename from ui/gauge/uv_index.yaml rename to ui/gauge/uv_risk.yaml index a296ead48..64a258ad9 100644 --- a/ui/gauge/uv_index.yaml +++ b/ui/gauge/uv_risk.yaml @@ -11,15 +11,19 @@ segments: - from: 0 label: "Low" color: var(--entity-ok-color) + - from: 3 label: "Moderate" color: var(--entity-minor-color) + - from: 5 label: "Moderate-High" color: var(--entity-warning-color) + - from: 7 label: "High" color: var(--entity-severe-color) + - from: 9 label: "Very High" color: var(--entity-critical-color) diff --git a/ui/graph/graph_templates.yaml b/ui/graph/graph_templates.yaml index 32d778a03..c259f6c03 100644 --- a/ui/graph/graph_templates.yaml +++ b/ui/graph/graph_templates.yaml @@ -116,7 +116,7 @@ weather_detail: graph_span: 7d # any more renders graphs incorrectly apex_config: chart: - height: 750px + height: 600px width: 100% background: rgb(20 , 20, 20) xaxis: diff --git a/ui/graph/include/dew_point_area_color.yaml b/ui/graph/include/dew_point_area_color.yaml new file mode 100644 index 000000000..81a359dad --- /dev/null +++ b/ui/graph/include/dew_point_area_color.yaml @@ -0,0 +1,43 @@ +############################################################################### +## Dew Point Area Colors (Apex Graphs) +# https://www.windy.com/colors?temp, 42.505,-88.451, 6 +############################################################################### +- value: -20 + color: rgb(138, 144, 150) + opacity: 0.5 + +- value: 5 + color: rgb(158, 184, 217) + opacity: 0.5 + +- value: 8 + color: rgb(118, 205, 227) + opacity: 0.5 + +- value: 10 + color: rgb(70, 199, 171) + opacity: 0.5 + +- value: 12 + color: rgb(56, 214, 13) + opacity: 0.5 + +- value: 16 + color: rgb(166, 201, 10) + opacity: 0.5 + +- value: 18 + color: rgb(201, 176, 10) + opacity: 0.5 + +- value: 21 + color: rgb(209, 88, 23) + opacity: 0.5 + +- value: 24 + color: rgb(189, 9, 141) + opacity: 0.5 + +- value: 26 + color: rgb(181, 18, 43) + opacity: 0.5 \ No newline at end of file diff --git a/ui/graph/include/dew_point_line_color.yaml b/ui/graph/include/dew_point_line_color.yaml new file mode 100644 index 000000000..5dedee4a0 --- /dev/null +++ b/ui/graph/include/dew_point_line_color.yaml @@ -0,0 +1,32 @@ +############################################################################### +## Dew Point Line Colors (Apex Graphs) +############################################################################### +- value: -20 + color: rgb(138, 144, 150) + +- value: 5 + color: rgb(158, 184, 217) + +- value: 8 + color: rgb(118, 205, 227) + +- value: 10 + color: rgb(70, 199, 171) + +- value: 12 + color: rgb(56, 214, 13) + +- value: 16 + color: rgb(166, 201, 10) + +- value: 18 + color: rgb(201, 176, 10) + +- value: 21 + color: rgb(209, 88, 23) + +- value: 24 + color: rgb(189, 9, 141) + +- value: 26 + color: rgb(181, 18, 43) \ No newline at end of file diff --git a/ui/graph/include/precipitation_probability_area_color.yaml b/ui/graph/include/precipitation_probability_area_color.yaml index ddf46dad4..1dada42d2 100644 --- a/ui/graph/include/precipitation_probability_area_color.yaml +++ b/ui/graph/include/precipitation_probability_area_color.yaml @@ -2,13 +2,45 @@ ## Precipitation Probability Area Colors (Apex Graphs) ############################################################################### - value: 0 - color: rgb(110, 110, 110) + opacity: 0.0 + color: rgb(100, 100, 100) #STYLE var(--state-icon-color) + +- value: 10 + opacity: 0.1 + color: rgb(163, 225, 250) + +- value: 20 + opacity: 0.1 + color: rgb(124, 211, 253) + +- value: 30 opacity: 0.1 + color: rgb(81, 196, 255) + +- value: 40 + opacity: 0.2 + color: rgb(0, 180, 255) -- value: 1 - color: rgb(162, 227, 250) +- value: 50 opacity: 0.2 + color: rgb(0, 163, 255) + +- value: 60 + opacity: 0.2 + color: rgb(0, 146, 252) + +- value: 70 + opacity: 0.2 + color: rgb(0, 130, 241) + +- value: 80 + opacity: 0.3 + color: rgb(0, 113, 233) + +- value: 90 + opacity: 0.3 + color: rgb(0, 87, 244) - value: 100 - color: rgb(35, 42, 250) opacity: 0.3 + color: rgb(35, 46, 251) \ No newline at end of file diff --git a/ui/graph/include/precipitation_probability_line_color.yaml b/ui/graph/include/precipitation_probability_line_color.yaml index 1b9f85870..7db3fd620 100644 --- a/ui/graph/include/precipitation_probability_line_color.yaml +++ b/ui/graph/include/precipitation_probability_line_color.yaml @@ -2,10 +2,34 @@ ## Precipitation Probability Area Colors (Apex Graphs) ############################################################################### - value: 0 - color: rgb(110, 110, 110) + color: rgb(100, 100, 100) #STYLE var(--state-icon-color) -- value: 1 - color: rgb(162, 227, 250) +- value: 10 + color: rgb(163, 225, 250) + +- value: 20 + color: rgb(124, 211, 253) + +- value: 30 + color: rgb(81, 196, 255) + +- value: 40 + color: rgb(0, 180, 255) + +- value: 50 + color: rgb(0, 163, 255) + +- value: 60 + color: rgb(0, 146, 252) + +- value: 70 + color: rgb(0, 130, 241) + +- value: 80 + color: rgb(0, 113, 233) + +- value: 90 + color: rgb(0, 87, 244) - value: 100 - color: rgb(35, 42, 250) + color: rgb(35, 46, 251) diff --git a/ui/graph/include/temperature_line_color.yaml b/ui/graph/include/temperature_line_color.yaml index 84f992386..18b26a041 100644 --- a/ui/graph/include/temperature_line_color.yaml +++ b/ui/graph/include/temperature_line_color.yaml @@ -2,50 +2,44 @@ ## Temperature Line Colors (Apex Graphs) # https://www.windy.com/colors?temp, 42.505,-88.451, 6 ############################################################################### -- value: -29 # -20 - color: rgb(151, 143, 195) +- value: -25 # -13F + color: rgb(143, 89, 169) -- value: -23 # -10 - color: rgb(146, 143, 187) +- value: -20 # -4F + color: rgb(157, 219, 217) -- value: -17 # 0 - color: rgb(151, 196, 216) +- value: -15 # 5F + color: rgb(106, 191, 181) -- value: -12 # 10 - color: rgb(139, 205, 207) +- value: -10 # 14F + color: rgb(100, 166, 189) -- value: -7 # 20 - color: rgb(114, 185, 187) +- value: -5 # 23F + color: rgb(93, 133, 198) -- value: -1 # 30 - color: rgb(112, 143, 169) +- value: 0 # 32F + color: rgb(68, 125, 99) -- value: 4 # 40 - color: rgb(79, 139, 72) +- value: 5 # 41F + color: rgb(128, 147, 24) -- value: 10 # 50 - color: rgb(125, 143, 40) +- value: 10 # 50F + color: rgb(209, 212, 78) -- value: 15 # 60 - color: rgb(176, 162, 12) +- value: 15 # 59F + color: rgb(243, 183, 4) -- value: 21 # 70 - color: rgb(214, 172, 8) +- value: 20 # 68F + color: rgb(250, 223, 86) -- value: 26 # 80 - color: rgb(239, 148, 7) +- value: 25 # 77F + color: rgb(232, 83, 25) -- value: 29 # 85 - color: rgb(247, 96, 2) +- value: 30 # 86F + color: rgb(209, 54, 54) -- value: 32 # 90 - color: rgb(204, 74, 19) +- value: 35 # 95F + color: rgb(71, 14, 0) -- value: 35 # 95 - color: rgb(192, 66, 18) - -- value: 38 # 100 - color: rgb(147, 38, 8) - -- value: 43 # 110 - color: rgb(177, 67, 45) +- value: 40 # 104F + color: rgb(177, 67, 45) diff --git a/ui/graph/include/visibility_line_color.yaml b/ui/graph/include/visibility_line_color.yaml index b07926ea8..3eaf17c07 100644 --- a/ui/graph/include/visibility_line_color.yaml +++ b/ui/graph/include/visibility_line_color.yaml @@ -4,5 +4,5 @@ - value: 0 color: rgb(107, 107, 107) -- value: 35 +- value: 1 color: rgb(12, 155, 237) diff --git a/ui/graph/include/wind_speed_area_color.yaml b/ui/graph/include/wind_speed_area_color.yaml index 6260999d4..2ba6f08da 100644 --- a/ui/graph/include/wind_speed_area_color.yaml +++ b/ui/graph/include/wind_speed_area_color.yaml @@ -3,7 +3,7 @@ ## https://www.windy.com/colors?42.326,-83.057, 4 ############################################################################### - value: 0 - color: rgb(98, 113, 183) + color: rgb(100, 100, 100) #STYLE var(--state-icon-color) opacity: 0.2 - value: 4 color: rgb(57, 97, 159) diff --git a/ui/graph/include/wind_speed_line_color.yaml b/ui/graph/include/wind_speed_line_color.yaml index bc4433199..7beed955d 100644 --- a/ui/graph/include/wind_speed_line_color.yaml +++ b/ui/graph/include/wind_speed_line_color.yaml @@ -3,6 +3,9 @@ ## https://www.windy.com/colors?42.326,-83.057, 4 ############################################################################### - value: 0.0 + color: rgb(100, 100, 100) #STYLE var(--state-icon-color) + +- value: 0.1 color: rgb(98, 113, 183) - value: 4 diff --git a/ui/graph/layout/weather.yaml b/ui/graph/layout/weather.yaml index 19f46c96d..6dd65715c 100644 --- a/ui/graph/layout/weather.yaml +++ b/ui/graph/layout/weather.yaml @@ -7,7 +7,7 @@ square: false cards: - !include /config/ui/graph/weather/temperature.yaml - !include /config/ui/graph/weather/apparent_temperature.yaml - - !include /config/ui/graph/weather/dewpoint_temperature.yaml + - !include /config/ui/graph/weather/dew_point.yaml - !include /config/ui/graph/weather/humidity.yaml - !include /config/ui/graph/weather/barometric_pressure.yaml diff --git a/ui/graph/layout/weather_mobile.yaml b/ui/graph/layout/weather_mobile.yaml index f709b1634..947c790a4 100644 --- a/ui/graph/layout/weather_mobile.yaml +++ b/ui/graph/layout/weather_mobile.yaml @@ -7,7 +7,7 @@ square: false cards: - !include /config/ui/graph/weather/temperature.yaml - !include /config/ui/graph/weather/apparent_temperature.yaml - - !include /config/ui/graph/weather/dewpoint_temperature.yaml + - !include /config/ui/graph/weather/dew_point.yaml - !include /config/ui/graph/weather/humidity.yaml - !include /config/ui/graph/weather/barometric_pressure.yaml diff --git a/ui/graph/weather/air_quality_detail.yaml b/ui/graph/weather/air_quality_detail.yaml index 41e06fb51..0627d88e3 100644 --- a/ui/graph/weather/air_quality_detail.yaml +++ b/ui/graph/weather/air_quality_detail.yaml @@ -80,7 +80,7 @@ series: name: "SO2" yaxis_id: aqi - - entity: sensor.ozone + - entity: sensor.ozone_index name: "Ozone" yaxis_id: aqi diff --git a/ui/graph/weather/atmospheric_conditions_detail.yaml b/ui/graph/weather/atmospheric_conditions_detail.yaml index 44a365a46..9ea7fb2d8 100644 --- a/ui/graph/weather/atmospheric_conditions_detail.yaml +++ b/ui/graph/weather/atmospheric_conditions_detail.yaml @@ -39,6 +39,44 @@ yaxis: fontSize: 16px fontWeight: normal + - id: temperature + show: true + apex_config: + tickAmount: 5 + decimalsInFloat: 1 + title: + text: "Temperature" + rotate: -90 + offsetX: -10 + style: + fontSize: 20px + fontFamily: Roboto + fontWeight: normal + labels: + style: + fontSize: 16px + fontWeight: normal + + - id: humidity + show: false + opposite: true + min: 0 + max: 100 + apex_config: + tickAmount: 5 + decimalsInFloat: 0 + title: + text: "Humidity" + rotate: -90 + style: + fontSize: 20px + fontFamily: Roboto + fontWeight: normal + labels: + style: + fontSize: 16px + fontWeight: normal + - id: clouds show: false min: 0 @@ -49,6 +87,7 @@ yaxis: - id: uv_index show: true + opposite: true min: 0 max: 12 apex_config: @@ -68,7 +107,7 @@ yaxis: fontWeight: normal - id: aqi - show: true + show: false opposite: true min: 0 max: ~50 @@ -88,6 +127,26 @@ yaxis: fontSize: 16px fontWeight: normal + - id: ozone + show: true + opposite: true + min: 0 + max: 400 + apex_config: + tickAmount: 5 + decimalsInFloat: 0 + title: + text: "Ozone Level (du)" + rotate: -90 + style: + fontSize: 20px + fontFamily: Roboto + fontWeight: normal + labels: + style: + fontSize: 16px + fontWeight: normal + series: - entity: sensor.barometric_pressure name: "Pressure" @@ -95,7 +154,8 @@ series: extend_to: now group_by: duration: 6h - color: rgb(242, 235, 36) + stroke_width: 3 + color: rgb(182, 24, 222) - entity: sensor.hourly_weather name: " " @@ -106,7 +166,25 @@ series: return entity.attributes.forecast.map((entry) => { return [new Date(entry.datetime).getTime(), entry.pressure]; }); - color: rgb(242, 235, 36) + stroke_width: 3 + color: rgb(182, 24, 222) + + - entity: sensor.outdoor_humidity + name: "Humidity" + yaxis_id: humidity + extend_to: now + opacity: 0.8 + color: rgb(76, 138, 252) + + - entity: sensor.hourly_weather + name: " " + yaxis_id: humidity + opacity: 0.8 + data_generator: | + return entity.attributes.forecast.map((entry) => { + return [new Date(entry.datetime).getTime(), entry.humidity]; + }); + color: rgb(76, 138, 252) - entity: sensor.cloud_coverage name: "Clouds" @@ -137,7 +215,7 @@ series: show: legend_value: false stroke_width: 0 - color: rgb(20, 20, 20) + color: rgb(150, 150, 150) color_threshold: !include /config/ui/graph/include/cloud_cover_area_color.yaml - entity: sensor.hourly_weather @@ -149,13 +227,22 @@ series: return [new Date(entry.datetime).getTime(), entry.cloud_coverage]; }); stroke_width: 0 - color: rgb(20, 20, 20) + color: rgb(150, 150, 150) color_threshold: !include /config/ui/graph/include/cloud_cover_area_color.yaml - - entity: sensor.ozone + - entity: sensor.ozone_level name: "Ozone" + yaxis_id: ozone + extend_to: now + stroke_width: 1 + color: rgb(252, 152, 3) + + - entity: sensor.ozone_index #TEST + name: "Ozone Index" yaxis_id: aqi extend_to: now + stroke_width: 1 + color: rgb(14, 213, 227) - entity: sensor.uv_index name: "UV Index" @@ -182,7 +269,7 @@ series: show: legend_value: false stroke_width: 0 - color: rgb(20, 20, 20) + color: rgb(53, 117, 21) color_threshold: !include /config/ui/graph/include/uv_index_area_color.yaml - entity: sensor.hourly_weather @@ -196,5 +283,5 @@ series: show: legend_value: false stroke_width: 0 - color: rgb(20, 20, 20) + color: rgb(53, 117, 21) color_threshold: !include /config/ui/graph/include/uv_index_area_color.yaml diff --git a/ui/graph/weather/dewpoint_temperature.yaml b/ui/graph/weather/dew_point.yaml similarity index 75% rename from ui/graph/weather/dewpoint_temperature.yaml rename to ui/graph/weather/dew_point.yaml index 019fc216b..b2e742072 100644 --- a/ui/graph/weather/dewpoint_temperature.yaml +++ b/ui/graph/weather/dew_point.yaml @@ -1,5 +1,5 @@ ############################################################################### -## Dew Point Temperature Graph +## Dew Point Graph ############################################################################### type: custom:apexcharts-card config_templates: weather_mini @@ -14,11 +14,11 @@ series: show: in_header: raw header_color_threshold: true - color_threshold: !include /config/ui/graph/include/temperature_line_color.yaml + color_threshold: !include /config/ui/graph/include/dew_point_line_color.yaml header_actions: tap_action: action: navigate - navigation_path: outdoor-temperature + navigation_path: atmospheric-conditions double_tap_action: action: more-info hold_action: @@ -31,4 +31,4 @@ series: show: in_header: false stroke_width: 0 - color_threshold: !include /config/ui/graph/include/temperature_area_color.yaml + color_threshold: !include /config/ui/graph/include/dew_point_area_color.yaml diff --git a/ui/graph/weather/humidity.yaml b/ui/graph/weather/humidity.yaml index 313ff2933..5eb9a3144 100644 --- a/ui/graph/weather/humidity.yaml +++ b/ui/graph/weather/humidity.yaml @@ -20,7 +20,7 @@ series: header_actions: tap_action: action: navigate - navigation_path: outdoor-temperature + navigation_path: atmospheric-conditions double_tap_action: action: more-info hold_action: diff --git a/ui/graph/weather/precipitation_accumulation.yaml b/ui/graph/weather/precipitation_accumulation.yaml index 5311e0471..338557c26 100644 --- a/ui/graph/weather/precipitation_accumulation.yaml +++ b/ui/graph/weather/precipitation_accumulation.yaml @@ -33,7 +33,7 @@ series: action: navigate navigation_path: rain-radar - - entity: sensor.snow_accumulation_last_hour + - entity: sensor.ice_accumulation_last_24_hours yaxis_id: accumulation type: column group_by: @@ -43,9 +43,9 @@ series: show: in_header: false stroke_width: 3 - color: rgb(27, 147, 227) + color: rgb(120, 48, 116) - - entity: sensor.ice_accumulation_last_hour + - entity: sensor.snow_accumulation_last_24_hours yaxis_id: accumulation type: column group_by: @@ -55,9 +55,9 @@ series: show: in_header: false stroke_width: 3 - color: rgb(120, 48, 116) + color: rgb(27, 147, 227) - - entity: sensor.rain_accumulation_last_hour + - entity: sensor.rain_accumulation_last_24_hours yaxis_id: accumulation type: column group_by: @@ -67,4 +67,5 @@ series: show: in_header: false stroke_width: 3 - color: rgb(15, 45, 191) \ No newline at end of file + color: rgb(15, 45, 191) + diff --git a/ui/graph/weather/precipitation_detail.yaml b/ui/graph/weather/precipitation_detail.yaml index f34bad450..f6ae2d539 100644 --- a/ui/graph/weather/precipitation_detail.yaml +++ b/ui/graph/weather/precipitation_detail.yaml @@ -84,28 +84,6 @@ yaxis: tickAmount: 5 decimalsInFloat: 0 series: - - entity: sensor.barometric_pressure - name: "Pressure" - yaxis_id: pressure - extend_to: now - group_by: - duration: 6h - float_precision: 0 - stroke_width: 2 - color: rgb(242, 235, 36) - - - entity: sensor.hourly_weather - name: "Pressure Forecast" - yaxis_id: pressure - group_by: - duration: 6h - data_generator: | - return entity.attributes.forecast.map((entry) => { - return [new Date(entry.datetime).getTime(), entry.pressure]; - }); - stroke_width: 2 - color: rgb(242, 235, 36) - - entity: sensor.cloud_coverage name: "Clouds" yaxis_id: clouds @@ -189,6 +167,47 @@ series: color: rgb(20, 20, 20) color_threshold: !include /config/ui/graph/include/precipitation_probability_area_color.yaml + - entity: sensor.barometric_pressure + name: "Pressure" + yaxis_id: pressure + extend_to: now + group_by: + duration: 6h + float_precision: 0 + stroke_width: 2 + color: rgb(242, 235, 36) + + - entity: sensor.hourly_weather + name: "Pressure Forecast" + yaxis_id: pressure + group_by: + duration: 6h + data_generator: | + return entity.attributes.forecast.map((entry) => { + return [new Date(entry.datetime).getTime(), entry.pressure]; + }); + stroke_width: 2 + color: rgb(242, 235, 36) + + - entity: sensor.precipitation_intensity + name: "Rate" + yaxis_id: precip_rate + type: line + float_precision: 3 + extend_to: now + stroke_width: 1 + color_threshold: !include /config/ui/graph/include/precipitation_rate_line_color.yaml + + - entity: sensor.precipitation_intensity + name: " " + yaxis_id: precip_rate + type: area + float_precision: 3 + extend_to: now + stroke_width: 0 + color: rgb(20, 20, 20) + color_threshold: !include /config/ui/graph/include/precipitation_rate_area_color.yaml + - entity: sensor.rain_accumulation_today name: "Rain" yaxis_id: precip @@ -201,68 +220,55 @@ series: show: datalabels: true stroke_width: 5 + opacity: 0.7 color: rgb(15, 45, 191) - - entity: sensor.daily_weather - name: "Expected" + - entity: sensor.snow_accumulation_today + name: "Snow" yaxis_id: precip type: column float_precision: 1 + extend_to: now + offset: +1h # template resets just past midnight, offset to avoid duplicate values group_by: duration: 1d stack_group: precip - data_generator: | - return entity.attributes.forecast.map((entry) => { - return [new Date(entry.datetime).getTime(), entry.precipitation]; - }); show: datalabels: true stroke_width: 5 - color: rgb(49, 14, 115) + opacity: 0.7 + color: rgb(27, 147, 227) - - entity: sensor.snow_accumulation_today - name: "Snow" + - entity: sensor.ice_accumulation_today + name: "Ice Today" yaxis_id: precip type: column float_precision: 1 extend_to: now + offset: +1h # template resets just past midnight, offset to avoid duplicate values group_by: duration: 1d stack_group: precip show: datalabels: true stroke_width: 5 - color: rgb(27, 147, 227) + opacity: 0.7 + color: rgb(120, 48, 116) - - entity: sensor.ice_accumulation_today - name: "Ice Today" + - entity: sensor.daily_weather + name: "Expected" yaxis_id: precip type: column float_precision: 1 - extend_to: now group_by: duration: 1d stack_group: precip + data_generator: | + return entity.attributes.forecast.map((entry) => { + return [new Date(entry.datetime).getTime(), entry.precipitation]; + }); show: datalabels: true stroke_width: 5 - color: rgb(120, 48, 116) - - - entity: sensor.precipitation_intensity - name: "Rate" - yaxis_id: precip_rate - type: line - float_precision: 3 - extend_to: now - stroke_width: 1 - color_threshold: !include /config/ui/graph/include/precipitation_rate_line_color.yaml - - - entity: sensor.precipitation_intensity - name: " " - yaxis_id: precip_rate - type: area - float_precision: 3 - extend_to: now - stroke_width: 0 - color: rgb(20, 20, 20) - color_threshold: !include /config/ui/graph/include/precipitation_rate_area_color.yaml + opacity: 0.7 + color: rgb(49, 14, 115) \ No newline at end of file diff --git a/ui/graph/weather/temperature_detail.yaml b/ui/graph/weather/temperature_detail.yaml index b46a16a8b..32550d1a4 100644 --- a/ui/graph/weather/temperature_detail.yaml +++ b/ui/graph/weather/temperature_detail.yaml @@ -36,89 +36,12 @@ yaxis: style: fontSize: 16px fontWeight: normal - - - id: humidity - show: true - opposite: true - min: 0 - max: 100 - apex_config: - tickAmount: 5 - decimalsInFloat: 0 - title: - text: "Humidity" - rotate: -90 - style: - fontSize: 20px - fontFamily: Roboto - fontWeight: normal - labels: - style: - fontSize: 16px - fontWeight: normal - series: - - entity: sensor.outdoor_humidity - name: "Humidity" - yaxis_id: humidity - extend_to: now - opacity: 0.8 - color: rgb(76, 138, 252) - - - entity: sensor.hourly_weather - name: " " - yaxis_id: humidity - opacity: 0.8 - data_generator: | - return entity.attributes.forecast.map((entry) => { - return [new Date(entry.datetime).getTime(), entry.humidity]; - }); - color: rgb(76, 138, 252) - - - entity: sensor.dew_point - name: "Dewpoint" - yaxis_id: temperature - extend_to: now - opacity: 0.7 - color: rgb(0, 206, 51) - - - entity: sensor.hourly_weather - name: " " - yaxis_id: temperature - opacity: 0.7 - data_generator: | - return entity.attributes.forecast.map((entry) => { - return [new Date(entry.datetime).getTime(), entry.dew_point]; - }); - color: rgb(0, 206, 51) - - - entity: sensor.windsor_normal_high_temperature - name: "Normal High" - yaxis_id: temperature - opacity: 0.8 - color: rgb(186, 6, 6) - - - entity: sensor.windsor_normal_low_temperature - name: "Normal Low" - yaxis_id: temperature - opacity: 0.8 - color: rgb(12, 4, 179) - - - entity: sensor.outdoor_temperature_daily_average - name: "Average (24h)" - yaxis_id: temperature - extend_to: now - opacity: 0.8 - color: rgb(69, 237, 195) - group_by: - func: avg - duration: 24hr - - entity: sensor.outdoor_apparent_temperature name: "Feels Like" yaxis_id: temperature extend_to: now - color: rgb(168, 19, 158) + color: rgb(189, 6, 106) - entity: sensor.hourly_weather name: " " @@ -128,7 +51,7 @@ series: return entity.attributes.forecast.map((entry) => { return [new Date(entry.datetime).getTime(), entry.apparent_temperature]; }); - color: rgb(168, 19, 158) + color: rgb(189, 6, 106) - entity: sensor.outdoor_temperature name: "Temperature" @@ -148,7 +71,7 @@ series: return [new Date(entry.datetime).getTime(), entry.temperature]; }); stroke_width: 0 - color: rgb(20, 20, 20) + color: rgb(150, 150, 150) color_threshold: !include /config/ui/graph/include/temperature_area_color.yaml - entity: sensor.outdoor_temperature @@ -167,5 +90,48 @@ series: return [new Date(entry.datetime).getTime(), entry.temperature]; }); stroke_width: 4 - color: rgb(20, 20, 20) + color: rgb(150, 150, 150) color_threshold: !include /config/ui/graph/include/temperature_line_color.yaml + + - entity: sensor.outdoor_temperature_daily_average + name: "Average (24h)" + yaxis_id: temperature + extend_to: now + opacity: 0.8 + color: rgb(69, 237, 195) + group_by: + func: avg + duration: 24hr + + - entity: sensor.dew_point + name: "Dewpoint" + yaxis_id: temperature + extend_to: now + opacity: 0.7 + stroke_width: 3 + color: rgb(108, 2, 189) + + - entity: sensor.hourly_weather + name: " " + yaxis_id: temperature + opacity: 0.7 + data_generator: | + return entity.attributes.forecast.map((entry) => { + return [new Date(entry.datetime).getTime(), entry.dew_point]; + }); + stroke_width: 3 + color: rgb(108, 2, 189) + + - entity: sensor.windsor_normal_high_temperature + name: "Normal High" + yaxis_id: temperature + stroke_width: 4 + opacity: 0.5 + color: rgb(186, 6, 6) + + - entity: sensor.windsor_normal_low_temperature + name: "Normal Low" + yaxis_id: temperature + stroke_width: 4 + opacity: 0.5 + color: rgb(12, 4, 179) \ No newline at end of file diff --git a/ui/history/spa_climate.yaml b/ui/history/spa_climate.yaml index 5ffdad9af..93557244f 100644 --- a/ui/history/spa_climate.yaml +++ b/ui/history/spa_climate.yaml @@ -6,22 +6,22 @@ title: "Spa Climate" hours_to_show: 24 show_names: true entities: - - entity: climate.spa_climate + - entity: climate.spa name: "Thermostat" - - entity: binary_sensor.spa_filter1 + - entity: binary_sensor.spa_filter_cycle_1 name: "Filter 1" - - entity: binary_sensor.spa_filter2 + - entity: binary_sensor.spa_filter_cycle_2 name: "Filter 2" - - entity: fan.spa_pump1 + - entity: fan.spa_pump_1 name: "Pump 1" - - entity: fan.spa_pump2 + - entity: fan.spa_pump_2 name: "Pump 2" - - entity: fan.spa_pump3 + - entity: fan.spa_pump_3 name: "Pump 3" - entity: sensor.spa_temperature diff --git a/ui/history/weather/precipitation_today_comparison.yaml b/ui/history/weather/precipitation_today_comparison.yaml index 5ca09e3d3..4951a78ff 100644 --- a/ui/history/weather/precipitation_today_comparison.yaml +++ b/ui/history/weather/precipitation_today_comparison.yaml @@ -2,20 +2,26 @@ ## Precipitation Today History ############################################################################### type: history-graph -title: "Precipitation Today" #TEST +title: "Precipitation Today" hours_to_show: 168 show_names: true entities: - - entity: sensor.precipitation_expected_today - name: "Expected" - - entity: sensor.rain_accumulation_today - name: "Rain - P" + name: "Rain" + + - entity: sensor.snow_accumulation_today + name: "Snow" + + - entity: sensor.ice_accumulation_today + name: "Ice" - entity: sensor.precipitation_accumulation_today - name: "Precipitation - WF" + name: "Precipitation" + + - entity: sensor.precipitation_expected_today + name: "Expected" - - entity: sensor.home_sensors_precipitation_today + - entity: sensor.home_sensors_precipitation_today #TEST name: "WF Cloud" - entity: sensor.home_sensors_precipitation_today_checked @@ -23,15 +29,3 @@ entities: - entity: sensor.tempest_st_00057689_rain_today name: "WF Local" - - - entity: sensor.pirateweather_precip_accumulation_0d - name: "Pirate Precip" - - - entity: sensor.pirateweather_current_day_liquid_accumulation - name: "Pirate Rain" - - - entity: sensor.pirateweather_current_day_snow_accumulation - name: "Pirate Ice" - - - entity: sensor.pirateweather_current_day_ice_accumulation - name: "Pirate Snow" \ No newline at end of file diff --git a/ui/iframe/hass_status.yaml b/ui/iframe/hass_status.yaml new file mode 100644 index 000000000..96196f6f7 --- /dev/null +++ b/ui/iframe/hass_status.yaml @@ -0,0 +1,6 @@ +############################################################################### +## HASS Status I-Frame +############################################################################### +type: iframe +aspect_ratio: 100% +url: "https://status.home-assistant.io/#" diff --git a/ui/iframe/humidity_map.yaml b/ui/iframe/humidity_map.yaml new file mode 100644 index 000000000..bae5f8ad2 --- /dev/null +++ b/ui/iframe/humidity_map.yaml @@ -0,0 +1,6 @@ +############################################################################### +## Humidity Map I-Frame +############################################################################### +type: iframe +aspect_ratio: 100% +url: !secret HUMIDITY_MAP_EMBED diff --git a/ui/iframe/lightning.yaml b/ui/iframe/lightning.yaml new file mode 100644 index 000000000..26aec1d9b --- /dev/null +++ b/ui/iframe/lightning.yaml @@ -0,0 +1,6 @@ +############################################################################### +## Allergy I-Frame +############################################################################### +type: iframe +aspect_ratio: 100% +url: !secret BLITZ_LIGHTNING \ No newline at end of file diff --git a/ui/iframe/pressure_map.yaml b/ui/iframe/pressure_map.yaml new file mode 100644 index 000000000..bdf8dcf2b --- /dev/null +++ b/ui/iframe/pressure_map.yaml @@ -0,0 +1,6 @@ +############################################################################### +## Pressure Map I-Frame +############################################################################### +type: iframe +aspect_ratio: 100% +url: !secret PRESSURE_MAP_EMBED diff --git a/ui/iframe/rain_radar.yaml b/ui/iframe/rain_radar.yaml new file mode 100644 index 000000000..78f8db8ff --- /dev/null +++ b/ui/iframe/rain_radar.yaml @@ -0,0 +1,6 @@ +############################################################################### +## Rain Radar I-Frame +############################################################################### +type: iframe +aspect_ratio: 100% +url: !secret RAIN_RADAR_EMBED diff --git a/ui/iframe/shelly.yaml b/ui/iframe/shelly.yaml new file mode 100644 index 000000000..887ced77d --- /dev/null +++ b/ui/iframe/shelly.yaml @@ -0,0 +1,6 @@ +############################################################################### +## Shelly I-Frame +############################################################################### +type: iframe +aspect_ratio: 100% +url: !secret SHELLY diff --git a/ui/iframe/storm_radar.yaml b/ui/iframe/storm_radar.yaml new file mode 100644 index 000000000..174e9700b --- /dev/null +++ b/ui/iframe/storm_radar.yaml @@ -0,0 +1,6 @@ +############################################################################### +## Storm Radar I-Frame +############################################################################### +type: iframe +aspect_ratio: 100% +url: !secret STORM_RADAR_EMBED diff --git a/ui/iframe/temperature_map.yaml b/ui/iframe/temperature_map.yaml new file mode 100644 index 000000000..aeeb6e2fb --- /dev/null +++ b/ui/iframe/temperature_map.yaml @@ -0,0 +1,6 @@ +############################################################################### +## Temperature Map I-Frame +############################################################################### +type: iframe +aspect_ratio: 100% +url: !secret TEMPERATURE_MAP_EMBED diff --git a/ui/card/schedule/traffic_map.yaml b/ui/iframe/traffic.yaml similarity index 92% rename from ui/card/schedule/traffic_map.yaml rename to ui/iframe/traffic.yaml index 8024b2e30..8df5ad626 100644 --- a/ui/card/schedule/traffic_map.yaml +++ b/ui/iframe/traffic.yaml @@ -1,5 +1,5 @@ ############################################################################### -## Traffic Map +## Traffic I-Frame ############################################################################### type: iframe aspect_ratio: 100% diff --git a/ui/iframe/ventusky_cloud_radar.yaml b/ui/iframe/ventusky_cloud_radar.yaml new file mode 100644 index 000000000..6ae8e454a --- /dev/null +++ b/ui/iframe/ventusky_cloud_radar.yaml @@ -0,0 +1,6 @@ +############################################################################### +## Ventusky Cloud Radar I-Frame +############################################################################### +type: iframe +aspect_ratio: 100% +url: !secret VENTUSKY_CLOUD_RADAR \ No newline at end of file diff --git a/ui/iframe/ventusky_satellite.yaml b/ui/iframe/ventusky_satellite.yaml new file mode 100644 index 000000000..74335dcea --- /dev/null +++ b/ui/iframe/ventusky_satellite.yaml @@ -0,0 +1,6 @@ +############################################################################### +## Ventusky Satellite I-Frame +############################################################################### +type: iframe +aspect_ratio: 100% +url: !secret VENTUSKY_SATELLITE \ No newline at end of file diff --git a/ui/iframe/waste_schedule.yaml b/ui/iframe/waste_schedule.yaml new file mode 100644 index 000000000..02e86b12c --- /dev/null +++ b/ui/iframe/waste_schedule.yaml @@ -0,0 +1,6 @@ +############################################################################### +## Waste Schedule I-Frame +############################################################################### +type: iframe +aspect_ratio: 100% +url: !secret WASTE_SCHEDULE diff --git a/ui/iframe/wind_map.yaml b/ui/iframe/wind_map.yaml new file mode 100644 index 000000000..11ef6615c --- /dev/null +++ b/ui/iframe/wind_map.yaml @@ -0,0 +1,6 @@ +############################################################################### +## Ventusky Satellite I-Frame +############################################################################### +type: iframe +aspect_ratio: 100% +url: !secret WIND_MAP_EMBED \ No newline at end of file diff --git a/ui/mass_play_media.yaml b/ui/mass_play_media.yaml index e5b50917e..fd92cc944 100644 --- a/ui/mass_play_media.yaml +++ b/ui/mass_play_media.yaml @@ -59,8 +59,11 @@ entities: row: entity: select.mass_radio - - entity: select.media_speaker_play + - entity: select.mass_media_player + name: "Media Player" + - entity: input_number.mass_volume + name: "Volume" - type: custom:fold-entity-row head: @@ -110,7 +113,10 @@ entities: entity: input_boolean.mass_radio state: "off" row: - entity: input_select.repeat_play + entity: input_select.mass_repeat_mode + + - entity: input_select.mass_enqueue_mode + name: "Enqueue Mode" - type: conditional conditions: @@ -132,10 +138,9 @@ entities: row: entity: input_boolean.mass_radio - - entity: input_select.enqueue_mode_play - - entity: button.mass_play_media name: "Play Media" + #NOTE places this update media button anywhere it is appropriate in your ui - entity: button.mass_update_media name: "Update Media" diff --git a/ui/menu/entities/system/disk_use_alert.yaml b/ui/menu/entities/system/disk_use_alert.yaml index 2da28a505..a5e2d192a 100644 --- a/ui/menu/entities/system/disk_use_alert.yaml +++ b/ui/menu/entities/system/disk_use_alert.yaml @@ -24,5 +24,5 @@ hold_action: entity_id: alert.disk_use card_mod: style: | - {% from 'style.jinja' import status_alert_style %} - {{ status_alert_style(states('sensor.disk_use_percent_home'), 0, 50, 60, 70, 80) }} + {% from 'style.jinja' import status_alert_color %} + {{ status_alert_color(states('sensor.disk_use_percent_home'), 0, 50, 60, 70, 80) }} diff --git a/ui/menu/entities/system/memory_use_alert.yaml b/ui/menu/entities/system/memory_use_alert.yaml index 1887c2291..642dfb63c 100644 --- a/ui/menu/entities/system/memory_use_alert.yaml +++ b/ui/menu/entities/system/memory_use_alert.yaml @@ -24,5 +24,5 @@ hold_action: entity_id: alert.memory_use card_mod: style: | - {% from 'style.jinja' import status_alert_style %} - {{ status_alert_style(states('sensor.memory_use_percent'), 0, 60, 70, 85, 95) }} + {% from 'style.jinja' import status_alert_color %} + {{ status_alert_color(states('sensor.memory_use_percent'), 0, 60, 70, 85, 95) }} diff --git a/ui/menu/entities/system/processor_temperature_alert.yaml b/ui/menu/entities/system/processor_temperature_alert.yaml index 09738615b..0cd2a2a3f 100644 --- a/ui/menu/entities/system/processor_temperature_alert.yaml +++ b/ui/menu/entities/system/processor_temperature_alert.yaml @@ -24,5 +24,5 @@ hold_action: entity_id: alert.processor_temperature card_mod: style: | - {% from 'style.jinja' import status_alert_style %} - {{ status_alert_style(states('sensor.processor_temperature'), 0, 50, 60, 70, 80) }} + {% from 'style.jinja' import status_alert_color %} + {{ status_alert_color(states('sensor.processor_temperature'), 0, 50, 60, 70, 80) }} diff --git a/ui/menu/entities/system/processor_use_alert.yaml b/ui/menu/entities/system/processor_use_alert.yaml index c136a6708..8ec12191e 100644 --- a/ui/menu/entities/system/processor_use_alert.yaml +++ b/ui/menu/entities/system/processor_use_alert.yaml @@ -24,5 +24,5 @@ hold_action: entity_id: alert.processor_use card_mod: style: | - {% from 'style.jinja' import status_alert_style %} - {{ status_alert_style(states('sensor.processor_use_percent'), 0, 45, 55, 65, 75) }} + {% from 'style.jinja' import status_alert_color %} + {{ status_alert_color(states('sensor.processor_use_percent'), 0, 45, 55, 65, 75) }} diff --git a/ui/menu/entities/system/swap_use_alert.yaml b/ui/menu/entities/system/swap_use_alert.yaml index 5d83ca7d8..a6fdb1d37 100644 --- a/ui/menu/entities/system/swap_use_alert.yaml +++ b/ui/menu/entities/system/swap_use_alert.yaml @@ -24,5 +24,5 @@ hold_action: entity_id: alert.swap_use card_mod: style: | - {% from 'style.jinja' import status_alert_style %} - {{ status_alert_style(states('sensor.swap_use_percent'), 0, 75, 85, 95, 99) }} + {% from 'style.jinja' import status_alert_color %} + {{ status_alert_color(states('sensor.swap_use_percent'), 0, 75, 85, 95, 99) }} diff --git a/ui/statistics_graph/air_quality.yaml b/ui/statistics_graph/air_quality.yaml new file mode 100644 index 000000000..7e4bd7ef8 --- /dev/null +++ b/ui/statistics_graph/air_quality.yaml @@ -0,0 +1,15 @@ +############################################################################### +## Air Quality Index +############################################################################### +type: statistics-graph +title: "Air Quality" +entities: + - entity: sensor.air_quality_index + name: "AQI" +days_to_show: 365 +period: week +chart_type: line +stat_types: + - mean + - max + - min \ No newline at end of file diff --git a/ui/statistics_graph/allergy.yaml b/ui/statistics_graph/allergy.yaml new file mode 100644 index 000000000..dbd0d9041 --- /dev/null +++ b/ui/statistics_graph/allergy.yaml @@ -0,0 +1,15 @@ +############################################################################### +## Allergy Index +############################################################################### +type: statistics-graph +title: "Allergy Index" +entities: + - entity: sensor.allergy_index_today + name: "Allergy Index" +days_to_show: 365 +period: week +chart_type: line +stat_types: + - mean + - max + - min \ No newline at end of file diff --git a/ui/statistics_graph/asthma.yaml b/ui/statistics_graph/asthma.yaml new file mode 100644 index 000000000..6062289b8 --- /dev/null +++ b/ui/statistics_graph/asthma.yaml @@ -0,0 +1,15 @@ +############################################################################### +## Asthma Index +############################################################################### +type: statistics-graph +title: "Asthma Index" +entities: + - entity: sensor.asthma_index_today + name: "Asthma Index" +days_to_show: 365 +period: week +chart_type: line +stat_types: + - mean + - max + - min \ No newline at end of file diff --git a/ui/statistics_graph/barometric_pressure.yaml b/ui/statistics_graph/barometric_pressure.yaml index 6b160a1de..797f96c03 100644 --- a/ui/statistics_graph/barometric_pressure.yaml +++ b/ui/statistics_graph/barometric_pressure.yaml @@ -4,7 +4,8 @@ type: statistics-graph title: "Barometric Pressure" entities: - - sensor.barometric_pressure + - entity: sensor.barometric_pressure + name: "Barometric Pressure" days_to_show: 365 period: week chart_type: line diff --git a/ui/statistics_graph/cloud_cover.yaml b/ui/statistics_graph/cloud_cover.yaml index d5f00a1f1..8f7da9e45 100644 --- a/ui/statistics_graph/cloud_cover.yaml +++ b/ui/statistics_graph/cloud_cover.yaml @@ -4,7 +4,8 @@ type: statistics-graph title: "Cloud Coverage" entities: - - sensor.cloud_coverage + - entity: sensor.cloud_coverage + name: "Cloud Coveage" days_to_show: 365 period: week chart_type: line diff --git a/ui/statistics_graph/daily_precipitation.yaml b/ui/statistics_graph/daily_precipitation.yaml index d1521a1ea..1b5e2ab93 100644 --- a/ui/statistics_graph/daily_precipitation.yaml +++ b/ui/statistics_graph/daily_precipitation.yaml @@ -11,7 +11,7 @@ entities: - entity: sensor.ice_accumulation_today name: "Ice" days_to_show: 365 -period: day +period: week chart_type: bar stat_types: - max diff --git a/ui/statistics_graph/dew_point.yaml b/ui/statistics_graph/dew_point.yaml new file mode 100644 index 000000000..002e3493f --- /dev/null +++ b/ui/statistics_graph/dew_point.yaml @@ -0,0 +1,15 @@ +############################################################################### +## Dew Point +############################################################################### +type: statistics-graph +title: "Dew Point" +entities: + - entity: sensor.dew_point + name: "Dew Point" +days_to_show: 365 +period: week +chart_type: line +stat_types: + - mean + - max + - min diff --git a/ui/statistics_graph/fire_index.yaml b/ui/statistics_graph/fire_index.yaml new file mode 100644 index 000000000..70430a98d --- /dev/null +++ b/ui/statistics_graph/fire_index.yaml @@ -0,0 +1,15 @@ +############################################################################### +## Fire Index +############################################################################### +type: statistics-graph +title: "Fire Index" +entities: + - entity: sensor.fire_index + name: "Fire Index" +days_to_show: 365 +period: week +chart_type: line +stat_types: + - mean + - max + - min diff --git a/ui/statistics_graph/flu.yaml b/ui/statistics_graph/flu.yaml new file mode 100644 index 000000000..d54bc8a5b --- /dev/null +++ b/ui/statistics_graph/flu.yaml @@ -0,0 +1,15 @@ +############################################################################### +## Flu Index +############################################################################### +type: statistics-graph +title: "Flu Index" +entities: + - entity: sensor.cold_flu_index_today + name: "Cold & Flu Index" +days_to_show: 365 +period: week +chart_type: line +stat_types: + - mean + - max + - min \ No newline at end of file diff --git a/ui/statistics_graph/hvac_runtime.yaml b/ui/statistics_graph/hvac_runtime.yaml index c8969f83b..b1f4509c4 100644 --- a/ui/statistics_graph/hvac_runtime.yaml +++ b/ui/statistics_graph/hvac_runtime.yaml @@ -9,7 +9,7 @@ entities: - entity: sensor.thermostat_heat_daily_runtime name: "Heat" days_to_show: 365 -period: day +period: week chart_type: bar stat_types: - max diff --git a/ui/statistics_graph/lightning.yaml b/ui/statistics_graph/lightning.yaml new file mode 100644 index 000000000..3e8909086 --- /dev/null +++ b/ui/statistics_graph/lightning.yaml @@ -0,0 +1,13 @@ +############################################################################### +## Lightning +############################################################################### +type: statistics-graph +title: "Lightning" +entities: + - entity: sensor.lightning_count + name: "Lightning" +days_to_show: 365 +period: week +chart_type: line +stat_types: + - max diff --git a/ui/statistics_graph/outdoor_average_temperature.yaml b/ui/statistics_graph/outdoor_average_temperature.yaml new file mode 100644 index 000000000..872e92596 --- /dev/null +++ b/ui/statistics_graph/outdoor_average_temperature.yaml @@ -0,0 +1,15 @@ +############################################################################### +## Outdoor Average Temperature Statistics Graph +############################################################################### +type: statistics-graph +title: "Average Temperature" +entities: + - entity: sensor.outdoor_temperature_daily_average + name: "Temperature" +days_to_show: 365 +period: week +chart_type: line +stat_types: + - max + - min + - mean diff --git a/ui/statistics_graph/smoke_level.yaml b/ui/statistics_graph/smoke_level.yaml new file mode 100644 index 000000000..6d38b8be3 --- /dev/null +++ b/ui/statistics_graph/smoke_level.yaml @@ -0,0 +1,15 @@ +############################################################################### +## Smoke Level +############################################################################### +type: statistics-graph +title: "Smoke Level" +entities: + - entity: sensor.atmospheric_smoke + name: "Smoke" +days_to_show: 365 +period: week +chart_type: line +stat_types: + - mean + - max + - min diff --git a/ui/statistics_graph/uv_index.yaml b/ui/statistics_graph/uv_index.yaml new file mode 100644 index 000000000..7b92fb902 --- /dev/null +++ b/ui/statistics_graph/uv_index.yaml @@ -0,0 +1,15 @@ +############################################################################### +## UV Index +############################################################################### +type: statistics-graph +title: "UV Index" +entities: + - entity: sensor.uv_index_today + name: "UV Index" +days_to_show: 365 +period: week +chart_type: line +stat_types: + - mean + - max + - min