Compare commits

...

2 Commits

Author SHA1 Message Date
claus cd6643cd35 Fix Tesla smart charging hysteresis 2026-04-06 13:01:06 +02:00
claus 57531a5a23 Refine dashboards and vacation automations 2026-04-06 12:59:42 +02:00
6 changed files with 111 additions and 105 deletions
-3
View File
@@ -1,3 +0,0 @@
views: !include_dir_list dashboards/views
+55 -35
View File
@@ -15,65 +15,93 @@ sections:
entity: media_player.stue
name: Sonos Stue
- type: media-control
entity: media_player.alrum
name: Sonos Alrum
- type: media-control
entity: media_player.denon_avr_x2300w
name: Denon AVR
- type: entities
title: Afspilningsinfo
entities:
- media_player.stue
- media_player.denon_avr_x2300w
# 💡 Lys
# 💡 Lys (kompakt + alle lys)
- type: grid
columns: 3
square: false
cards:
- type: heading
heading: Lys
- type: light
entity: light.stue
name: Stue Lys
- type: tile
entity: light.livingroom
name: Alle lys
icon: mdi:lightbulb-group
tap_action:
action: toggle
- type: light
entity: light.stue_spot
name: Spot
- type: tile
entity: light.raket
name: Raket
tap_action:
action: toggle
- type: light
entity: light.stue_lysekrone
name: Lysekrone
- type: tile
entity: light.spisebord
name: Spisebord
tap_action:
action: toggle
- type: light
entity: light.stue_indirekte
name: Indirekte
- type: tile
entity: light.syd
name: Syd
tap_action:
action: toggle
- type: tile
entity: light.panton
name: Panton
tap_action:
action: toggle
- type: tile
entity: light.pendle
name: Pendle
tap_action:
action: toggle
# 🪟 Gardiner
# 🪟 Gardiner (kompakt)
- type: grid
columns: 3
square: false
cards:
- type: heading
heading: Gardiner
- type: cover
- type: tile
entity: cover.alle_gardiner
name: Alle
icon: mdi:blinds
- type: tile
entity: cover.hojre
name: Højre
- type: cover
- type: tile
entity: cover.midt
name: Midt
- type: cover
- type: tile
entity: cover.syd
name: Syd
- type: cover
- type: tile
entity: cover.venstre
name: Venstre
- type: cover
- type: tile
entity: cover.terrasse_dor
name: Terrasse dør
name: Terrasse
# 🌡️ Temperatur
@@ -83,13 +111,5 @@ sections:
heading: Temperatur
- type: tile
entity: sensor.sovevaerelse_stue_temperatur
entity: sensor.stue_motion_temperatur
name: Temperatur
- type: tile
entity: sensor.sovevaerelse_stue_luftfugtighed
name: Luftfugtighed
- type: tile
entity: sensor.sovevaerelse_stue_carbon_dioxide
name: CO₂
+10 -17
View File
@@ -3,29 +3,26 @@
mode: restart
trigger:
# Kør hvert 5. min (responsiv)
- platform: time_pattern
minutes: "/5"
# Sikrer re-evaluering ved ny time
- platform: time_pattern
minutes: "0"
condition:
# Deadline gyldig
- condition: template
value_template: >
{% set deadline = states('input_datetime.tesla_charge_deadline') %}
{{ deadline not in ['unknown','unavailable',''] and as_timestamp(deadline) > as_timestamp(now()) }}
# Kun når bilen er tilsluttet
- condition: template
value_template: >
{{ states('binary_sensor.tesla_connected') == 'on' }}
- condition: state
entity_id: binary_sensor.tesla_connected
state: "on"
action:
- variables:
should_charge: "{{ states('binary_sensor.tesla_charge_now') == 'on' }}"
should_charge: "{{ is_state('binary_sensor.tesla_charge_now','on') }}"
currently_charging: "{{ is_state('switch.home_charging', 'on') }}"
last_start: "{{ states('input_datetime.tesla_last_start') }}"
last_start_ts: >
{% if last_start not in ['unknown','unavailable',''] %}
@@ -38,18 +35,16 @@
- choose:
# -------------------------
# START / CONTINUE CHARGING
# START CHARGING
# -------------------------
- conditions:
- condition: template
value_template: "{{ should_charge }}"
sequence:
# Hvis ikke allerede i gang → registrer start
- if:
- condition: template
value_template: >
{{ states('switch.home_charging') != 'on' }}
value_template: "{{ not currently_charging }}"
then:
- service: input_datetime.set_datetime
target:
entity_id: input_datetime.tesla_last_start
@@ -65,9 +60,7 @@
# -------------------------
- conditions:
- condition: template
value_template: >
{{ not should_charge and runtime > 3600 }}
value_template: "{{ currently_charging and not should_charge and runtime > 3600 }}"
sequence:
- service: switch.turn_off
target:
+6 -5
View File
@@ -1,9 +1,9 @@
alias: Vacation Mode - Stop ved slutdato
trigger:
- alias: Vacation Mode - Stop ved slutdato
trigger:
- platform: time_pattern
minutes: "/1"
condition:
condition:
- condition: state
entity_id: input_boolean.vacation_mode
state: "on"
@@ -14,7 +14,7 @@ condition:
{{ dt not in ['unknown','unavailable',''] and
now() >= as_datetime(dt) }}
action:
action:
- service: input_boolean.turn_off
target:
entity_id:
@@ -23,4 +23,5 @@ action:
- service: media_player.media_stop
target:
entity_id: media_player.kokken
entity_id:
- media_player.kokken
@@ -1,15 +1,16 @@
alias: Vacation Mode - Manuel stop
trigger:
- alias: Vacation Mode - Manuel stop
trigger:
- platform: state
entity_id: input_boolean.vacation_mode
to: "off"
action:
action:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.presence_simulation
entity_id:
- input_boolean.presence_simulation
- service: media_player.media_stop
target:
entity_id: media_player.kokken
entity_id:
- media_player.kokken
-6
View File
@@ -1,11 +1,5 @@
# ui-lovelace.yaml
# 1. Resources til custom cards
resources:
- url: /hacsfiles/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js
type: module
- url: /hacsfiles/button-card/button-card.js
type: module
# 2. Selve views