-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Battery Level for sensors #162
Comments
It seems to only be this way for motion sensors. I'm seeing this error in the logs:
And my typical battery sensor config (works on door/window sensors fine): - platform: mqtt
name: "Front Door Sensor Battery"
state_topic: "zigbee2mqtt/0x00158d000239f6ee"
unit_of_measurement: '%'
value_template: "{{ value_json.battery | int }}" |
I only did the temp sensor battery because it was worryingly low. I’ll do the motion tomorrow and report back. Sent with GitHawk |
Great, thanks @ryanbeaton . |
@ciotlosm I understand, and I've noticed this on my other working sensors. So far the behaviour is a little odd on the motion sensors but some other odd behaviour on the temp sensors. Here is the output when I run mosquitto_sub -v -t '#' in hassio:
The second and third entry are both temp sensors that are the same model (MiJia). One shows battery but the other doesn't, yet in my battery sensor list they look fine: |
Battery it's sent periodically between 1 hour and a few unless you press the button on some devices. You can set retain on messages to get around this problem on restarts |
@ciotlosm Yes, I'm aware, which is why I'm stumped as to why it's only just populated overnight. I've been monitoring for at least 6 hours for these levels to appear. |
I'll close this issue for now, I have more sensors to add but if I face any further issues i'll raise a new one and link. Thanks. |
I’ve been adding a few sensors to my setup and have created additional MQTT battery sensors for each device using the json parameter, but even after a few restarts and even pair/unpairing, I’m struggling to have the values appear on some devices. I’ve even tried leaving them over a few days to poll but still nothing appears.
Any idea what would be the cause? I’m using discovery, perhaps I should try manual sensor config for each?
The text was updated successfully, but these errors were encountered: