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

Rogue sun elevation trigger. Two elevation events in one evening

$
0
0

@xbmcnut wrote:

Running 0.108.3 but been doing this as far as I can tell for the last 3 or 4 weeks so maybe popped up in 107??

I have a notification that triggers on a sun elevation event and turns my PTZ so it looks at the sunset then it sends the picture to my Android TV. I know…very cool aye :wink:

Problem is, it triggers at sunset like it supposed to and it just triggered again at 1156 pm! Anyone see an issue with the trigger?

  - alias: 'Take sunset snapshot and send to TV'
    initial_state: true    
    trigger:
      platform: numeric_state
      entity_id: sun.sun
      value_template: "{{ state_attr('sun.sun', 'elevation') }}"
      below: 0.3
    condition:
      - condition: template
        value_template: >-
          {% set season = states('sensor.season') %}
          {{ season == 'autumn' or season == 'summer' }}      
    action:
      - service: rest_command.move_to_preset_05_07s # view preset defined in #
      - delay: '00:00:05'    
      - service: camera.snapshot
        data:
            entity_id: camera.proxy_deck_720_2fps
            filename: '/config/www/images/sunset.jpg'
## Adds a condition inside actions. More info here https://www.home-assistant.io/docs/automation/action/ 
      - condition: state
        entity_id: media_player.sony_bravia_tv
        state: 'on'            
      - delay: 00:00:02
      - service: rest_command.androidtv_sunset_view 

Image shows an approximate time when HA retriggered the automation.

image

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95437

Trending Articles



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