tsightler / ring-mqtt

Ring devices to MQTT Bridge
MIT License
583 stars 104 forks source link

HA logs show "invalid state message" for battery #634

Closed picotrain77 closed 1 year ago

picotrain77 commented 1 year ago

Describe the Bug

HA Logs constant warnings relating to invalid state message for battery, however battery entities always appear to show correctly in HA

Steps to Reproduce

nothing, simply having addon running

Expected Behavior

No logs

Log Output

Errors in HA Logs:
Logger: homeassistant.components.mqtt.sensor
Source: components/mqtt/sensor.py:321
Integration: MQTT (documentation, issues)
First occurred: 08:37:56 (297 occurrences)
Last logged: 16:42:20

Invalid state message '{"batteryLevel":43,"batteryLife":43}' from 'ring/REDACTED/camera/1234/info/state'
Invalid state message '{"batteryLevel":40,"batteryLife":40}' from 'ring/REDACTED/camera/5678/info/state'
....
These repeat for all 4 battery devices (door bells).

No errors in Addon Log, but battery info present in logs:
2023-05-17T15:42:20.092Z ring-attr [Back Door (Home)] ring/REDACTED/camera/1234/battery/attributes {"batteryLevel":95,"batteryLife":95}
2023-05-17T15:42:20.097Z ring-attr [Front Door (Home)] ring/REDACTED/camera/5678/info/state {"batteryLevel":40,"batteryLife":40}

Screenshots

No response

Config File

mqtt_url: mqtt://auto_username:auto_password@auto_hostname
mqtt_options: ""
livestream_user: ""
livestream_pass: ""
disarm_code: ""
enable_cameras: true
enable_modes: false
enable_panic: false
branch: addon
debug: ring-*
location_ids: []

Install Type

HA Addon

Version

v5.2.2

Operating System

HAOS

Architecture

x86_64

Machine Details

Intel Nuc i3

tsightler commented 1 year ago

Snippets of logs won't help here. Please provide full ring-mqtt logs or issue will be closed.