Vanding: forsiderække med sidst vandet, smart-knap, liter og tid pr. bed; kapillær default 6

This commit is contained in:
2026-06-20 18:38:06 +02:00
parent 94d94a7d40
commit 9c5da39bf5
7 changed files with 264 additions and 2 deletions
+104 -1
View File
@@ -463,7 +463,110 @@ cards:
target:
entity_id: lawn_mower.husqvarna_automower
# 💡 Lys kontrol
# Vanding
- type: horizontal-stack
cards:
- type: custom:button-card
entity: sensor.vanding_sidst_vandet_compact
show_icon: false
show_name: true
show_state: true
name: Sidst vandet
tap_action:
action: none
hold_action:
action: none
styles:
card:
- padding: 8px
name:
- font-size: 11px
- color: var(--secondary-text-color)
- padding-bottom: 4px
state:
- white-space: normal
- word-break: break-word
- line-height: 1.2
- font-size: 13px
- text-align: center
- type: button
name: Smart vanding
icon: mdi:sprinkler-variant
entity: script.vanding_hojbed_skiftevis
tap_action:
action: toggle
- type: custom:button-card
entity: sensor.vanding_liter_i_dag_total
icon: mdi:water
show_icon: true
show_name: true
show_state: true
name: Liter i dag
tap_action:
action: none
hold_action:
action: none
custom_fields:
breakdown: |
[[[
const n = (id) => { const s = states[id]; return s ? Math.round(parseFloat(s.state) || 0) : 0; };
return `Ærter ${n('sensor.vanding_liter_hb1')} · Kart. ${n('sensor.vanding_liter_hb2')} · Rab. ${n('sensor.vanding_liter_hb3')}`
+ `<br>Drivhus ${n('sensor.vanding_liter_drivhus')} · Kapillær ${n('sensor.vanding_liter_kapillaer')}`;
]]]
styles:
card:
- padding: 8px
name:
- font-size: 11px
- color: var(--secondary-text-color)
state:
- font-size: 15px
- font-weight: bold
custom_fields:
breakdown:
- font-size: 9px
- color: var(--secondary-text-color)
- padding-top: 3px
- line-height: 1.3
- type: custom:button-card
entity: sensor.vanding_tid_i_dag_total
icon: mdi:timer-sand
show_icon: true
show_name: true
show_state: true
name: Tid i dag
tap_action:
action: none
hold_action:
action: none
custom_fields:
breakdown: |
[[[
const m = (id) => { const s = states[id]; return s ? Math.round((parseFloat(s.state) || 0) * 60) : 0; };
const cap = () => { const s = states['sensor.vanding_kapillaer_tid_i_dag']; return s ? Math.round(parseFloat(s.state) || 0) : 0; };
return `Ærter ${m('sensor.vanding_hojbed_1_i_dag')} · Kart. ${m('sensor.vanding_hojbed_2_i_dag')} · Rab. ${m('sensor.vanding_hojbed_3_i_dag')}`
+ `<br>Drivhus ${m('sensor.vanding_drivhus_i_dag')} · Kapillær ${cap()}`;
]]]
styles:
card:
- padding: 8px
name:
- font-size: 11px
- color: var(--secondary-text-color)
state:
- font-size: 15px
- font-weight: bold
custom_fields:
breakdown:
- font-size: 9px
- color: var(--secondary-text-color)
- padding-top: 3px
- line-height: 1.3
# 💡 Lys kontrol
- type: horizontal-stack
cards:
- type: tile