Bonjour
J’ai créé une « automatisation » pour fermer et ouvrir mes volets en fonction du levé et couché du soleil avec un decalage.
Je souhaitais intégré un input number a la place du décalage fixe.
Mais je n’y arrive pas.
Mon code d’origine est :
- id: '1640362967255'
alias: fermeture volet V1/V3/V4/V5 (nuit)
description: ''
trigger:
- platform: sun
event: sunset
offset: '30'
condition: []
action:
- device_id: 3d895e591024e4ed5860d1bf4999f32c
domain: cover
entity_id: cover.volet_v1
type: close
Mon input :
# ENTREE #
#############
#input_number:
cover_day_offset:
name: Minutes après le lever du soleil
icon: mdi:timer
min: 0
max: 100
step: 10
mode: slider
cover_night_offset:
name: Minutes après le coucher du soleil
icon: mdi:timer
min: 0
max: 100
step: 10
mode: slider
si je change la ligne offset: '30'
par offset: input_number.cover_night_offset
ou offset: "{{ states('input_number.cover_night_offset') | int(0) }}"
?
Le logs m’indique que ce n’est pas bon.
Logger: homeassistant.config
Source: config.py:464
First occurred: 15:07:45 (6 occurrences)
Last logged: 15:11:21
Invalid config for [automation]: offset input_number.cover_night_offset should be format 'HH:MM', 'HH:MM:SS' or 'HH:MM:SS.F' for dictionary value @ data['offset']. Got None. (See /config/configuration.yaml, line 24).
Invalid config for [automation]: offset input_number.cover_day_offset should be format 'HH:MM', 'HH:MM:SS' or 'HH:MM:SS.F' for dictionary value @ data['offset']. Got None. (See /config/configuration.yaml, line 24).
Invalid config for [automation]: offset {{ states('input_number.cover_night_offset') | int(0) }} should be format 'HH:MM', 'HH:MM:SS' or 'HH:MM:SS.F' for dictionary value @ data['offset']. Got None. (See /config/configuration.yaml, line 24).
Invalid config for [automation]: offset {{ states('input_number.cover_day_offset') | int(0) }} should be format 'HH:MM', 'HH:MM:SS' or 'HH:MM:SS.F' for dictionary value @ data['offset']. Got None. (See /config/configuration.yaml, line 24).
J’aurai besoin de votre aide pour appliquer le bon code.