Lightning notification

Hi,
I’m trying to set up a notification when lightning is detected. I’m using blitzortung_lightning_counter as the entity of a numeric_state trigger, but I am getting this error.

Error initializing ‘websocket_api’ trigger: In ‘numeric_state’ condition: entity sensor.blitzortung_lightning_counter state ‘Data provided by blitzortung.org’ cannot be processed as a number
Error initializing ‘Lightning Detected’ trigger: In ‘numeric_state’ condition: entity sensor.blitzortung_lightning_counter state ‘Data provided by blitzortung.org’ cannot be processed as a number

Can anyone advise how to use this service in a automation?

Many thanks.

What state does the sensor.blitzortung_lightning_counter entity give if you look at it in Developer tools > States?

I’d assume:

Data provided by blitzortung.org

as suggested in the error message.

EDIT:
I’m installing this from HACS now to take a look.

So, the state of the entity is literally the text ‘Data provided by blitzortung.org’?

Does this entity have any attributes that contain the count you are after? You can see these in Developer tools > States too.

Yup that text appears in the attribution attribute, so I’m going to guess OP ( @pjbeard99 ) has accidentally selected attribution in the attributes option.

unit_of_measurement: ↯
icon: mdi:flash
friendly_name: Lightning Counter
attribution: Data provided by blitzortung.org

My state is 0

Thanks guys for taking the time to look - yep I selected attribution by mistake.

Cheers!

1 Like