mrk-its / homeassistant-blitzortung

Custom Component for fetching lightning data from blitzortung.org
MIT License
210 stars 41 forks source link

Lightning Count toggles briefly to unknown at GMT 0:00 (midnight) #55

Open StormyKnight17 opened 2 years ago

StormyKnight17 commented 2 years ago

Clipboard01

Note my Timezone is +10 so 10am is UTC Midnight for me.

I found this by using an automation trigger for the counter of From: 0 To: (BLANK) The idea was to trigger on change from 0 to any other number, but it seems that it goes to 'unknown' at this time of day each day. It doesn't do it at any other time.

Can anyone else confirm this is happening for them?

I have an automation that advises me on any change of the counter value for testing. It is triggering each day at UTC 0:00

alias: TEMP - Lightning Counter Monitor
description: ''
trigger:
  - platform: state
    entity_id:
      - sensor.blitzortung_lightning_counter
condition:
  - condition: not
    conditions:
      - condition: numeric_state
        entity_id: sensor.blitzortung_lightning_counter
        above: '0'
action:
  - service: notify.mobile_app_iphone
    data_template:
      message: |
        {{states('sensor.blitzortung_lightning_counter')}} 
      title: Lightning Count Change In Value
mode: single
snarlingllama commented 2 years ago

Same issue.

snarlingllama commented 2 years ago

Curious though, shouldn't your not condition be set to below 1?

StormyKnight17 commented 2 years ago

Curious though, shouldn't your not condition be set to below 1?

This is just a test automation. It triggers when the state changes anytime except if the state is above 0 i.e. lightning is about.

So it will trigger anytime it changes to undefined or to zero or to any other state not equal to 1 or higher number.

It was to see what & when the non numeric states were occurring to see if there was a pattern & how long it stayed undefined for.