Hi,
there is way to use a variable after " after: ?
My variable is “vtramonto”
Thanks
condition:
- condition: time
before: '06:00:00'
after: vtramonto <----**** how is the correct syntax??? ***
mode: single
variables:
vtramonto: >-
{{(as_timestamp(state_attr("sun.sun","next_setting"))|timestamp_local)[-8:]}}
The first input_datetime doesn’t work because you used a template for initial but if you check the documentation for the initial option you will see it doesn’t support templates.
The second input_datetime works because you used a time string for initial which is the only thing it supports.
You’re making an erroneous assumption that every option supports a template. Only some options support templates and the documentation usually tells you which ones do.
Workaround for what exactly? If you mean for the Time Condition then consider using a Template Condition. Let me know if you need help composing the template.
They are displayed in UTC but converted to local time when used by sun.sun to determine when sunrise and sunset occur in your location. It uses the timezone you set in Configuration > General to determine your local time.
Taras,
are you sure? My location is correct (Italy, CEST) but the value sun.sun are Utc!
(the sunset of today is 20.23)
Many thanks for your help !!!
PS: I will try with sunset & sunrise value.