Contents
Intro
Description des automatismes mis en place dans la gestion de mes volets roulants
Je possède deux types de volets roulants:
– Volets Somfy protocole RTS
– Volets Filaires
Les volets Somfy sont équipés de moteurs intégrés avec un protocole RTS, les volets filaires sont pilotés par des modules Chacon DIO, dans les deux cas, je les ai associé à HA via une passerelle RFXtrx433E branchée en USB sur le NUC.
L’intégration HA utilisée est RFXCOM RFXtrx. Il faut bien lire la documentation qui explique comment générer le code associé au volet puis comment l’intégrer dans HA.
Modes de fonctionnement
J’utilise 3 modes de fonctionnement sélectionnable via un « input.select »:
Auto Hiv
L’hiver, nous préférons fermer les volets des la tombée de la nuit afin de se préserver du froid. L’ouverture et la fermeture sont basés sur la luminosité extérieure et la position du soleil. La luminosité est mesuré par un ESP8266-01 sous ESPHOME équipé d’une cellule bh1750.
Les seuils de luminosité haut et bas sont mémorisés dans des input_number, un pour la fermeture et un pour l’ouverture, respectivement 5 et 30 lux dans mon cas.
La position du soleil « sous » ou « au-dessus » de l’horizon est donnée par le sensor « sun.sun ». Ces deux sensors permettent de détecter que le soleil se couche ou se lève.
La combinaison logique des ces deux informations permet de calculer un « input_boolean.nuit_jour » avec nuit=off et jour=on, (voir le code ci-après), qui servira dans mon automatisme principal .
- id: '1610184966825'
alias: Volet_Boolean Nuit/Jour
description: ''
trigger:
- platform: template
value_template: '{{ states(''sensor.luminosite'' )|float > states(''input_number.luminosite_seuil_haut'')|float
and is_state("sun.sun", "above_horizon") }}'
id: nuit->jour
- platform: template
value_template: '{{ states(''sensor.luminosite'')|float < states(''input_number.luminosite_seuil_bas'')|float
and is_state("sun.sun", "below_horizon") }}'
id: jour->nuit
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: nuit->jour
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.nuit_jour
- conditions:
- condition: trigger
id: jour->nuit
sequence:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.nuit_jour
default: []
mode: single
Auto ETE
L’été nous restons dehors plus tard et nous nous couchons bien après la tombée de la nuit. Après avoir essayé plusieurs solutions basées sur le mode hiver, j’ai préféré simplifier le fonctionnement: L’ouverture et la fermeture seront pilotés par deux « input_datetime »: Un pour l’ouverture et le deuxième pour la fermeture.
Absent
J’utilise ce mode lorsque nous nous absentons de la maison pour une longue période. Pour faire simple, je ferme tous les volets et j’ouvre celui du salon pour donner un peu de vie et de clarté en fonction du boolean « jour/nuit ».
Scripts.
La liste des volets à ouvrir et à fermer est programmée dans des scripts, les scripts sont appelés par l’automatisme en fonction du mode de fonctionnement utilisé.
Les scripts « ouverture volet » et « fermeture volets » sont décrits ci_après. A noter que les ordres envoyés aux volets sont espacés de 2 secondes afin de s’assurer que la passerelle RFXtrx ne sature pas.
Un fonctionnement spécifique à l’ouverture est réservé à trois pièces (2 chambres amis et bureau), il est conditionné par un input_boolean précisant si les chambres et le bureau sont occupés.
Mode Auto Hiv et Auto Ete
Ouverture Volets
ouverture_volet:
alias: ouverture_volet
sequence:
- service: cover.open_cover
data: {}
entity_id: cover.salon_petit
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.open_cover
data: {}
entity_id: cover.cuisine
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.open_cover
data: {}
entity_id: cover.sdb
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.open_cover
data: {}
entity_id: cover.volet_sam
- service: script.volets_bureau
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: script.ouverture_volets_chamb_nord
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: script.ouverture_volet_chamb_sud
mode: single
icon: mdi:shuttle
Fermeture Volets
fermeture_volet:
alias: fermeture_volet
sequence:
- service: cover.open_cover
data: {}
entity_id: cover.bureau_gauche
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.bureau_droit
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.salon_petit
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.sdb
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.amis_nord
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.parents_petit
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.volet_parents_grand
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.amis_sud_petit
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.volet_amis_sud_grand
mode: single
icon: mdi:shuttle
Mode Absent
Ouverture Volets
ouverture_volet_absent:
alias: ouverture_volet_absent
sequence:
- service: cover.open_cover
data: {}
target:
entity_id: cover.bureau_droit
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
target:
entity_id: cover.bureau_gauche
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.open_cover
data: {}
target:
entity_id: cover.salon_petit
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.open_cover
data: {}
target:
entity_id: cover.cuisine
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.open_cover
data: {}
target:
entity_id: cover.sdb
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.open_cover
data: {}
target:
entity_id: cover.amis_nord
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.open_cover
data: {}
target:
entity_id: cover.parents_petit
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.open_cover
data: {}
target:
entity_id: cover.volet_parents_grand
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.open_cover
data: {}
target:
entity_id: cover.volet_sam
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.open_cover
data: {}
target:
entity_id: cover.volet_amis_sud_grand
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.open_cover
data: {}
target:
entity_id: cover.amis_sud_petit
mode: single
icon: mdi:shuttle
Fermeture Volets
fermeture_volet_absent:
alias: fermeture_volet_absent
sequence:
- service: cover.open_cover
data: {}
entity_id: cover.bureau_gauche
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.bureau_droit
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.salon_petit
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
target:
entity_id:
- cover.cuisine
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.sdb
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.amis_nord
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.parents_petit
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.volet_parents_grand
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.amis_sud_petit
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.volet_amis_sud_grand
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: cover.close_cover
data: {}
entity_id: cover.volet_sam
mode: single
icon: mdi:shuttle
Déclaration des entités
Vous trouverez ci-après le fichier volet.yam.
Dans ce fichier vous retrouverez la déclaration des différentes variables utilisées.
input_boolean:
# Gestion volets
presence_amis_bureau:
name: Presence Amis Bureau
icon: mdi:account
presence_amis_ch_sud:
name: Presence Amis Chamb Sud
icon: mdi:account
presence_amis_ch_nord:
name: Presence Amis Chamb Nord
icon: mdi:account
# Calcul Jour/nuit selon luminosite et position du soleil sur l'horizon
nuit_jour:
name: Nuit=0/Jour=1
icon: mdi:weather-sunny
# Calcul Jour/nuit selon luminosite
val_automs_soleil:
name: Valid Automs Volet Soleil
icon: mdi:weather-sunny
input_datetime:
# Horaires Volets ete
horaire_ete_volet_ouv:
name: Horaire ete volets ouverture
has_date: false
has_time: true
horaire_ete_volet_ferm:
name: Horaire ete volets fermeture
has_date: false
has_time: true
input_number:
# Consigne Min/max luminosité
# gestion volet: Calcul du Input_boolean Nuit/jout
luminosite_seuil_bas:
name: Lum. seuil bas
mode: box
min: 0
max: 10
unit_of_measurement: "Lux"
icon: mdi:weather-sunny
luminosite_seuil_haut:
name: Lum. seuil haut
mode: box
min: 10
max: 50
unit_of_measurement: "Lux"
icon: mdi:weather-sunny
# gestion volet: Niveau Ensoleilement ouv auto volet
radiation_seuil_ferm_volet:
name: Radiat seuil ferm volets
mode: box
min: 0
max: 1200
unit_of_measurement: "w/m2"
icon: mdi:weather-sunny
input_select:
volets:
name: Volets
icon: mdi:window-shutter
options:
- Auto Hiv
- Auto Ete
- Absent
- Arret
cover:
# Convertion TC volet Amis grand en cover
- platform: template
covers:
volet_amis_sud_grand:
friendly_name: "Volet amis sud grand"
open_cover:
service: switch.turn_on
data:
entity_id: switch.tc_volet_amis_grand
close_cover:
service: switch.turn_off
data:
entity_id: switch.tc_volet_amis_grand
icon_template: >-
{% if is_state('switch.tc_volet_amis_grand', 'on') %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %}
# Convertion TC volet SaM en cover
volet_sam:
friendly_name: "Volet SaM"
open_cover:
service: switch.turn_on
data:
entity_id: switch.tc_volet_sam
close_cover:
service: switch.turn_off
data:
entity_id: switch.tc_volet_sam
icon_template: >-
{% if is_state('switch.tc_volet_sam', 'on') %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %}
# Convertion TC parents grand
volet_parents_grand:
friendly_name: "Volet Parents Grand"
open_cover:
service: switch.turn_on
data:
entity_id: switch.tc_chamb_parents
close_cover:
service: switch.turn_off
data:
entity_id: switch.tc_chamb_parents
icon_template: >-
{% if is_state('switch.tc_chamb_parents', 'on') %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %}
Automatisme principal
Vous trouverez ci après le descriptif fonctionnel de l’automatisme principal.
J’utilise la fonction »choose » qui, combinée aux déclencheurs sur « balise »(id), permet de simplifier le codage.
Descriptif fonctionnel

Choix gestion nb de chambres:

Calcul du input_boolean nuit/jour

Codage
Vous trouverez ci-après le code .yaml de l’automatisation correspondant au descriptif fonctionnel:
- id: '1632989157968'
alias: Volet_Automatismes
description: Ete/Hiver/Absent
trigger:
- platform: state
entity_id: input_boolean.nuit_jour
from: 'on'
to: 'off'
id: jour->nuit
- platform: time
at: input_datetime.horaire_ete_volet_ouv
id: ouv
- platform: time
at: input_datetime.horaire_ete_volet_ferm
id: ferm
- platform: state
entity_id: input_boolean.nuit_jour
id: nuit->jour
from: 'off'
to: 'on'
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.volets
state: Auto Hiv
- condition: trigger
id: jour->nuit
sequence:
- service: script.fermeture_volet
- conditions:
- condition: state
entity_id: input_select.volets
state: Auto Hiv
- condition: trigger
id: nuit->jour
sequence:
- service: script.ouverture_volet
- conditions:
- condition: state
entity_id: input_select.volets
state: Auto Ete
- condition: trigger
id: ouv
sequence:
- service: script.ouverture_volet
- conditions:
- condition: state
entity_id: input_select.volets
state: Auto Ete
- condition: trigger
id: ferm
sequence:
- service: script.fermeture_volet
- conditions:
- condition: state
entity_id: input_select.volets
state: Absent
- condition: state
entity_id: input_boolean.nuit_jour
state: 'off'
sequence:
- service: script.fermeture_volet_absent
- conditions:
- condition: state
entity_id: input_select.volets
state: Absent
- condition: state
entity_id: input_boolean.nuit_jour
state: 'on'
sequence:
- service: script.ouverture_volet_absent
default: []
mode: single
Interface lovelace
Interfaces simples regroupant les informations nécessaires au pilotage, à la surveillance et au paramétrage de la fonction « Volets »
Exemple de code:

cards:
- cards:
- cards:
- entity: cover.porte_garage
label: Garage
operator: default
show_icon: true
show_label: true
show_name: false
size: 70%
state:
- color: green
icon: mdi:garage
operator: template
value: >
[[[ return
states['cover.porte_garage'].attributes.current_position < 1
]]]
- color: red
icon: mdi:garage-open
operator: template
value: >
[[[ return
states['cover.porte_garage'].attributes.current_position > 99
]]]
- color: orange
icon: mdi:garage-alert
operator: default
tap_action:
action: more-info
theme: Mushroom
type: custom:button-card
- icon: mdi:arrow-up-bold
name: Ouvrir
show_icon: true
show_name: false
tap_action:
action: call-service
service: cover.open_cover
service_data: {}
target:
entity_id:
- cover.porte_garage
type: button
- icon: mdi:pause
name: Stop
show_name: false
tap_action:
action: call-service
service: cover.stop_cover
service_data: {}
target:
entity_id:
- cover.porte_garage
type: button
- icon: mdi:arrow-down-bold
name: Fermer
show_name: false
tap_action:
action: call-service
service: cover.close_cover
service_data: {}
target:
entity_id:
- cover.porte_garage
type: button
- icon: mdi:weather-sunset-up
name: Soleil
show_name: false
tap_action:
action: call-service
service: cover.set_cover_position
service_data:
position: 50
target:
entity_id:
- cover.porte_garage
type: button
- elements:
- attribute: current_position
entity: cover.porte_garage
style:
color: '#44739E'
font-size: 16px
font-weight: bold
left: 50%
top: 50%
suffix: '%'
tap_action:
action: more-info
type: state-label
image: /local/images/carre_orange.png
type: picture-elements
view_layout:
position: sidebar
columns: 6
square: true
type: grid
- cards:
- entity: cover.porte_sous_sol
label: Sous Sol
show_icon: true
show_label: true
show_name: false
size: 70%
state:
- color: green
icon: mdi:garage
operator: template
value: >
[[[ return
states['cover.porte_sous_sol'].attributes.current_position < 1
]]]
- color: red
icon: mdi:garage-open
operator: template
value: >
[[[ return
states['cover.porte_sous_sol'].attributes.current_position >
99 ]]]
- color: orange
icon: mdi:garage-alert
operator: default
tap_action:
action: more-info
theme: Mushroom
type: custom:button-card
- icon: mdi:arrow-up-bold
name: Ouvrir
show_icon: true
show_name: false
tap_action:
action: call-service
service: cover.open_cover
service_data: {}
target:
entity_id:
- cover.porte_sous_sol
type: button
- icon: mdi:pause
name: Stop
show_name: false
tap_action:
action: call-service
service: cover.stop_cover
service_data: {}
target:
entity_id:
- cover.porte_sous_sol
type: button
- icon: mdi:arrow-down-bold
name: Fermer
show_name: false
tap_action:
action: call-service
service: cover.close_cover
service_data: {}
target:
entity_id:
- cover.porte_sous_sol
type: button
- icon: mdi:weather-sunset-up
name: Soleil
show_name: false
tap_action:
action: call-service
service: cover.set_cover_position
service_data:
position: 50
target:
entity_id:
- cover.porte_sous_sol
type: button
- elements:
- attribute: current_position
entity: cover.porte_sous_sol
style:
color: '#44739E'
font-size: 16px
font-weight: bold
left: 50%
top: 50%
suffix: '%'
tap_action:
action: more-info
type: state-label
image: /local/images/carre_orange.png
type: picture-elements
view_layout:
position: sidebar
columns: 6
square: true
type: grid
- cards:
- entity: group.volets_bureau
hold_action:
action: none
icon: mdi:desk-lamp
name: Bureau
show_icon: true
show_name: true
show_state: false
tap_action:
action: more-info
type: button
- icon: mdi:arrow-up-bold
name: Ouvrir
show_name: false
tap_action:
action: call-service
service: cover.open_cover
service_data: {}
target:
entity_id:
- cover.volet_gauche_p
- cover.volet_droit_p
type: button
- icon: mdi:pause
name: Stop
show_name: false
tap_action:
action: call-service
service: cover.stop_cover
service_data: {}
target:
entity_id:
- cover.volet_droit_p
- cover.volet_gauche_p
type: button
- icon: mdi:arrow-down-bold
name: Fermer
show_name: false
tap_action:
action: call-service
service: cover.close_cover
service_data: {}
target:
entity_id:
- cover.volet_droit_p
- cover.volet_gauche_p
type: button
- icon: mdi:weather-sunset-up
name: Soleil
show_name: false
tap_action:
action: call-service
service: cover.set_cover_position
service_data:
position: 50
target:
entity_id:
- cover.volet_droit_p
- cover.volet_gauche_p
type: button
- elements:
- attribute: current_position
entity: cover.volet_droit_p
style:
color: '#44739E'
font-size: 16px
font-weight: bold
left: 50%
top: 50%
suffix: '%'
tap_action:
action: more-info
type: state-label
image: /local/images/carre_orange.png
type: picture-elements
view_layout:
position: sidebar
columns: 6
square: true
type: grid
- cards:
- entity: group.volets_salon_cuisine
hold_action:
action: none
icon: mdi:sofa
name: Salon
show_icon: true
show_name: true
show_state: false
tap_action:
action: more-info
type: button
- icon: mdi:arrow-up-bold
name: Ouvrir
show_icon: true
show_name: false
tap_action:
action: call-service
service: cover.open_cover
service_data: {}
target:
entity_id:
- cover.volet_sam_grand_p
- cover.volet_salon_p
- cover.volet_cuisine_p
type: button
- icon: mdi:pause
name: Stop
show_name: false
tap_action:
action: call-service
service: cover.stop_cover
service_data: {}
target:
entity_id:
- cover.volet_salon_p
- cover.volet_cuisine_p
- cover.volet_sam_grand_p
type: button
- icon: mdi:arrow-down-bold
name: Fermer
show_name: false
tap_action:
action: call-service
service: cover.close_cover
service_data: {}
target:
entity_id:
- cover.volet_salon_p
- cover.volet_sam_grand_p
- cover.volet_cuisine_p
type: button
- icon: mdi:weather-sunset-up
name: Soleil
show_name: false
tap_action:
action: call-service
service: cover.set_cover_position
service_data:
position: 50
target:
entity_id:
- cover.volet_salon_p
- cover.volet_sam_grand_p
- cover.volet_cuisine_p
type: button
- elements:
- attribute: current_position
entity: cover.volet_sam_grand_p
style:
color: '#44739E'
font-size: 16px
font-weight: bold
left: 50%
top: 50%
suffix: '%'
tap_action:
action: more-info
type: state-label
image: /local/images/carre_orange.png
type: picture-elements
view_layout:
position: sidebar
columns: 6
square: true
type: grid
- cards:
- entity: cover.volet_sdb_p
hold_action:
action: none
icon: mdi:bathtub
name: SdB
show_icon: true
show_name: true
show_state: false
tap_action:
action: more-info
type: button
- icon: mdi:arrow-up-bold
name: Ouvrir
show_icon: true
show_name: false
tap_action:
action: call-service
service: cover.open_cover
service_data: {}
target:
entity_id: cover.volet_sdb_p
type: button
- icon: mdi:pause
name: Stop
show_name: false
tap_action:
action: call-service
service: cover.stop_cover
service_data: {}
target:
entity_id: cover.volet_sdb_p
type: button
- icon: mdi:arrow-down-bold
name: Fermer
show_name: false
tap_action:
action: call-service
service: cover.close_cover
service_data: {}
target:
entity_id: cover.volet_sdb_p
type: button
- icon: mdi:weather-sunset-up
name: Soleil
show_name: false
tap_action:
action: call-service
service: cover.set_cover_position
service_data:
position: 50
target:
entity_id: cover.volet_sdb_p
type: button
- elements:
- attribute: current_position
entity: cover.volet_sdb_p
style:
color: '#44739E'
font-size: 16px
font-weight: bold
left: 50%
top: 50%
suffix: '%'
tap_action:
action: more-info
type: state-label
image: /local/images/carre_orange.png
type: picture-elements
view_layout:
position: sidebar
columns: 6
square: true
type: grid
- cards:
- entity: cover.volet_amis_nord_p
hold_action:
action: none
icon: mdi:bed
name: A Nord
show_icon: true
show_name: true
show_state: false
tap_action:
action: more-info
type: button
- icon: mdi:arrow-up-bold
name: Ouvrir
show_icon: true
show_name: false
tap_action:
action: call-service
service: cover.open_cover
service_data: {}
target:
entity_id: cover.volet_amis_nord_p
type: button
- icon: mdi:pause
name: Stop
show_name: false
tap_action:
action: call-service
service: cover.stop_cover
service_data: {}
target:
entity_id:
- cover.volet_amis_nord_p
type: button
- icon: mdi:arrow-down-bold
name: Fermer
show_name: false
tap_action:
action: call-service
service: cover.close_cover
service_data: {}
target:
entity_id:
- cover.volet_amis_nord_p
type: button
- icon: mdi:weather-sunset-up
name: Soleil
show_name: false
tap_action:
action: call-service
service: cover.set_cover_position
service_data:
position: 50
target:
entity_id: cover.volet_amis_nord_p
type: button
- elements:
- attribute: current_position
entity: cover.volet_amis_nord_p
style:
color: '#44739E'
font-size: 16px
font-weight: bold
left: 50%
top: 50%
suffix: '%'
tap_action:
action: more-info
type: state-label
image: /local/images/carre_orange.png
type: picture-elements
view_layout:
position: sidebar
columns: 6
square: true
type: grid
- cards:
- entity: group.volets_parents
hold_action:
action: none
icon: mdi:bed
name: Parents
show_icon: true
show_name: true
show_state: false
tap_action:
action: more-info
type: button
- icon: mdi:arrow-up-bold
name: Ouvrir
show_icon: true
show_name: false
tap_action:
action: call-service
service: cover.open_cover
service_data: {}
target:
entity_id:
- cover.volet_parents_grand_p
- cover.volet_ch_parent_p
type: button
- icon: mdi:pause
name: Stop
show_name: false
tap_action:
action: call-service
service: cover.stop_cover
service_data: {}
target:
entity_id:
- cover.volet_ch_parent_p
- cover.volet_parents_grand_p
type: button
- icon: mdi:arrow-down-bold
name: Fermer
show_name: false
tap_action:
action: call-service
service: cover.close_cover
service_data: {}
target:
entity_id:
- cover.volet_parents_grand_p
- cover.volet_ch_parent_p
type: button
- icon: mdi:weather-sunset-up
name: Soleil
show_name: false
tap_action:
action: call-service
service: cover.set_cover_position
service_data:
position: 50
target:
entity_id:
- cover.volet_ch_parent_p
- cover.volet_parents_grand_p
type: button
- elements:
- attribute: current_position
entity: cover.volet_parents_grand_p
style:
color: '#44739E'
font-size: 16px
font-weight: bold
left: 50%
top: 50%
suffix: '%'
tap_action:
action: more-info
type: state-label
image: /local/images/carre_orange.png
type: picture-elements
view_layout:
position: sidebar
columns: 6
square: true
type: grid
- cards:
- entity: group.volets_amis_sud
hold_action:
action: none
icon: mdi:bed
name: A Sud
show_icon: true
show_name: true
show_state: false
tap_action:
action: more-info
type: button
- icon: mdi:arrow-up-bold
name: Ouvrir
show_icon: true
show_name: false
tap_action:
action: call-service
service: cover.open_cover
service_data: {}
target:
entity_id:
- cover.volet_amis_sud_grand_p
- cover.volet_amis_sud_p
type: button
- icon: mdi:pause
name: Stop
show_name: false
tap_action:
action: call-service
service: cover.stop_cover
service_data: {}
target:
entity_id:
- cover.volet_amis_sud_grand_p
- cover.volet_amis_sud_p
type: button
- icon: mdi:arrow-down-bold
name: Fermer
show_name: false
tap_action:
action: call-service
service: cover.close_cover
service_data: {}
target:
entity_id:
- cover.volet_amis_sud_grand_p
- cover.volet_amis_sud_p
type: button
- icon: mdi:weather-sunset-up
name: Soleil
show_name: false
tap_action:
action: call-service
service: cover.set_cover_position
service_data:
position: 50
target:
entity_id:
- cover.volet_amis_sud_p
- cover.volet_amis_sud_grand_p
type: button
- elements:
- attribute: current_position
entity: cover.volet_amis_sud_grand_p
style:
color: '#44739E'
font-size: 16px
font-weight: bold
left: 50%
top: 50%
suffix: '%'
tap_action:
action: more-info
type: state-label
image: /local/images/carre_orange.png
type: picture-elements
view_layout:
position: sidebar
columns: 6
square: true
type: grid
type: vertical-stack
- cards:
- name: PORTES
styles:
card:
- text-transform: uppercase
- color: white
- font-size: 125%
- border-radius: 0%
- font-weight: bold
- letter-spacing: 10px
type: custom:button-card
- cards:
- entity: binary_sensor.detecteur_petite_porte_sous_sol
name: Ssol
show_icon: true
show_label: false
show_name: true
size: 70%
state:
- color: green
icon: mdi:door
value: 'off'
- color: red
icon: mdi:door-open
value: 'on'
- color: yellow
icon: mdi:door
operator: default
styles:
card:
- animation: blink 2s ease infinite
tap_action:
action: more-info
theme: Mushroom
type: custom:button-card
- entity: binary_sensor.porte_cellier
name: Cellier
show_icon: true
show_label: false
show_name: true
size: 70%
state:
- color: green
icon: mdi:door
value: 'off'
- color: red
icon: mdi:door-open
value: 'on'
- color: yellow
icon: mdi:door
operator: default
styles:
card:
- animation: blink 2s ease infinite
tap_action:
action: more-info
theme: Mushroom
type: custom:button-card
- entity: binary_sensor.detecteur_porte_entree
name: Entrée
show_icon: true
show_label: false
show_name: true
size: 70%
state:
- color: green
icon: mdi:door
value: 'off'
- color: red
icon: mdi:door-open
value: 'on'
- color: yellow
icon: mdi:door
operator: default
styles:
card:
- animation: blink 2s ease infinite
tap_action:
action: more-info
theme: Mushroom
type: custom:button-card
columns: 6
square: true
type: grid
- name: VOLETS
styles:
card:
- text-transform: uppercase
- color: white
- font-size: 125%
- border-radius: 0%
- font-weight: bold
- letter-spacing: 10px
type: custom:button-card
- entities:
- entity: input_select.volets
name: Mode de Fonctionnement
- entities:
- entity: sun.sun
name: Position
- entity: sensor.heure_leve_soleil
name: Levé
- entity: sensor.heure_couche_soleil
name: Couché
entity: sensor.heure_leve_soleil
icon: mdi:weather-sunny
name: Soleil
show_state: false
type: custom:multiple-entity-row
- entities:
- entity: sensor.bh1750_illuminance
name: mesure
- entity: input_number.luminosite_seuil_bas
name: Bas
- entity: input_number.luminosite_seuil_haut
name: Haut
entity: input_number.luminosite_seuil_bas
icon: mdi:weather-sunny
name: Auto Hiver
show_state: false
type: custom:multiple-entity-row
- entities:
- entity: input_datetime.horaire_ete_volet_ouv
name: Ouv
- entity: input_datetime.horaire_ete_volet_ferm
name: Ferm
entity: input_datetime.horaire_ete_volet_ouv
icon: mdi:clock
name: Auto Ete
show_state: false
type: custom:multiple-entity-row
- entities:
- entity: input_boolean.nuit_jour
name: N/J (Actif)
- entity: input_boolean.presence_amis_bureau
name: Amis Bur
- entity: input_boolean.presence_amis_ch_nord
name: Amis Nord
- entity: input_boolean.presence_amis_ch_sud
name: Amis Sud
entity: input_boolean.nuit_jour
icon: mdi:account
name: Communs
show_state: false
type: custom:multiple-entity-row
- entities:
- entity: automation.4_1_3_volet_suivi_azimuth_soleil_dupliquer
name: Automs
- entity: sensor.vp2_radiation_moyenne
name: Radia
entity: sensor.vp2_radiation_moyenne
icon: mdi:weather-sunny
name: Ass Sol
show_state: false
type: custom:multiple-entity-row
- entities:
- entity: binary_sensor.position_soleil_matin
name: Mat
- entity: binary_sensor.position_soleil_midi
name: Mid
- entity: binary_sensor.position_soleil_am
name: AM
- entity: sensor.sun_elevation
name: Elev
entity: sensor.sun_elevation
icon: mdi:weather-sunny
name: Position Sol
show_state: false
type: custom:multiple-entity-row
- align: split
color: grey
columns: 1
entities:
- entity: sensor.sun_azimuth
max: '360'
name: Azimuth
severity:
- color: green
from: '103'
to: '137'
- color: green
from: 160
to: 239
show_icon: true
style: |
ha-card {
--paper-card-background-color: 'rgba(0, 0, 0, 0.0)';
--ha-card-background: "rgba(0, 0, 0, 0.0)";
--ha-card-box-shadow: 'none';
}
title_position: inside
type: custom:bar-card
unit_of_measurement: °
how_header_toggle: false
style: |
ha-card {
border: solid 2px var(--primary-color);
}
type: entities
type: vertical-stack
items_classes: col-xs-12 col-sm-6 col-md-6 col-lg-6
padding: true
type: custom:dwains-flexbox-card
Conclusion:
Un fonctionnement basique qui n’a rien d’exceptionnel mais bougrement pratique. J’espère que cela donnera des idées à certain d’entre vous.
bonjour,
Je tente de faire la même chose, mais le code disponible »ICI’ ne l’est pas…
»j’utilise l’excellente l’intégration HACS dwain dashboard. Le code est disponible ici. »
Ou puis je le trouver SVP ? en PJ dans le retour de la réponse, possible ?
merci d’avance pour la réponse et l’aide.
A bientôt
Bonjour
Effectivement je n’utilise plus « Dwain dasshboard » car sa V3 ne me convient pas, mais j’ai gardé les « custom:dwains-flexbox-card » de la V2.
J’ai mis à jour l’article
@+