Tuya energy monitoring only updating when app is open?

Ok so for everyone still interrested - from the other thread I created I got my answers:

  • It’s normal to not get the updated update_dps function if you install localtuya from HACS, because the latest version released (5.2.1) was BEFORE the update - so the code we can see (and download) on github has not been RELEASED (as an OFFICIAL RELEASED VERSION) yet

  • There is a fork of localtuya that is updated way more frequently (every month or every two months) and has the fix included - it’s this one : https://github.com/xZetsubou/hass-localtuya (Thank you @reste_narquois ! )
    (You can add the repo to HACS if you have it installed by clicking this link : https://my.home-assistant.io/redirect/hacs_repository/?category=integration&repository=hass-localtuya&owner=xZetsubou )

  • (EDIT : and … a few hours ago the rospogrigio fork of localtuya - the one you get by default from HACS without having to touch anything - released a new version - 5.2.2 - and it has the 3.4 fix, so, as of now, the ‘original’ localtuya (the one HACS directs you to install) works out of the box too.!! Yeah !! )

And I tested it - this version (the xZetsubou one) works OUT OF THE BOX (not surprising considering the update_dps function has the 3.4 fix - so the power values are updated at the interval you ask for) - so I highly recommand it for a new user, or if someone needs to reinstall HA - I have so many tuya devices already configured that I won’t make the switch YET, but when / if I need to reinstall, I will definitely use this fork

(It’s up to date - so for example with 3.5 devices starting to appear on the market it would support them, and with a new version every month or two any new fix or feature should be included rapidly. I also like how this fork lets you choose if you want to manually configure the entities, or let it do it automatically)

(There are a few differences from the original that I noticed right away, but they are details, and those differences are not necessarily bad, just needs to know - like how it names entities - like if I add a tuya device “MY TUYA DEVICE” and then configure the entity “POWER”, it names the entity “sensor.my_tuya_device_power” - which is not bad - great actually, but you need to know that, because it doesn’t on the rospogrigio one (the ‘original’ one), so I created a device “MY TUYA DEVICE”, and configured the entity (dp19) as “MY TUYA DEVICE POWER”, and that ends up with an entity names “sensor.my_tuya_device_my_tuya_device_power” lol)

So to sum up : use this fork : https://github.com/xZetsubou/hass-localtuya - Works out of the box - (with the power values updated at the interval you configure) and updated frequently (last version from july) (Again, thank you @reste_narquois) / EDIT : or re-try the “original” rospogrigio one - the one HACS include by default in its repos, the new version 5.2.2 (from today) should update the power values correctly)

3 Likes