Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95493

Precision of event when sun elevation equals a given number

$
0
0

@Piscenois wrote:

Hi !

Probably a noob question but I didn’t find the answer. :yum:
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

Read full topic


Viewing all articles
Browse latest Browse all 95493

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>