Alert based on string status value

Hi guys, wondering if you can help me.

I have a few devices that report Battery status over RF 433hz

The battery status is OK or LOW

What automation could I use to check this. And obviously I’d want to repeat it - not just when the state changes. Thank you

Can you share a bit more info. Like some of the code that you have already done, the name of the sensors, whether the battery info is in a status or attribute, …
Also what do you want to check? I’m guessing you want an alert (what type? / via what component) when the battery goes low?

This I don’t understand. can you clarify?

Here is an extensive thread about this topic (monitoring the battery status of many devices and being alerted repeatedly when it drops below a threshold):

1 Like

So this is what I have sofar

Sensors

  - platform: influxdb
    host: localhost
    queries:
      - name: weatherstation_batt_status
        value_template: '{{ value }}'
        group_function: last
        where: time > now() - 1h
        measurement: '"Acurite 5n1 sensor"'
        field: battery
        database: rtl433

  - platform: influxdb
    host: localhost
    queries:
      - name: uvstation_batt_status
        value_template: '{{ value }}'
        group_function: last
        where: time > now() - 1h
        measurement: '"Oregon Scientific UVR128"'
        field: battery
        database: rtl433

Which produces

Eventually these will go from OK to LOW

One of my existing notifications looks like this

  - alias: Air Data Alert
    trigger:
      platform: numeric_state
      entity_id: sensor.Air_Data_Received_in_2hrs
      below: 13
    action:
      - service: notify.push_bullet
        data:
          target: device/robsphone
          message: "No Air Data received for an hour"
          title: "IoT Data"

But obviously I don’t want it it to only fire once it changes from OK to LOW with the STATE Trigger - i’d like it to fire each day until its OK again.

I suggest having a look at the Alert component. It can be configured to send a message on a periodic basis. However, I don’t believe it can be configure to send once a day (perhaps every 24 hours but that’s counting from the moment the issue is detected).

Let us know if it suits your needs. If not, we can think about another way to meet your requirements.