Netro watering dashboard #8
Replies: 10 comments 2 replies
-
Looks good already! As I use this integration more I'm coming up with more ideas - not being a lovelace card developer, I do most of my stuff with markdown cards - but I'll post my thoughts |
Beta Was this translation helpful? Give feedback.
-
Hi @kcofoni. Could you be so kind to please share the code of those beautiful cards? Thanks!! |
Beta Was this translation helpful? Give feedback.
-
Let's start with Watering Controler (as displayed above) (aka Contrôleur Pontaillac) type: entities
entities:
- entity: sensor.pontaillac_statut
type: custom:multiple-entity-row
name: Statut
show_state: true
state-color: true
styles:
width: 80px
text-align: center
border-style: dotted
border-color: LightSalmon
padding: 10px 5px 10px
hold_action:
action: more-info
double_tap_action:
action: more-info
tap_action:
action: call-service
service: netro_watering.refresh_data
service_data:
config_entry_id: 2dc0828a3d5491ee773f434506dfbe5b
confirmation: true
secondary_info: last-changed
entities:
- entity: switch.pontaillac_activer_desactiver
toggle: true
state-color: true
styles:
width: 70px
text-align: right
name: false
- entity: switch.pontaillac_start_stop_arrosage
toggle: true
styles:
width: 70px
text-align: left
name: false
card_mod:
style: |
:host {
--paper-item-icon-color:
{% if is_state('sensor.pontaillac_statut', 'online') %}
var(--info-color)
{% elif is_state('sensor.pontaillac_statut', 'standby') %}
var(--state-disabled-color)
{% elif is_state('sensor.pontaillac_statut', 'watering') %}
var(--state-active-color)
{% else %}
var(--state-unavailable-color)
{% endif %}
;
}
- entity: switch.pontaillac_start_stop_arrosage
type: custom:multiple-entity-row
name: Start/Stop
show_state: false
state_header: général
secondary_info: par zone
state-color: true
toggle: true
tap_action:
action: call-service
service: netro_watering.stop_watering
service_data:
entity_id: switch.puit_start_stop_arrosage
confirmation: true
entities:
- entity: switch.puit_start_stop_arrosage
toggle: true
styles:
width: 70px
name: Puit
- entity: switch.saule_pleureur_start_stop_arrosage
toggle: true
name: Saule
styles:
width: 70px
- entity: switch.lilas_des_indes_start_stop_arrosage
toggle: true
name: Lilas
styles:
width: 70px
card_mod:
style: |
:host {
--paper-item-icon-color:
{# si un des interruteurs est activé on met l'icône en évidence #}
{% if is_state('switch.puit_start_stop_arrosage', 'on')
or is_state('switch.lilas_des_indes_start_stop_arrosage', 'on')
or is_state('switch.saule_pleureur_start_stop_arrosage', 'on') %}
var(--primary-color)
{% else %}
var(--state-disabled-color)
{% endif %}
;
}
- type: section
- entity: binary_sensor.puit_arrosage_en_cours
type: custom:multiple-entity-row
name: Puit
show_state: false
state_header: null
state-color: true
secondary_info: zone 1
styles:
width: 70px
tap_action:
action: navigate
navigation_path: /dashboard-arrosage/humidite
entities:
- entity: sensor.puit_prevision_arrosage_debut
name: quand
state-color: true
format: relative
state-header: null
styles:
width: 110px
text-align: right
font-size: 90%
- entity: sensor.puit_prevision_arrosage_duree
name: durée
state-color: true
state-header: null
styles:
width: 50px
- entity: sensor.puit_humidite
name: humidité
state-color: true
styles:
width: 40px
card_mod:
style:
hui-generic-entity-row $: |
:host {
--paper-item-icon-color:
{% if is_state('binary_sensor.puit_arrosage_en_cours', 'on') %}
var(--state-active-color)
{% else %}
var(--state-disabled-color)
{% endif %}
;
--card-mod-icon:
{% if is_state('binary_sensor.puit_arrosage_en_cours', 'on') %}
mdi:valve-open
{% else %}
mdi:valve-closed
{% endif %}
;
}
state-badge {
animation:
{% if is_state('binary_sensor.puit_arrosage_en_cours', 'on') %}
blinker 2s ease infinite;
{% else %}
blinker 2s linear 0;
{% endif %}
;
}
@keyframes blinker {
0% {opacity: 0;}
40% {opacity: 0.5;}
100% {opacity: 1;}
}
- entity: binary_sensor.saule_pleureur_arrosage_en_cours
type: custom:multiple-entity-row
name: Saule pleureur
show_state: false
state_header: null
state-color: true
secondary_info: zone 2
styles:
width: px
tap_action:
action: navigate
navigation_path: /dashboard-arrosage/humidite
entities:
- entity: sensor.saule_pleureur_prevision_arrosage_debut
name: quand
state-color: true
format: relative
state-header: null
styles:
width: 110px
font-size: 90%
text-align: right
- entity: sensor.saule_pleureur_prevision_arrosage_duree
name: durée
state-color: true
state-header: null
styles:
width: 50px
- entity: sensor.saule_pleureur_humidite
name: humidité
state-color: true
styles:
width: 40px
card_mod:
style:
hui-generic-entity-row $: |
:host {
--paper-item-icon-color:
{% if is_state('binary_sensor.saule_pleureur_arrosage_en_cours', 'on') %}
var(--state-active-color)
{% else %}
var(--state-disabled-color)
{% endif %}
;
--card-mod-icon:
{% if is_state('binary_sensor.saule_pleureur_arrosage_en_cours', 'on') %}
mdi:valve-open
{% else %}
mdi:valve-closed
{% endif %}
;
}
state-badge {
animation:
{% if is_state('binary_sensor.saule_pleureur_arrosage_en_cours', 'on') %}
blinker 2s ease infinite;
{% else %}
blinker 2s linear 0;
{% endif %}
;
}
@keyframes blinker {
0% {opacity: 0;}
40% {opacity: 0.5;}
100% {opacity: 1;}
}
- entity: binary_sensor.lilas_des_indes_arrosage_en_cours
type: custom:multiple-entity-row
name: Lilas des indes
show_state: false
state_header: null
state-color: true
secondary_info: zone 3
styles:
width: px
tap_action:
action: navigate
navigation_path: /dashboard-arrosage/humidite
entities:
- entity: sensor.lilas_des_indes_prevision_arrosage_debut
name: quand
state-color: true
format: relative
state-header: null
styles:
width: 110px
font-size: 90%
text-align: right
- entity: sensor.lilas_des_indes_prevision_arrosage_duree
name: durée
state-color: true
state-header: null
styles:
width: 50px
- entity: sensor.lilas_des_indes_humidite
name: humdité
state-color: true
styles:
width: 40px
card_mod:
style:
hui-generic-entity-row $: |
:host {
--paper-item-icon-color:
{% if is_state('binary_sensor.lilas_des_indes_arrosage_en_cours', 'on') %}
var(--state-active-color)
{% else %}
var(--state-disabled-color)
{% endif %}
;
--card-mod-icon:
{% if is_state('binary_sensor.lilas_des_indes_arrosage_en_cours', 'on') %}
mdi:valve-open
{% else %}
mdi:valve-closed
{% endif %}
;
}
state-badge {
animation:
{% if is_state('binary_sensor.lilas_des_indes_arrosage_en_cours', 'on') %}
blinker 2s ease infinite;
{% else %}
blinker 2s linear 0;
{% endif %}
;
}
@keyframes blinker {
0% {opacity: 0;}
40% {opacity: 0.5;}
100% {opacity: 1;}
}
- type: section
- entity: sensor.pontaillac_jetons_restant
type: custom:multiple-entity-row
name: Jetons
show_state: true
state-color: true
secondary_info:
attribute: update interval
format: precision0
styles:
width: 70px
font-weight: bold
state_header: pontaillac
entities:
- entity: sensor.capteur_rosiers_jetons_restant
name: rosiers
styles:
width: 70px
- entity: sensor.capteur_hortensia_jetons_restant
name: hortensia
styles:
width: 70px
card_mod:
style: |
:host {
--paper-item-icon-color:
{% if states('sensor.pontaillac_jetons_restant') | int > 1500 %}
var(--success-color)
{% elif states('sensor.pontaillac_jetons_restant') | int > 800 %}
var(--info-color)
{% elif states('sensor.pontaillac_jetons_restant') | int > 250 %}
var(--warning-color)
{% else %}
var(--error-color)
{% endif %}
;
}
header:
type: picture
image: /local/garden/bandeau-jardin.png
tap_action:
action: none
hold_action:
action: none
title: Contrôleur Pontaillac
state_color: true
view_layout:
grid-area: pontaillac Some of the entities are not directly provided by the integration and has been obtained by calculating. There are put in the - sensor:
- name: Puit Prochain arrosage durée
unit_of_measurement: "mn"
state_class: measurement
device_class: duration
state: >
{% set start_time = states('sensor.puit_prochain_arrosage_debut') %}
{% set end_time = states('sensor.puit_prochain_arrosage_fin') %}
{% if start_time is not in ['unavailable', 'unknown', 'none'] %}
{{ ((as_datetime(end_time) - as_datetime(start_time)).seconds/60) | round(0) | int}}
{% else %}
0
{% endif %}
- name: Puit Dernier arrosage durée
unit_of_measurement: "mn"
state_class: measurement
device_class: duration
state: >
{% set start_time = states('sensor.puit_dernier_arrosage_debut') %}
{% set end_time = states('sensor.puit_dernier_arrosage_fin') %}
{% if start_time is not in ['unavailable', 'unknown', 'none'] %}
{{ ((as_datetime(end_time) - as_datetime(start_time)).seconds/60) | round(0) | int}}
{% else %}
0
{% endif %}
- name: Saule Pleureur Prochain arrosage durée
unit_of_measurement: "mn"
state_class: measurement
device_class: duration
state: >
{% set start_time = states('sensor.saule_pleureur_prochain_arrosage_debut') %}
{% set end_time = states('sensor.saule_pleureur_prochain_arrosage_fin') %}
{% if start_time is not in ['unavailable', 'unknown', 'none'] %}
{{ ((as_datetime(end_time) - as_datetime(start_time)).seconds/60) | round(0) | int}}
{% else %}
0
{% endif %}
- name: Saule Pleureur Dernier arrosage durée
unit_of_measurement: "mn"
state_class: measurement
device_class: duration
state: >
{% set start_time = states('sensor.saule_pleureur_dernier_arrosage_debut') %}
{% set end_time = states('sensor.saule_pleureur_dernier_arrosage_fin') %}
{% if start_time is not in ['unavailable', 'unknown', 'none'] %}
{{ ((as_datetime(end_time) - as_datetime(start_time)).seconds/60) | round(0) | int}}
{% else %}
0
{% endif %}
- name: Lilas des Indes Prochain arrosage durée
unit_of_measurement: "mn"
state_class: measurement
device_class: duration
state: >
{% set start_time = states('sensor.lilas_des_indes_prochain_arrosage_debut') %}
{% set end_time = states('sensor.lilas_des_indes_prochain_arrosage_fin') %}
{% if start_time is not in ['unavailable', 'unknown', 'none'] %}
{{ ((as_datetime(end_time) - as_datetime(start_time)).seconds/60) | round(0) | int}}
{% else %}
0
{% endif %}
- name: Lilas des Indes Dernier arrosage durée
unit_of_measurement: "mn"
state_class: measurement
device_class: duration
state: >
{% set start_time = states('sensor.lilas_des_indes_dernier_arrosage_debut') %}
{% set end_time = states('sensor.lilas_des_indes_dernier_arrosage_fin') %}
{% if start_time is not in ['unavailable', 'unknown', 'none'] %}
{{ ((as_datetime(end_time) - as_datetime(start_time)).seconds/60) | round(0) | int}}
{% else %}
0
{% endif %}
- sensor:
- name: Puit Prévision arrosage début
device_class: timestamp
state: >
{## si arrosage en cours sur la zone on retourne le début du dernier arrosage,
sinon celui du prochain ##}
{% if states('sensor.puit_dernier_arrosage_statut') == 'executing' %}
{{ states('sensor.puit_dernier_arrosage_debut') }}
{% else %}
{% if states('sensor.puit_prochain_arrosage_debut') is in ['unavailable', 'unknown', 'none'] %}
{% else %}
{{ states('sensor.puit_prochain_arrosage_debut') }}
{% endif %}
{% endif %}
- name: Puit Prévision arrosage fin
device_class: timestamp
state: >
{## si arrosage en cours sur la zone on retourne la fin du dernier arrosage,
sinon celle du prochain ##}
{% if states('sensor.puit_dernier_arrosage_statut') == 'executing' %}
{{ states('sensor.puit_dernier_arrosage_fin') }}
{% else %}
{% if states('sensor.puit_prochain_arrosage_fin') is in ['unavailable', 'unknown', 'none'] %}
{% else %}
{{ states('sensor.puit_prochain_arrosage_fin') }}
{% endif %}
{% endif %}
- name: Puit Prévision arrosage durée
device_class: duration
unit_of_measurement: "mn"
state_class: measurement
state: >
{## si arrosage en cours sur la zone on retourne la durée du dernier arrosage,
sinon celle du prochain ##}
{% if states('sensor.puit_dernier_arrosage_statut') == 'executing' %}
{{ states('sensor.puit_dernier_arrosage_duree') }}
{% else %}
{% if states('sensor.puit_prochain_arrosage_duree') is in ['unavailable', 'unknown', 'none'] %}
0
{% else %}
{{ states('sensor.puit_prochain_arrosage_duree') }}
{% endif %}
{% endif %}
- sensor:
- name: Saule Pleureur Prévision arrosage début
device_class: timestamp
state: >
{## si arrosage en cours sur la zone on retourne le début du dernier arrosage,
sinon celui du prochain ##}
{% if states('sensor.saule_pleureur_dernier_arrosage_statut') == 'executing' %}
{{ states('sensor.saule_pleureur_dernier_arrosage_debut') }}
{% else %}
{% if states('sensor.saule_pleureur_prochain_arrosage_debut') is in ['unavailable', 'unknown', 'none'] %}
{% else %}
{{ states('sensor.saule_pleureur_prochain_arrosage_debut') }}
{% endif %}
{% endif %}
- name: Saule Pleureur Prévision arrosage fin
device_class: timestamp
state: >
{## si arrosage en cours sur la zone on retourne la fin du dernier arrosage,
sinon celle du prochain ##}
{% if states('sensor.saule_pleureur_dernier_arrosage_statut') == 'executing' %}
{{ states('sensor.saule_pleureur_dernier_arrosage_fin') }}
{% else %}
{% if states('sensor.saule_pleureur_prochain_arrosage_fin') is in ['unavailable', 'unknown', 'none'] %}
{% else %}
{{ states('sensor.saule_pleureur_prochain_arrosage_fin') }}
{% endif %}
{% endif %}
- name: Saule Pleureur Prévision arrosage durée
device_class: duration
unit_of_measurement: "mn"
state_class: measurement
state: >
{## si arrosage en cours sur la zone on retourne la durée du dernier arrosage,
sinon celle du prochain ##}
{% if states('sensor.saule_pleureur_dernier_arrosage_statut') == 'executing' %}
{{ states('sensor.saule_pleureur_dernier_arrosage_duree') }}
{% else %}
{% if states('sensor.saule_pleureur_prochain_arrosage_duree') is in ['unavailable', 'unknown', 'none'] %}
0
{% else %}
{{ states('sensor.saule_pleureur_prochain_arrosage_duree') }}
{% endif %}
{% endif %}
- sensor:
- name: Lilas des Indes Prévision arrosage début
device_class: timestamp
state: >
{## si arrosage en cours sur la zone on retourne le début du dernier arrosage,
sinon celui du prochain ##}
{% if states('sensor.lilas_des_indes_dernier_arrosage_statut') == 'executing' %}
{{ states('sensor.lilas_des_indes_dernier_arrosage_debut') }}
{% else %}
{% if states('sensor.lilas_des_indes_prochain_arrosage_debut') is in ['unavailable', 'unknown', 'none'] %}
{% else %}
{{ states('sensor.lilas_des_indes_prochain_arrosage_debut') }}
{% endif %}
{% endif %}
- name: Lilas des Indes Prévision arrosage fin
device_class: timestamp
state: >
{## si arrosage en cours sur la zone on retourne la fin du dernier arrosage,
sinon celle du prochain ##}
{% if states('sensor.lilas_des_indes_dernier_arrosage_statut') == 'executing' %}
{{ states('sensor.lilas_des_indes_dernier_arrosage_fin') }}
{% else %}
{% if states('sensor.lilas_des_indes_prochain_arrosage_fin') is in ['unavailable', 'unknown', 'none'] %}
{% else %}
{{ states('sensor.lilas_des_indes_prochain_arrosage_fin') }}
{% endif %}
{% endif %}
- name: Lilas des Indes Prévision arrosage durée
device_class: duration
unit_of_measurement: "mn"
state_class: measurement
state: >
{## si arrosage en cours sur la zone on retourne la durée du dernier arrosage,
sinon celle du prochain ##}
{% if states('sensor.lilas_des_indes_dernier_arrosage_statut') == 'executing' %}
{{ states('sensor.lilas_des_indes_dernier_arrosage_duree') }}
{% else %}
{% if states('sensor.lilas_des_indes_prochain_arrosage_duree') is in ['unavailable', 'unknown', 'none'] %}
0
{% else %}
{{ states('sensor.lilas_des_indes_prochain_arrosage_duree') }}
{% endif %}
{% endif %} |
Beta Was this translation helpful? Give feedback.
-
Let's continue with Start/Stop Watering (aka as Arrêt/Démarrage de l'arrosage) type: vertical-stack
view_layout:
grid-area: action
place-self: end auto
cards:
- type: entities
entities:
- entity: input_number.duree_de_l_arrosage
name: Durée
icon: mdi:timelapse
- entity: input_number.retard_a_l_arrosage
name: Différé
icon: mdi:camera-timer
title: Arrêt/Démarrage de l'arrosage
state_color: false
header:
type: picture
image: /local/garden/bandeau-electro-vannes.png
tap_action:
action: none
hold_action:
action: none
- type: horizontal-stack
cards:
- type: custom:button-card
show_name: true
show_label: true
show_icon: true
show_state: true
haptic: success
label: |
[[[
try {
const now = new Date();
const now_seconds = Math.floor(now.getTime() / 1000);
const yesterday = new Date(); yesterday.setDate(yesterday.getDate() - 1);
const before_yesterday = new Date(); before_yesterday.setDate(before_yesterday.getDate() - 2);
const dda = states["binary_sensor.puit_arrosage_en_cours"].state == "on"
? new Date(states["sensor.puit_dernier_arrosage_debut"].state)
: new Date(states["sensor.puit_dernier_arrosage_fin"].state);
const dda_seconds = Math.floor(dda.getTime() / 1000);
const delta = now_seconds - dda_seconds;
var output = ``;
if (delta < 60) {
output = `${delta} ${delta > 1 ? `secondes` : `seconde`}`;
}
else if (delta < 3600) {
var nb_minutes = Math.floor(delta / 60)
output = `${nb_minutes} ${nb_minutes > 1 ? `minutes` : `minute`}`;
}
else if (delta < 86400) {
var nb_hours = Math.floor(delta / 3600)
output = `${nb_hours} ${nb_hours > 1 ? `heures` : `heure`}`;
}
else if (dda.getDate() == yesterday.getDate())
output = `hier ${dda.getHours()}h${dda.getMinutes().toString().padStart(2, "0")}`;
else if (dda.getDate() == before_yesterday.getDate())
output = `avant-hier ${dda.getHours()}h${dda.getMinutes().toString().padStart(2, "0")}`;
else
output = `le ${dda.getDate()}/${dda.getMonth() + 1} à ${dda.getHours()}h${dda.getMinutes().toString().padStart(2, "0")}`;
return output;
}
catch (error) {
return `?`;
}
]]]
state:
- value: 'off'
color: var(--state-inactive-color)
state_display: inactif depuis
styles:
icon:
- animation: blink 10s ease 0
- value: 'on'
color: var(--state-active-color)
state_display: actif depuis
styles:
icon:
- animation: blink 2s ease infinite
styles:
card:
- height: 100px
name:
- font-size: 14px
state:
- font-size: 12px
- color: var(--info-color)
label:
- font-size: 12px
- color: var(--success-color)
confirmation:
text: |-
[[[
var delay = states["input_number.retard_a_l_arrosage"].state;
var duration = states["input_number.duree_de_l_arrosage"].state;
var in_delay_str;
if (delay == 0)
var in_delay_str = `maintenant`
else
var in_delay_str = `dans ` + Math.trunc(delay) + ` mn`
return `Es-tu sûr de vouloir arroser le Puit `+ in_delay_str + ` pendant ` + Math.trunc(duration) + ` mn ?`
]]]
tap_action:
action: call-service
service: script.demarrer_arrosage_a_partir_des_entrees
service_data:
id_cible_arrosage: switch.puit_start_stop_arrosage
entity: switch.puit_start_stop_arrosage
name: Puit
- show_name: true
show_icon: true
show_label: true
show_state: true
label: |
[[[
try {
const now = new Date();
const now_seconds = Math.floor(now.getTime() / 1000);
const yesterday = new Date(); yesterday.setDate(yesterday.getDate() - 1);
const before_yesterday = new Date(); before_yesterday.setDate(before_yesterday.getDate() - 2);
const dda = states["binary_sensor.lilas_des_indes_arrosage_en_cours"].state == "on"
? new Date(states["sensor.lilas_des_indes_dernier_arrosage_debut"].state)
: new Date(states["sensor.lilas_des_indes_dernier_arrosage_fin"].state);
const dda_seconds = Math.floor(dda.getTime() / 1000);
const delta = now_seconds - dda_seconds;
var output = ``;
if (delta < 60) {
output = `${delta} ${delta > 1 ? `secondes` : `seconde`}`;
}
else if (delta < 3600) {
var nb_minutes = Math.floor(delta / 60)
output = `${nb_minutes} ${nb_minutes > 1 ? `minutes` : `minute`}`;
}
else if (delta < 86400) {
var nb_hours = Math.floor(delta / 3600)
output = `${nb_hours} ${nb_hours > 1 ? `heures` : `heure`}`;
}
else if (dda.getDate() == yesterday.getDate())
output = `hier ${dda.getHours()}h${dda.getMinutes().toString().padStart(2, "0")}`;
else if (dda.getDate() == before_yesterday.getDate())
output = `avant-hier ${dda.getHours()}h${dda.getMinutes().toString().padStart(2, "0")}`;
else
output = `le ${dda.getDate()}/${dda.getMonth() + 1} à ${dda.getHours()}h${dda.getMinutes().toString().padStart(2, "0")}`;
return output;
}
catch (error) {
return `?`;
}
]]]
type: custom:button-card
haptic: success
state:
- value: 'off'
color: var(--state-inactive-color)
state_display: inactif depuis
styles:
icon:
- animation: blink 10s ease 0
- value: 'on'
color: var(--state-active-color)
state_display: actif depuis
styles:
icon:
- animation: blink 2s ease infinite
styles:
card:
- height: 100px
name:
- font-size: 14px
state:
- font-size: 12px
- color: var(--info-color)
label:
- font-size: 12px
- color: var(--success-color)
confirmation:
text: |-
[[[
var delay = states["input_number.retard_a_l_arrosage"].state;
var duration = states["input_number.duree_de_l_arrosage"].state;
var in_delay_str;
if (delay == 0)
var in_delay_str = `maintenant`
else
var in_delay_str = `dans ` + Math.trunc(delay) + ` mn`
return `Es-tu sûr de vouloir arroser le Lilas des Indes `+ in_delay_str + ` pendant ` + Math.trunc(duration) + ` mn ?`
]]]
tap_action:
action: call-service
service: script.demarrer_arrosage_a_partir_des_entrees
service_data:
id_cible_arrosage: switch.lilas_des_indes_start_stop_arrosage
entity: switch.lilas_des_indes_start_stop_arrosage
name: Lilas des Indes
- show_name: true
show_icon: true
show_label: true
show_state: true
label: |
[[[
try {
const now = new Date();
const now_seconds = Math.floor(now.getTime() / 1000);
const yesterday = new Date(); yesterday.setDate(yesterday.getDate() - 1);
const before_yesterday = new Date(); before_yesterday.setDate(before_yesterday.getDate() - 2);
const dda = states["binary_sensor.saule_pleureur_arrosage_en_cours"].state == "on"
? new Date(states["sensor.saule_pleureur_dernier_arrosage_debut"].state)
: new Date(states["sensor.saule_pleureur_dernier_arrosage_fin"].state);
const dda_seconds = Math.floor(dda.getTime() / 1000);
const delta = now_seconds - dda_seconds;
var output = ``;
if (delta < 60) {
output = `${delta} ${delta > 1 ? `secondes` : `seconde`}`;
}
else if (delta < 3600) {
var nb_minutes = Math.floor(delta / 60)
output = `${nb_minutes} ${nb_minutes > 1 ? `minutes` : `minute`}`;
}
else if (delta < 86400) {
var nb_hours = Math.floor(delta / 3600)
output = `${nb_hours} ${nb_hours > 1 ? `heures` : `heure`}`;
}
else if (dda.getDate() == yesterday.getDate())
output = `hier ${dda.getHours()}h${dda.getMinutes().toString().padStart(2, "0")}`;
else if (dda.getDate() == before_yesterday.getDate())
output = `avant-hier ${dda.getHours()}h${dda.getMinutes().toString().padStart(2, "0")}`;
else
output = `le ${dda.getDate()}/${dda.getMonth() + 1} à ${dda.getHours()}h${dda.getMinutes().toString().padStart(2, "0")}`;
return output;
}
catch (error) {
return `?`;
}
]]]
type: custom:button-card
haptic: success
state:
- value: 'off'
color: var(--state-inactive-color)
state_display: inactif depuis
styles:
icon:
- animation: blink 10s ease 0
- value: 'on'
color: var(--state-active-color)
state_display: actif depuis
styles:
icon:
- animation: blink 2s ease infinite
styles:
card:
- height: 100px
name:
- font-size: 14px
state:
- font-size: 12px
- color: var(--info-color)
label:
- font-size: 12px
- color: var(--success-color)
confirmation:
text: |-
[[[
var delay = states["input_number.retard_a_l_arrosage"].state;
var duration = states["input_number.duree_de_l_arrosage"].state;
var in_delay_str;
if (delay == 0)
var in_delay_str = `maintenant`
else
var in_delay_str = `dans ` + Math.trunc(delay) + ` mn`
return `Es-tu sûr de vouloir arroser le Saule Pleureur `+ in_delay_str + ` pendant ` + Math.trunc(duration) + ` mn ?`
]]]
tap_action:
action: call-service
service: script.demarrer_arrosage_a_partir_des_entrees
service_data:
id_cible_arrosage: switch.saule_pleureur_start_stop_arrosage
entity: switch.saule_pleureur_start_stop_arrosage
name: Saule Pleureur
- show_name: true
show_icon: true
show_state: false
state_display: °°°°
type: custom:button-card
icon: mdi:water-off-outline
show_label: false
label: ' ------'
haptic: success
styles:
card:
- height: 100px
icon:
- color: var(--warning-color)
name:
- font-size: 14px
state:
- font-size: 12px
label:
- font-size: 12px
confirmation:
text: Es-tu sûr de vouloir arrêter l'arrosage ?
tap_action:
action: call-service
service: netro_watering.stop_watering
service_data:
entity_id: switch.saule_pleureur_start_stop_arrosage
entity: switch.saule_pleureur_start_stop_arrosage
name: Arrêt |
Beta Was this translation helpful? Give feedback.
-
Let's continue with Watering schedule (aka Planning des arrosage) type: entities
entities:
- entity: sensor.puit_dernier_arrosage_debut
type: custom:multiple-entity-row
name: Puit
format: date
secondary_info: null
styles:
width: 85px
icon: mdi:check
entities:
- entity: sensor.puit_dernier_arrosage_debut
name: false
format: time
styles:
width: 25px
- entity: sensor.puit_dernier_arrosage_duree
name: false
styles:
width: 26px
unit: ''''
- entity: sensor.puit_dernier_arrosage_statut
name: false
styles:
width: 50px
card_mod:
style: |
:host {
--card-mod-icon-color:
{% if is_state('binary_sensor.puit_arrosage_en_cours', 'on') %}
var(--state-active-color)
{% else %}
var(--state-disabled-color)
{% endif %}
;
}
- entity: sensor.saule_pleureur_dernier_arrosage_debut
type: custom:multiple-entity-row
name: Saule pleureur
format: date
secondary_info: null
styles:
width: 85px
icon: mdi:check
entities:
- entity: sensor.saule_pleureur_dernier_arrosage_debut
name: false
format: time
styles:
width: 25px
- entity: sensor.saule_pleureur_dernier_arrosage_duree
name: false
unit: ''''
styles:
width: 26px
- entity: sensor.saule_pleureur_dernier_arrosage_statut
name: false
styles:
width: 50px
card_mod:
style: |
:host {
--card-mod-icon-color:
{% if is_state('binary_sensor.saule_pleureur_arrosage_en_cours', 'on') %}
var(--state-active-color)
{% else %}
var(--state-disabled-color)
{% endif %}
;
}
- entity: sensor.lilas_des_indes_dernier_arrosage_debut
type: custom:multiple-entity-row
name: Lilas des indes
format: date
secondary_info: null
styles:
width: 85px
icon: mdi:check
entities:
- entity: sensor.lilas_des_indes_dernier_arrosage_debut
name: false
format: time
styles:
width: 25px
- entity: sensor.lilas_des_indes_dernier_arrosage_duree
name: false
styles:
width: 26px
unit: ''''
- entity: sensor.lilas_des_indes_dernier_arrosage_statut
styles:
width: 50px
name: false
card_mod:
style: |
:host {
--card-mod-icon-color:
{% if is_state('binary_sensor.lilas_des_indes_arrosage_en_cours', 'on') %}
var(--state-active-color)
{% else %}
var(--state-disabled-color)
{% endif %}
;
}
- type: section
- entity: sensor.puit_prochain_arrosage_debut
type: custom:multiple-entity-row
name: Puit
format: date
secondary_info: null
styles:
width: 85px
entities:
- entity: sensor.puit_prochain_arrosage_debut
name: false
format: time
styles:
width: 25px
- entity: sensor.puit_prochain_arrosage_duree
name: false
unit: ''''
styles:
width: 26px
- entity: sensor.puit_prochain_arrosage_statut
name: false
styles:
width: 50px
- entity: sensor.saule_pleureur_prochain_arrosage_debut
type: custom:multiple-entity-row
name: Saule pleureur
format: date
secondary_info: null
styles:
width: 85px
entities:
- entity: sensor.saule_pleureur_prochain_arrosage_debut
name: false
format: time
styles:
width: 25px
- entity: sensor.saule_pleureur_prochain_arrosage_duree
name: false
unit: ''''
styles:
width: 26px
- entity: sensor.saule_pleureur_prochain_arrosage_statut
name: false
styles:
width: 50px
- entity: sensor.lilas_des_indes_prochain_arrosage_debut
type: custom:multiple-entity-row
name: Lilas des indes
format: date
secondary_info: null
styles:
width: 85px
entities:
- entity: sensor.lilas_des_indes_prochain_arrosage_debut
name: false
format: time
styles:
width: 25px
- entity: sensor.lilas_des_indes_prochain_arrosage_duree
name: false
unit: ''''
styles:
width: 26px
- entity: sensor.lilas_des_indes_prochain_arrosage_statut
name: false
styles:
width: 50px
title: Planning des arrosages
show_header_toggle: true
view_layout:
grid-area: planning
place-self: end auto |
Beta Was this translation helpful? Give feedback.
-
And Ground sensors (aka Capteurs de sol) type: entities
entities:
- entity: sensor.capteur_hortensia_batterie
type: custom:multiple-entity-row
name: Batterie
show_state: false
secondary_info: last-changed
entities:
- entity: sensor.capteur_rosiers_batterie
name: rosiers
styles:
width: 60px
- entity: sensor.capteur_hortensia_batterie
name: hortensia
styles:
width: 60px
- entity: sensor.capteur_potager_batterie
name: potager
styles:
width: 60px
- entity: sensor.capteur_hortensia_humidite
type: custom:multiple-entity-row
name: Dernières mesures
attribute: last measurement time
format: date
icon: mdi:update
entities:
- entity: sensor.capteur_rosiers_humidite
name: false
attribute: last measurement time
format: time
- entity: sensor.capteur_hortensia_batterie
name: false
attribute: last measurement time
format: time
- entity: sensor.capteur_potager_batterie
name: false
attribute: last measurement time
format: time
- type: section
- entity: sensor.capteur_rosiers_humidite
type: custom:multiple-entity-row
name: Rosiers
format: precision1
show_state: true
state_header: humidité
icon: mdi:thermometer-probe
tap_action:
action: call-service
service: netro_watering.refresh_data
service_data:
config_entry_id: da1d81f42ba1fa5648ee12bbf409e91f
confirmation: true
haptic: success
styles:
width: 50px
secondary_info: last-changed
entities:
- entity: sensor.capteur_rosiers_temperature
name: température
format: precision1
styles:
width: 50px
- entity: sensor.capteur_rosiers_luminosite
name: luminosité
format: precision1
- entity: sensor.capteur_hortensia_humidite
type: custom:multiple-entity-row
name: Hortensia
format: precision1
show_state: true
state_header: humidité
icon: mdi:thermometer-probe
tap_action:
action: call-service
service: netro_watering.refresh_data
service_data:
config_entry_id: e1f14490f909529db179326173d5ec3d
confirmation: true
haptic: success
styles:
width: 50px
secondary_info: last-changed
entities:
- entity: sensor.capteur_hortensia_temperature
name: température
format: precision1
styles:
width: 50px
- entity: sensor.capteur_hortensia_luminosite
name: luminosité
format: precision1
- entity: sensor.capteur_potager_humidite
type: custom:multiple-entity-row
name: Potager
format: precision1
show_state: true
state_header: humidité
icon: mdi:thermometer-probe
tap_action:
action: call-service
service: netro_watering.refresh_data
service_data:
config_entry_id: 81e6e31da19cd8f263fa4c796f4b9849
confirmation: true
haptic: success
styles:
width: 50px
secondary_info: last-changed
entities:
- entity: sensor.capteur_potager_temperature
name: température
format: precision1
styles:
width: 50px
- entity: sensor.capteur_potager_luminosite
name: luminosité
format: precision1
- entity: sensor.royan_humidity
type: custom:multiple-entity-row
name: Royan
format: precision1
show_state: true
state_header: humidité
icon: mdi:thermometer-probe
styles:
width: 50px
secondary_info: last-changed
entities:
- entity: sensor.royan_temperature
name: température
format: precision1
styles:
width: 50px
- entity: sensor.royan_uv
name: uv
format: precision0
header:
type: picture
image: /local/garden/bandeau-capteur-hortensia.png
tap_action:
action: none
hold_action:
action: none
title: Capteurs de sol
state_color: true
view_layout:
grid-area: capteurs
place-self: end auto |
Beta Was this translation helpful? Give feedback.
-
And the graphs of the sensors type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: custom:mini-graph-card
name: Rosiers
hours_to_show: 70
animate: true
height: 150
points_per_hour: 1
show:
name: true
state: last
icon_adaptive_color: true
entities:
- entity: sensor.capteur_rosiers_humidite
name: rosiers
line_color: var(--amber-color)
line_width: 8
font_size: 75
- type: custom:mini-graph-card
name: Température
hours_to_show: 70
animate: true
height: 150
points_per_hour: 1
show:
name: false
state: last
icon_adaptive_color: true
entities:
- entity: sensor.capteur_rosiers_temperature
name: rosiers
line_color: var(--amber-color)
line_width: 8
font_size: 75
- type: custom:mini-graph-card
name: Luminosité
hours_to_show: 70
animate: true
height: 150
points_per_hour: 1
show:
name: false
state: last
icon_adaptive_color: true
entities:
- entity: sensor.capteur_rosiers_luminosite
name: rosiers
line_color: var(--amber-color)
line_width: 8
font_size: 75
- type: horizontal-stack
cards:
- type: custom:mini-graph-card
name: Hortensia
hours_to_show: 70
animate: true
height: 150
points_per_hour: 1
show:
name: true
state: last
icon_adaptive_color: true
entities:
- entity: sensor.capteur_hortensia_humidite
name: hortensia
line_color: var(--blue-color)
line_width: 8
font_size: 75
- type: custom:mini-graph-card
name: Température
hours_to_show: 70
animate: true
height: 150
points_per_hour: 1
show:
name: false
state: last
icon_adaptive_color: true
entities:
- entity: sensor.capteur_hortensia_temperature
name: hortensia
line_color: var(--blue-color)
line_width: 8
font_size: 75
- type: custom:mini-graph-card
name: Luminosité
hours_to_show: 70
animate: true
height: 150
points_per_hour: 1
show:
name: false
state: last
icon_adaptive_color: true
entities:
- entity: sensor.capteur_hortensia_luminosite
name: hortensia
line_color: var(--blue-color)
line_width: 8
font_size: 75
- type: horizontal-stack
cards:
- type: custom:mini-graph-card
name: Potager
hours_to_show: 70
animate: true
height: 150
points_per_hour: 1
show:
name: true
state: last
icon_adaptive_color: true
entities:
- entity: sensor.capteur_potager_humidite
name: hortensia
line_color: var(--purple-color)
line_width: 8
font_size: 75
- type: custom:mini-graph-card
name: Température
hours_to_show: 70
animate: true
height: 150
points_per_hour: 1
show:
name: false
state: last
icon_adaptive_color: true
entities:
- entity: sensor.capteur_potager_temperature
name: hortensia
line_color: var(--purple-color)
line_width: 8
font_size: 75
- type: custom:mini-graph-card
name: Luminosité
hours_to_show: 70
animate: true
height: 150
points_per_hour: 1
show:
name: false
state: last
icon_adaptive_color: true
entities:
- entity: sensor.capteur_potager_luminosite
name: hortensia
line_color: var(--purple-color)
line_width: 8
font_size: 75
view_layout:
grid-area: multichart type: vertical-stack
cards:
- type: custom:mini-graph-card
name: Humidité sur les 7 derniers jours
icon: mdi:water-percent
show:
name: true
state: last
labels: true
graph: line
icon: true
name_adaptive_color: true
icon_adaptive_color: true
points: hover
hours_to_show: 168
points_per_hour: 2
animate: true
height: 150
group_by: hour
aggregate_func: avg
entities:
- entity: sensor.capteur_rosiers_humidite
name: rosiers
color: var(--amber-color)
- entity: sensor.capteur_hortensia_humidite
name: hortensia
color: var(--blue-color)
- entity: sensor.capteur_potager_humidite
name: potager
color: var(--purple-color)
view_layout:
place-self: end auto
grid-area: monochart |
Beta Was this translation helpful? Give feedback.
-
Thanks for all your work on the project! Could you post the script ( |
Beta Was this translation helpful? Give feedback.
-
How to install Lovelace cards for Netro on Home AssistantThis how-to assumes you have one controller and two zones, front left and front right. It does not include any sensors. The examples are all translated to English from the French originals. PrerequisitesBefore installing the cards you need to ensure that the Netro entities are properly showing up in Home Assistant. You will also need to install Create Template EntitiesThe cards depend on values that are computed from the start and stop times of future and past waterings. These are not native Netro entities. We add them using templates. Create template.yaml fileIf you already have a working template.yaml, you can skip this step. In the configuration.yaml file in the config directory add the line below. It tells your Home Assistant instance to look in the template.yaml file for additional entities. This method follows best practices from the HA documentation . template: !include template.yaml Create a blank template.yaml file in the config directory and restart HA. Add entities to your template.yamlYou need to create two entities for each zone. One calculates the duration of the previous watering and the other calculates the duration of the next watering. The example below creates both for our Front Left and Front Right zones. - sensor:
- name: front left next watering duration
unit_of_measurement: "min"
state_class: measurement
device_class: duration
state: >
{% set start_time = states('sensor.front_left_next_watering_start_time') %}
{% set end_time = states('sensor.front_left_next_watering_end_time') %}
{% if start_time is not in ['unavailable', 'unknown', 'none'] %}
{{ ((as_datetime(end_time) - as_datetime(start_time)).seconds/60) | round(0) | int}}
{% else %}
0
{% endif %}
- name: front right next watering duration
unit_of_measurement: "min"
state_class: measurement
device_class: duration
state: >
{% set start_time = states('sensor.front_right_next_watering_start_time') %}
{% set end_time = states('sensor.front_right_next_watering_end_time') %}
{% if start_time is not in ['unavailable', 'unknown', 'none'] %}
{{ ((as_datetime(end_time) - as_datetime(start_time)).seconds/60) | round(0) | int}}
{% else %}
0
{% endif %}
- name: front left last watering duration
unit_of_measurement: "min"
state_class: measurement
device_class: duration
state: >
{% set start_time = states('sensor.front_left_last_watering_start_time') %}
{% set end_time = states('sensor.front_left_last_watering_end_time') %}
{% if start_time is not in ['unavailable', 'unknown', 'none'] %}
{{ ((as_datetime(end_time) - as_datetime(start_time)).seconds/60) | round(0) | int}}
{% else %}
0
{% endif %}
- name: front right last watering duration
unit_of_measurement: "min"
state_class: measurement
device_class: duration
state: >
{% set start_time = states('sensor.front_right_last_watering_start_time') %}
{% set end_time = states('sensor.front_right_last_watering_end_time') %}
{% if start_time is not in ['unavailable', 'unknown', 'none'] %}
{{ ((as_datetime(end_time) - as_datetime(start_time)).seconds/60) | round(0) | int}}
{% else %}
0
{% endif %} ReloadNavigate to Developer tools on the HA left hand side bar and click Template Entities under YAML configuration reloading. You should now be able to view your new entities under settings --> integrations --> entities. If you don't see them, check for any notifications and ensure your configuration.yaml is setup properly. Setup the dashboardCreate a new dashboardCreate a new dashboard Settings --> Dashboards --> Add Dashboard Select New dashboard from scratch. Select the title and icon you like. Add cards to the dashboardOn the right hand side bar click on your new dashboard and click the pencil icon in the top right to edit it. Then click the add card button at the bottom right. Scroll to the bottom of the popup and select manual. Copy the below for the Sprinkler Controller card and rename the sensors according to how they exist in your instance of HA and click save. type: entities
entities:
- entity: sensor.sprinkler_controller_status
type: custom:multiple-entity-row
name: Status
show_state: true
state-color: true
styles:
width: 80px
text-align: center
padding: 10px 5px 10px
hold_action:
action: more-info
double_tap_action:
action: more-info
tap_action:
action: call-service
service: netro_watering.refresh_data
service_data:
config_entry_id: 2dc0828a3d5491ee773f434506dfbe5b
confirmation: true
secondary_info: last-changed
entities:
- entity: switch.sprinkler_controller_enable_disable
toggle: true
state-color: true
styles:
width: 70px
text-align: right
name: false
- entity: switch.sprinkler_controller_start_stop_watering
toggle: true
styles:
width: 70px
text-align: left
name: false
card_mod:
style: |
:host {
--paper-item-icon-color:
{% if is_state('sprinkler_controller_status', 'online') %}
var(--info-color)
{% elif is_state('sprinkler_controller_status', 'standby') %}
var(--state-disabled-color)
{% elif is_state('sprinkler_controller_status', 'watering') %}
var(--state-active-color)
{% else %}
var(--state-unavailable-color)
{% endif %}
;
}
- entity: switch.sprinkler_controller_start_stop_watering
type: custom:multiple-entity-row
name: Start/Stop
show_state: false
state_header: general
secondary_info: per zone
state-color: true
toggle: true
tap_action:
action: call-service
service: netro_watering.stop_watering
service_data:
entity_id: switch.front_left_start_stop_watering
confirmation: true
entities:
- entity: switch.front_left_start_stop_watering
toggle: true
styles:
width: 70px
name: Front Left
- entity: switch.front_right_start_stop_watering
toggle: true
name: Front Right
styles:
width: 70px
card_mod:
style: |
:host {
--paper-item-icon-color:
{# If one of the switches is activated, we highlight the icon. #}
{% if is_state('switch.front_left_start_stop_watering', 'on')
or is_state('switch.front_right_start_stop_watering', 'on') %}
var(--primary-color)
{% else %}
var(--state-disabled-color)
{% endif %}
;
}
- type: section
- entity: switch.front_left_start_stop_watering
type: custom:multiple-entity-row
name: Front Left
show_state: false
state_header: null
state-color: true
secondary_info: zone 1
styles:
width: 70px
tap_action:
action: navigate
navigation_path: /dashboard-arrosage/humidite
entities:
- entity: sensor.front_left_next_watering_start_time
name: next start
state-color: true
format: relative
state-header: null
styles:
width: 110px
text-align: right
font-size: 90%
- entity: sensor.front_left_next_watering_duration
name: duration
state-color: true
state-header: null
styles:
width: 50px
- entity: sensor.front_left_humidity
name: humidity
state-color: true
styles:
width: 40px
card_mod:
style:
hui-generic-entity-row $: |
:host {
--paper-item-icon-color:
{% if is_state('binary_sensor.front_left_is_it_watering_right_now', 'on') %}
var(--state-active-color)
{% else %}
var(--state-disabled-color)
{% endif %}
;
--card-mod-icon:
{% if is_state('binary_sensor.front_left_is_it_watering_right_now', 'on') %}
mdi:valve-open
{% else %}
mdi:valve-closed
{% endif %}
;
}
state-badge {
animation:
{% if is_state('binary_sensor.front_left_is_it_watering_right_now', 'on') %}
blinker 2s ease infinite;
{% else %}
blinker 2s linear 0;
{% endif %}
;
}
@keyframes blinker {
0% {opacity: 0;}
40% {opacity: 0.5;}
100% {opacity: 1;}
}
- entity: switch.front_right_start_stop_watering
type: custom:multiple-entity-row
name: Front Right
show_state: false
state_header: null
state-color: true
secondary_info: zone 2
styles:
width: 70px
tap_action:
action: navigate
navigation_path: /dashboard-arrosage/humidite
entities:
- entity: sensor.front_right_next_watering_start_time
name: next start
state-color: true
format: relative
state-header: null
styles:
width: 110px
text-align: right
font-size: 90%
- entity: sensor.front_right_next_watering_duration
name: duration
state-color: true
state-header: null
styles:
width: 50px
- entity: sensor.front_right_humidity
name: humidity
state-color: true
styles:
width: 40px
card_mod:
style:
hui-generic-entity-row $: |
:host {
--paper-item-icon-color:
{% if is_state('binary_sensor.front_right_is_it_watering_right_now', 'on') %}
var(--state-active-color)
{% else %}
var(--state-disabled-color)
{% endif %}
;
--card-mod-icon:
{% if is_state('binary_sensor.front_right_is_it_watering_right_now', 'on') %}
mdi:valve-open
{% else %}
mdi:valve-closed
{% endif %}
;
}
state-badge {
animation:
{% if is_state('binary_sensor.front_right_is_it_watering_right_now', 'on') %}
blinker 2s ease infinite;
{% else %}
blinker 2s linear 0;
{% endif %}
;
}
@keyframes blinker {
0% {opacity: 0;}
40% {opacity: 0.5;}
100% {opacity: 1;}
}
- type: section
- entity: sensor.sprinkler_controller_token_remaining
type: custom:multiple-entity-row
name: Tokens
show_state: true
state-color: true
secondary_info:
attribute: update interval
format: precision0
styles:
width: 70px
font-weight: bold
state_header: remaining
card_mod:
style: |
:host {
--paper-item-icon-color:
{% if states('sensor.sprinkler_controller_token_remaining') | int > 1500 %}
var(--success-color)
{% elif states('sensor.sprinkler_controller_token_remaining') | int > 800 %}
var(--info-color)
{% elif states('sensor.sprinkler_controller_token_remaining') | int > 250 %}
var(--warning-color)
{% else %}
var(--error-color)
{% endif %}
;
}
header:
type: picture
image: /local/your-image.jpg
tap_action:
action: none
hold_action:
action: none
title: Sprinkler Controller
state_color: true
view_layout:
grid-area: pontaillac
Follow the same steps for the Watering Schedule card. type: entities
entities:
- entity: sensor.front_left_last_watering_start_time
type: custom:multiple-entity-row
name: Front Left
format: date
secondary_info: null
styles:
width: 85px
icon: mdi:check
entities:
- entity: sensor.front_left_last_watering_start_time
name: false
format: time
styles:
width: 25px
- entity: sensor.front_left_last_watering_duration
name: false
styles:
width: 26px
unit: ''''
- entity: sensor.front_left_last_watering_status
name: false
styles:
width: 50px
card_mod:
style: |
:host {
--card-mod-icon-color:
{% if is_state('binary_sensor.front_left_is_it_watering_right_now', 'on') %}
var(--state-active-color)
{% else %}
var(--state-disabled-color)
{% endif %}
;
}
- entity: sensor.front_right_last_watering_start_time
type: custom:multiple-entity-row
name: Front Right
format: date
secondary_info: null
styles:
width: 85px
icon: mdi:check
entities:
- entity: sensor.front_right_last_watering_start_time
name: false
format: time
styles:
width: 25px
- entity: sensor.front_right_last_watering_duration
name: false
styles:
width: 26px
unit: ''''
- entity: sensor.front_right_last_watering_status
name: false
styles:
width: 50px
card_mod:
style: |
:host {
--card-mod-icon-color:
{% if is_state('binary_sensor.front_left_is_it_watering_right_now', 'on') %}
var(--state-active-color)
{% else %}
var(--state-disabled-color)
{% endif %}
;
}
- type: section
- entity: sensor.front_left_next_watering_start_time
type: custom:multiple-entity-row
name: Front Left
format: date
secondary_info: null
styles:
width: 85px
entities:
- entity: sensor.front_left_next_watering_start_time
name: false
format: time
styles:
width: 25px
- entity: sensor.front_left_next_watering_duration
name: false
unit: ''''
styles:
width: 26px
- entity: sensor.front_left_next_watering_status
name: false
styles:
width: 50px
- entity: sensor.front_right_next_watering_start_time
type: custom:multiple-entity-row
name: Front Left
format: date
secondary_info: null
styles:
width: 85px
entities:
- entity: sensor.front_right_next_watering_start_time
name: false
format: time
styles:
width: 25px
- entity: sensor.front_right_next_watering_duration
name: false
unit: ''''
styles:
width: 26px
- entity: sensor.front_right_next_watering_status
name: false
styles:
width: 50px
title: Watering Sechedule
show_header_toggle: true
view_layout:
grid-area: planning
place-self: end auto
You should now be all setup! |
Beta Was this translation helpful? Give feedback.
-
Hi guys,
Here are some lovelace cards I am presently using to control my watering system with the help of the Netro Watering integration.
It's a simple example of what you can get but, as I told you before, I'm not a specialist on the front part. I'm sure you're doing much better than me, so if you want to share your dashboards that would be cool :-)
A bit more (I have them only in french...) :
See you 👍
Beta Was this translation helpful? Give feedback.
All reactions