AutomationDataset/tochy83/tochy83_automations.yaml

133 lines
3.6 KiB
YAML

- id: msunpv_update_progh
alias: msunpv - Mise à jour affichage programmation horaire
description: Force un refresh de msunpv_proghoraire_xml après avoir charger le page
correspondante du routeur à l'aide de la shell_command.msunpv_enable_progh.
triggers:
- trigger: state
entity_id:
- sensor.msunpv_timerballon_1
to: unavailable
for:
hours: 0
minutes: 2
seconds: 0
conditions: []
actions:
- action: shell_command.msunpv_enable_progh
data: {}
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- action: homeassistant.update_entity
data: {}
target:
entity_id: sensor.msunpv_proghoraire_xml
mode: single
- id: msunpv_update_progh
alias: msunpv - Mise à jour affichage programmation horaire
description: Force un refresh de msunpv_proghoraire_xml après avoir charger le page
correspondante du routeur à l'aide de la shell_command.msunpv_enable_progh.
triggers:
- trigger: state
entity_id:
- sensor.msunpv_timerballon_1
to: unavailable
for:
hours: 0
minutes: 2
seconds: 0
conditions: []
actions:
- action: shell_command.msunpv_enable_progh
data: {}
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- action: homeassistant.update_entity
data: {}
target:
entity_id: sensor.msunpv_proghoraire_xml
mode: single
- id: msunpv_compteurs_cumulus_forcage_routage
alias: msunpv_compteurs_cumulus_forcage_routage
description: Permet de faire la bascule entre l'energie forcée et l'energie routée
dans le cumulus
triggers:
- trigger: template
value_template: '{{ is_state(''sensor.msunpv_cmd_s1'', [''0'',''4'',''8'']) }}'
variables:
tariff: routee
- trigger: template
value_template: '{{ is_state(''sensor.msunpv_cmd_s1'', [''1'',''5'',''9'']) }}'
variables:
tariff: forcee
conditions: []
actions:
- action: select.select_option
metadata: {}
data:
option: '{{ tariff}} '
target:
entity_id: select.msunpv_routbal_daily
- action: select.select_option
metadata: {}
data:
option: '{{ tariff}} '
target:
entity_id: select.msunpv_routbal_monthly
- action: select.select_option
metadata: {}
data:
option: '{{ tariff}} '
target:
entity_id: select.msunpv_routbal_yearly
mode: single
- id: msunpv_update_thermostats
alias: msunpv - Mise à jour affichage thermostats
description: Force un refresh de msunpv_thermostats_xml après avoir charger la page
correspondante du routeur à l'aide de la shell_command.msunmsunpv_enable_thermostatspv_enable_progh.
triggers:
- trigger: state
entity_id:
- sensor.msunpv_consign_th_1
to: unavailable
for:
hours: 0
minutes: 2
seconds: 0
conditions: []
actions:
- action: shell_command.msunpv_enable_thermostats
data: {}
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- action: homeassistant.update_entity
data: {}
target:
entity_id: sensor.msunpv_thermostats_xml
mode: single
- id: msunpv_save_sd_file
alias: msunpv - Sauvegarde des fichiers de la carte sd
description: Sauvegarde les fichiers présents sur la carte sd du msunpv, sur le
disque dur de home assistant. Tous les jours à 00h05 le fichier de la veille est
sauvegardé.
triggers:
- trigger: time
at: 00:05:00
conditions: []
actions:
- action: downloader.download_file
metadata: {}
data:
overwrite: false
subdir: '{{ states(''sensor.msunpv_folder_csv_file'') }}'
url: '{{ states(''sensor.msunpv_url_csv_file'') }}'
mode: single