Hi all,
I have this automation which do work, to do some action 30 minutes before the sunset:
- alias: Tramonto
trigger:
platform: sun
event: sunset
offset:
minutes: -30
condition:
...
I created an input number to change the amount of minutes and i tried the following:
- alias: Tramonto
trigger:
platform: sun
event: sunset
offset:
minutes: '{{ states.input_number.offset_tramonto }}'
condition:
...
But this gives me the error
Logger: homeassistant.config
Source: config.py:416
First occurred: 23:11:46 (1 occurrences)
Last logged: 23:11:46
Invalid config for [automation]: expected float for dictionary value @ data['offset']['minutes']. Got None. (See /config/configuration.yaml, line 338).
I tried with many castings and templating but nothing. Where is the error?