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

Change how battery status is displayed

$
0
0

I have a rtl433 listening to my weather station. Data is sent to my mqtt broker, and looks like this:

  {
    "time": "2025-05-18 21:45:35",
    "model": "Vevor-7in1",
    "id": 11564,
    "channel": 0,
    "battery_ok": 1,
    "temperature_C": 16.9,
    "humidity": 55,
    "wind_avg_km_h": 0,
    "wind_max_km_h": 0,
    "wind_dir_deg": 298,
    "rain_mm": 40.775,
    "uv": 0,
    "light_lux": 63,
    "mic": "CHECKSUM",
    "mod": "FSK",
    "freq1": 868.38867,
    "freq2": 868.23021,
    "rssi": -0.108707,
    "snr": 26.47247,
    "noise": -26.5812
  }

As you can see, the battery status is transmitted as “battery_ok”: 1.
No percentage, just 1.

The yaml file I’m using to get the status on the dashboard is this:

  - name: "Weerstation batterij"
    unique_id: "weather_battery"
    force_update: true
    payload_on: 1
    payload_off: 0
    state_topic: "rtl_433/Vevor-7in1/11564"
    value_template: "{{ value_json.battery_ok }}"

However, this is shown as
Weerstation batterij On

I believe it would be nicer to show the status as OK as long as the status returned equals 1, and maybe something like Weak when the status returned equals 0.

Is this possible in any way ?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 107868


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