From 012f5e4e83c663df2eaa75be8e2af206d8ef27c1 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Sat, 11 Apr 2026 02:24:37 -0400 Subject: [PATCH] Add window weather functionality to dashboards --- admin_dashboard.yaml | 4 +++ main_dashboard.yaml | 67 +++++++++++++++++++++++++++++++++++++++++++ mobile_dashboard.yaml | 38 ++++++++++++++++++++++++ 3 files changed, 109 insertions(+) diff --git a/admin_dashboard.yaml b/admin_dashboard.yaml index 29bbd02..a4cbd28 100644 --- a/admin_dashboard.yaml +++ b/admin_dashboard.yaml @@ -1057,6 +1057,10 @@ views: | int %} {% set high = states('sensor.stratton_ave_apparent_temperature') | int %} {{ 'Threshold Met' if high <= threshold else '' }} + - entity: input_number.window_weather_minimum + name: Window Minimum + - entity: input_number.window_weather_maximum + name: Window Maximum show_header_toggle: false state_color: true title: Weather diff --git a/main_dashboard.yaml b/main_dashboard.yaml index 35d97a9..db30908 100644 --- a/main_dashboard.yaml +++ b/main_dashboard.yaml @@ -430,6 +430,73 @@ views: entity: binary_sensor.lightning_warning state: 'on' features_position: bottom + - type: custom:mushroom-template-card + primary: Window Weather + tap_action: + action: none + icon_tap_action: + action: none + features_position: bottom + entity: binary_sensor.window_weather + icon: |- + {% if is_state('binary_sensor.windows','on') %} + mdi:window-open + {% else %} + mdi:window-closed + {% endif %} + color: |- + {% if is_state(entity,'on') %} + {% if is_state('binary_sensor.windows','on') %} + var(--cyan-color) + {% else %} + var(--green-color) + {% endif %} + {% else %} + {% if is_state('binary_sensor.windows','on') %} + var(--error-color) + {% else %} + var(--disabled-color) + {% endif %} + {% endif %} + secondary: |- + {% if is_state(entity,'on') %} + It's nice outside! + {% else %} + Close Windows! + {% endif %} + badge_icon: >- + {% if is_state(entity,'off') and + is_state('binary_sensor.windows','on') %} + + mdi:exclamation + + {% elif is_state(entity,'on') and + is_state('binary_sensor.windows','on') %} + + mdi:check + + {% endif %} + badge_color: >- + {% if is_state(entity,'off') and + is_state('binary_sensor.windows','on') %} + + var(--error-color) + + {% elif is_state(entity,'on') and + is_state('binary_sensor.windows','on') %} + + var(--success-color) + + {% endif %} + visibility: + - condition: or + conditions: + - condition: state + entity: binary_sensor.window_weather + state: 'on' + - condition: state + entity: binary_sensor.windows + state: 'on' column_span: 1 - type: grid cards: diff --git a/mobile_dashboard.yaml b/mobile_dashboard.yaml index 1828dce..5866eee 100644 --- a/mobile_dashboard.yaml +++ b/mobile_dashboard.yaml @@ -4276,6 +4276,44 @@ views: - condition: state entity: binary_sensor.windows state: 'on' + - type: custom:mushroom-template-badge + content: |- + {% if is_state(entity,'on') %} + It's nice outside! + {% else %} + Close Windows! + {% endif %} + icon: |- + {% if is_state('binary_sensor.windows','on') %} + mdi:window-open + {% else %} + mdi:window-closed + {% endif %} + color: |- + {% if is_state(entity,'on') %} + {% if is_state('binary_sensor.windows','on') %} + var(--cyan-color) + {% else %} + var(--green-color) + {% endif %} + {% else %} + {% if is_state('binary_sensor.windows','on') %} + var(--error-color) + {% else %} + var(--disabled-color) + {% endif %} + {% endif %} + entity: binary_sensor.window_weather + label: Window Weather + visibility: + - condition: or + conditions: + - condition: state + entity: binary_sensor.window_weather + state: 'on' + - condition: state + entity: binary_sensor.windows + state: 'on' - type: custom:mushroom-template-badge content: Check light switches icon: mdi:light-switch