mdegat01 / addon-amr2mqtt

HA Addon which runs rtlamr to read IDM power meter data and send to MQTT broker
MIT License
33 stars 15 forks source link

Water meter not populating MQTT auto-discovery fields correctly #86

Closed jlboygenius closed 1 year ago

jlboygenius commented 1 year ago

Describe the bug I've setup my meter configuration for my water meter. The fields are auto-populated into the MQTT auto-discovery topic incorrectly, which causes HA to not identify the sensor correctly and therefore can't be used in the as an Energy Dashboard water meter consumption sensor.

To Reproduce Meter configuration:

This is populated into the MQTT auto-discovery consumption config, but it is missing the flag for "device_class". It is also tagged as state_class: "total" instead of "total_increasing"

Expected behavior Should populate as state_class: total_increasing device_class: water

Logs

Include any relevant logs

Environment (please complete the following information):

Additional context If i go into MQTT-Explorer and re-publish Homeassistant\sensor******(myid)\consumption\config and add in the device_class and update the state_class, I am able to find the sensor in the Energy Dashboard Config and select the sensor for water consumption.

Changing anything in the AMR2MQTT config and restarting will cause the MQTT settings to be over-written. I then have to go back in and re-add device_class: water and state_class: total_increasing to get things working again.

jlboygenius commented 1 year ago

I took a look at the code and it seemed like a fairly simple fix.

Please review pull request #87

twojciac commented 1 year ago

I'm seeing the same exact issue. Can the maintainer review the pull request and merge if it looks okay?

fabianluque commented 1 year ago

Same here, just got water meter replaced (with a supported one), configured and I'm not able to add to energy dashboard as described above. Is there anything we can do to help merge and release this? Thanks!

JohnnyPicnic commented 1 year ago

Plus one for this. I'm not able to add my water meter or gas meter to the energy dashboard.

jhstroebel commented 1 year ago

Same... got around this by manually configuring by MQTT entities, but its a pain

jlboygenius commented 1 year ago

Sent @mdegat01 a message on Discord. maybe he gets them there? Hopefully has some time to review? Amr2mqtt is great and easy to setup. HA supports water usage tracking. This one little tweak makes it all work together easily.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment šŸ‘ This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

jlboygenius commented 1 year ago

This is still an open issue. Not sure how to grab @mdegat01's attention to accept the pull request though.

JohnnyPicnic commented 1 year ago

I ended up switching to this one https://github.com/cpyarger/Home-Assistant-Addons/tree/main/SDRMR

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment šŸ‘ This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!