Vanding: rainbird.start_irrigation, duration sliders, toggle scripts, smart vanding med alternering og notifikation

This commit is contained in:
2026-05-24 18:00:09 +02:00
parent 644cb28e88
commit a49ed20d6b
13 changed files with 628 additions and 40 deletions
+265 -9
View File
@@ -33,19 +33,275 @@ cards:
name: I morgen
icon: mdi:briefcase-outline
# 👨‍👩‍👧‍👦 Familien
- type: glance
entities:
- entity: person.daniel_schusler_dethlefsen
# 👨‍👩‍👧‍👦 Familien tryk for at toggle syg/rask
- type: grid
columns: 4
square: false
cards:
- type: custom:button-card
entity: person.daniel_schusler_dethlefsen
name: Daniel
- entity: person.claus_dethlefsen
show_name: true
show_state: false
show_label: true
show_icon: false
show_entity_picture: true
label: >
[[[
const s = entity.state;
const sick = states['input_select.daniel_status'] &&
states['input_select.daniel_status'].state === 'syg';
const loc = s === 'home' ? 'Hjemme' : s === 'not_home' ? 'Ude' : s;
return sick ? loc + ' · Syg' : loc;
]]]
styles:
card:
- padding: 8px 4px
- border: >
[[[
return states['input_select.daniel_status'] &&
states['input_select.daniel_status'].state === 'syg'
? '2px solid rgba(220,50,50,0.8)' : '2px solid transparent';
]]]
- border-radius: 12px
entity_picture:
- width: 60px
- height: 60px
- border-radius: 50%
- object-fit: cover
- filter: >
[[[
return states['input_select.daniel_status'] &&
states['input_select.daniel_status'].state === 'syg'
? 'grayscale(100%)' : 'none';
]]]
name:
- font-size: 12px
- font-weight: 600
- padding-top: 6px
- color: >
[[[
return states['input_select.daniel_status'] &&
states['input_select.daniel_status'].state === 'syg'
? 'rgb(220,50,50)' : 'var(--primary-text-color)';
]]]
label:
- font-size: 10px
- color: var(--secondary-text-color)
- padding-bottom: 2px
tap_action:
action: call-service
service: input_select.select_option
service_data:
entity_id: input_select.daniel_status
option: >
[[[
return states['input_select.daniel_status'] &&
states['input_select.daniel_status'].state === 'syg'
? 'hjemme' : 'syg';
]]]
hold_action:
action: more-info
entity: person.daniel_schusler_dethlefsen
- type: custom:button-card
entity: person.claus_dethlefsen
name: Claus
- entity: person.anne_schusler_dethlefsen
show_name: true
show_state: false
show_label: true
show_icon: false
show_entity_picture: true
label: >
[[[
const s = entity.state;
const sick = states['input_select.claus_status'] &&
states['input_select.claus_status'].state === 'syg';
const loc = s === 'home' ? 'Hjemme' : s === 'not_home' ? 'Ude' : s;
return sick ? loc + ' · Syg' : loc;
]]]
styles:
card:
- padding: 8px 4px
- border: >
[[[
return states['input_select.claus_status'] &&
states['input_select.claus_status'].state === 'syg'
? '2px solid rgba(220,50,50,0.8)' : '2px solid transparent';
]]]
- border-radius: 12px
entity_picture:
- width: 60px
- height: 60px
- border-radius: 50%
- object-fit: cover
- filter: >
[[[
return states['input_select.claus_status'] &&
states['input_select.claus_status'].state === 'syg'
? 'grayscale(100%)' : 'none';
]]]
name:
- font-size: 12px
- font-weight: 600
- padding-top: 6px
- color: >
[[[
return states['input_select.claus_status'] &&
states['input_select.claus_status'].state === 'syg'
? 'rgb(220,50,50)' : 'var(--primary-text-color)';
]]]
label:
- font-size: 10px
- color: var(--secondary-text-color)
- padding-bottom: 2px
tap_action:
action: call-service
service: input_select.select_option
service_data:
entity_id: input_select.claus_status
option: >
[[[
return states['input_select.claus_status'] &&
states['input_select.claus_status'].state === 'syg'
? 'hjemme' : 'syg';
]]]
hold_action:
action: more-info
entity: person.claus_dethlefsen
- type: custom:button-card
entity: person.anne_schusler_dethlefsen
name: Anne
- entity: person.andreas_schusler_dethlefsen
show_name: true
show_state: false
show_label: true
show_icon: false
show_entity_picture: true
label: >
[[[
const s = entity.state;
const sick = states['input_select.anne_status'] &&
states['input_select.anne_status'].state === 'syg';
const loc = s === 'home' ? 'Hjemme' : s === 'not_home' ? 'Ude' : s;
return sick ? loc + ' · Syg' : loc;
]]]
styles:
card:
- padding: 8px 4px
- border: >
[[[
return states['input_select.anne_status'] &&
states['input_select.anne_status'].state === 'syg'
? '2px solid rgba(220,50,50,0.8)' : '2px solid transparent';
]]]
- border-radius: 12px
entity_picture:
- width: 60px
- height: 60px
- border-radius: 50%
- object-fit: cover
- filter: >
[[[
return states['input_select.anne_status'] &&
states['input_select.anne_status'].state === 'syg'
? 'grayscale(100%)' : 'none';
]]]
name:
- font-size: 12px
- font-weight: 600
- padding-top: 6px
- color: >
[[[
return states['input_select.anne_status'] &&
states['input_select.anne_status'].state === 'syg'
? 'rgb(220,50,50)' : 'var(--primary-text-color)';
]]]
label:
- font-size: 10px
- color: var(--secondary-text-color)
- padding-bottom: 2px
tap_action:
action: call-service
service: input_select.select_option
service_data:
entity_id: input_select.anne_status
option: >
[[[
return states['input_select.anne_status'] &&
states['input_select.anne_status'].state === 'syg'
? 'hjemme' : 'syg';
]]]
hold_action:
action: more-info
entity: person.anne_schusler_dethlefsen
- type: custom:button-card
entity: person.andreas_schusler_dethlefsen
name: Andreas
- entity: binary_sensor.family_presence
name: Familie
show_name: true
show_state: false
show_label: true
show_icon: false
show_entity_picture: true
label: >
[[[
const s = entity.state;
const sick = states['input_select.andreas_status'] &&
states['input_select.andreas_status'].state === 'syg';
const loc = s === 'home' ? 'Hjemme' : s === 'not_home' ? 'Ude' : s;
return sick ? loc + ' · Syg' : loc;
]]]
styles:
card:
- padding: 8px 4px
- border: >
[[[
return states['input_select.andreas_status'] &&
states['input_select.andreas_status'].state === 'syg'
? '2px solid rgba(220,50,50,0.8)' : '2px solid transparent';
]]]
- border-radius: 12px
entity_picture:
- width: 60px
- height: 60px
- border-radius: 50%
- object-fit: cover
- filter: >
[[[
return states['input_select.andreas_status'] &&
states['input_select.andreas_status'].state === 'syg'
? 'grayscale(100%)' : 'none';
]]]
name:
- font-size: 12px
- font-weight: 600
- padding-top: 6px
- color: >
[[[
return states['input_select.andreas_status'] &&
states['input_select.andreas_status'].state === 'syg'
? 'rgb(220,50,50)' : 'var(--primary-text-color)';
]]]
label:
- font-size: 10px
- color: var(--secondary-text-color)
- padding-bottom: 2px
tap_action:
action: call-service
service: input_select.select_option
service_data:
entity_id: input_select.andreas_status
option: >
[[[
return states['input_select.andreas_status'] &&
states['input_select.andreas_status'].state === 'syg'
? 'hjemme' : 'syg';
]]]
hold_action:
action: more-info
entity: person.andreas_schusler_dethlefsen
# 🪟 Gardiner
- type: grid
+80 -14
View File
@@ -161,30 +161,96 @@ sections:
entity: calendar.annes_vanding
name: Vandingsplan
# 📊 Vandingshistorik
- type: grid
cards:
- type: heading
heading: Vandingstid i dag (minutter)
icon: mdi:chart-bar
- type: entities
title: Vandingstid i dag
entities:
- entity: sensor.vanding_hojbed_1_i_dag
name: HB1 Ærter
- entity: sensor.vanding_hojbed_2_i_dag
name: HB2 Kartofler
- entity: sensor.vanding_hojbed_3_i_dag
name: HB3 Rabarber
- entity: sensor.vanding_drivhus_i_dag
name: Drivhus
# ▶️ Manuel start/stop
- type: grid
cards:
- type: heading
heading: Smart vanding manuel styring
icon: mdi:water-pump
- type: tile
entity: script.vanding_hojbed_skiftevis
name: Start smart vanding
icon: mdi:sprinkler-variant
tap_action:
action: toggle
- type: entities
title: Varighed pr. cyklus (smart)
entities:
- entity: input_number.vanding_varighed_smart
name: Minutter pr. cyklus
# 🌿 Zonekontrol
- type: grid
cards:
- type: heading
heading: Zoner manuel styring
heading: Zoner manuel styring med varighed
icon: mdi:water-pump
- type: tile
entity: switch.hojbed_1
name: Højbed 1 Ærter
icon: mdi:sprinkler
- type: vertical-stack
cards:
- type: entities
entities:
- entity: input_number.vanding_varighed_hojbed_1
name: Varighed HB1 Ærter
- type: tile
entity: switch.hojbed_2
name: Højbed 1 Ærter
icon: mdi:sprinkler
tap_action:
action: call-service
service: script.vanding_toggle_hojbed_1
- type: tile
entity: switch.hojbed_2
name: Højbed 2 Kartofler
icon: mdi:sprinkler
- type: vertical-stack
cards:
- type: entities
entities:
- entity: input_number.vanding_varighed_hojbed_2
name: Varighed HB2 Kartofler
- type: tile
entity: switch.hojbed_1
name: Højbed 2 Kartofler
icon: mdi:sprinkler
tap_action:
action: call-service
service: script.vanding_toggle_hojbed_2
- type: vertical-stack
cards:
- type: entities
entities:
- entity: input_number.vanding_varighed_hojbed_3
name: Varighed HB3 Rabarber
- type: tile
entity: switch.drivhus_drypvanding
name: Højbed 3 Rabarber
icon: mdi:sprinkler
tap_action:
action: call-service
service: script.vanding_toggle_hojbed_3
- type: tile
entity: switch.hojbed_3
name: Højbed 3 Rabarber
icon: mdi:sprinkler
- type: tile
entity: switch.drivhus_drypvanding
name: Drivhus
icon: mdi:greenhouse
+1 -1
View File
@@ -20,7 +20,7 @@ sections:
entities:
- entity: device_tracker.andreas_iphone_12
name: Andreas
- entity: device_tracker.daniels_iphone_7_3
- entity: device_tracker.daniels_iphone_17pro
name: Daniel
- entity: device_tracker.annes_iphone_xs_4
name: Anne