diff --git a/dashboards/views/01_home.yaml b/dashboards/views/01_home.yaml index a27b971..a1bfb23 100644 --- a/dashboards/views/01_home.yaml +++ b/dashboards/views/01_home.yaml @@ -515,9 +515,9 @@ cards: - border: 1px solid rgba(255, 200, 0, 0.8) tap_action: action: call-service - service: lawn_mower.dock + service: script.turn_on target: - entity_id: lawn_mower.husqvarna_automower + entity_id: script.ploeneklipper_manuelt_stop # 💡 Lys kontrol - type: horizontal-stack @@ -542,17 +542,62 @@ cards: action: more-info show_state: true - - type: tile - entity: binary_sensor.garageport + - type: custom:button-card + entity: cover.anne name: Garage - features_position: bottom - vertical: false + show_name: true + show_state: false + show_label: true + label: > + [[[ + const s = entity.state; + if (s === 'opening') return 'Åbner...'; + if (s === 'closing') return 'Lukker...'; + if (s === 'open') return 'Åben'; + return 'Lukket'; + ]]] + icon: > + [[[ + const s = entity.state; + if (s === 'open' || s === 'opening') return 'mdi:garage-open-variant'; + return 'mdi:garage-variant'; + ]]] + extra_styles: | + @keyframes garage-pulse { + 0% { opacity: 1; transform: scale(1); } + 50% { opacity: 0.55; transform: scale(1.04); } + 100% { opacity: 1; transform: scale(1); } + } + styles: + card: + - animation: > + [[[ + const s = entity.state; + return (s === 'opening' || s === 'closing') + ? 'garage-pulse 0.8s ease-in-out infinite' + : 'none'; + ]]] + icon: + - color: > + [[[ + const s = entity.state; + if (s === 'open') return 'orange'; + if (s === 'opening' || s === 'closing') return 'dodgerblue'; + return 'var(--primary-text-color)'; + ]]] + label: + - font-size: 11px + - color: > + [[[ + const s = entity.state; + if (s === 'opening' || s === 'closing') return 'dodgerblue'; + return 'var(--secondary-text-color)'; + ]]] tap_action: action: call-service service: cover.toggle target: entity_id: cover.anne - show_state: true # 🎵 Sonos - type: grid diff --git a/include/automations/alarms.yaml b/include/automations/alarms.yaml index c1cd4f0..311aed6 100644 --- a/include/automations/alarms.yaml +++ b/include/automations/alarms.yaml @@ -214,31 +214,3 @@ - service: homeassistant.turn_off entity_id: switch.sonos_alarm_298 - - alias: 'Turn on alarms Badeværelse Afsted' - trigger: - platform: time - at: '20:07:10' - condition: - - condition: state - entity_id: binary_sensor.arbejdsdagimorgen - state: 'on' - - condition: template - value_template: >- - {{ not is_state('input_select.anne_status', 'syg') and - not is_state('input_select.claus_status', 'syg') }} - action: - - service: homeassistant.turn_on - entity_id: switch.sonos_alarm_1899 - - - - alias: 'Turn off alarms Badeværelse Afsted' - trigger: - platform: time - at: '20:06:20' - condition: - - condition: state - entity_id: binary_sensor.arbejdsdagimorgen - state: 'off' - action: - - service: homeassistant.turn_off - entity_id: switch.sonos_alarm_1899 diff --git a/include/automations/andreas_kommer_hjem_taend_lys.yaml b/include/automations/andreas_kommer_hjem_taend_lys.yaml index 9bfe61e..9d7d6b0 100644 --- a/include/automations/andreas_kommer_hjem_taend_lys.yaml +++ b/include/automations/andreas_kommer_hjem_taend_lys.yaml @@ -29,10 +29,13 @@ action: - variables: - lights: - - light.indkorsel_2 - - light.extended_color_light_1 - - light.garage + lights: > + {% set base = ['light.indkorsel_2', 'light.garage'] %} + {% if now().isocalendar()[1] >= 42 or now().isocalendar()[1] <= 8 %} + {{ (base + ['light.extended_color_light_1']) | list }} + {% else %} + {{ base }} + {% endif %} lights_to_turn_on: > {{ lights | select('is_state','off') | list }} diff --git a/include/automations/lysvedgarage.yaml b/include/automations/lysvedgarage.yaml index bcb0279..60d229c 100644 --- a/include/automations/lysvedgarage.yaml +++ b/include/automations/lysvedgarage.yaml @@ -19,7 +19,10 @@ entity_id: - light.drivhus - light.paradis - - light.extended_color_light_1 + - condition: template + value_template: "{{ now().isocalendar()[1] >= 42 or now().isocalendar()[1] <= 8 }}" + - service: homeassistant.turn_on + entity_id: light.extended_color_light_1 - alias: 'Sluk lys ved garage' trigger: @@ -29,12 +32,15 @@ for: minutes: 10 action: - service: homeassistant.turn_off - data: - entity_id: - - light.drivhus - - light.paradis - - light.extended_color_light_1 + - service: homeassistant.turn_off + data: + entity_id: + - light.drivhus + - light.paradis + - condition: template + value_template: "{{ now().isocalendar()[1] >= 42 or now().isocalendar()[1] <= 8 }}" + - service: homeassistant.turn_off + entity_id: light.extended_color_light_1 diff --git a/include/automations/syg.yaml b/include/automations/syg.yaml index 8a7000a..fa9a60b 100644 --- a/include/automations/syg.yaml +++ b/include/automations/syg.yaml @@ -61,7 +61,6 @@ entity_id: - switch.sonos_alarm_1782 # Soft wakeup - switch.sonos_alarm_298 # Badeværelse - - switch.sonos_alarm_1899 # Badeværelse afsted - alias: "Syg - Soveværelse - genaktiver alarmer" id: syg_sovevaerelse_genaktiver_alarmer