@Piscenois wrote:
Hi !
Probably a noob question but I didn’t find the answer.
I want to do something when the elevation is -12°. I have this piece of automation.yaml :alias: Crépuscule nautique trigger: - below: '-12' entity_id: sun.sun for: 0:05:00 platform: numeric_state value_template: '{{ state_attr(''sun.sun'', ''elevation'') | float }}' condition: - condition: template value_template: '{{ state_attr(''sun.sun'', ''rising'') == false }}' action: - data: message: crépuscule nautique, élévation = {{ state_attr('sun.sun', 'elevation') }} title: soleil service: persistent_notification.create
Last evening it produced this message :
crépuscule nautique, élévation = -24.38
The day before the elevation was about -18.
How can I trigger the action when elevation is exactly -12 of close value ?I notice too that the time for the sun phases are wrong, error of several minutes. My location is fine. I compared with SunCalc. I you know why …
Posts: 5
Participants: 2