EDIT : Ok so I’m just an idiot and didn’t realize / understand that it’s not because I see the changes on the master branch and in the “zip” file you get from the main page that it was actually in the latest release … The latest release - which is what HACS installs - doesn’t have the crucial code change yet, so it’s normal…
Hi everyone.
I was just wondering if someone who knows a little more about HACS and how it downloads / updates / lists versions and code from repos tell me if I am missing something obvious or if there is a bug / problem :
If you install localtuya (a Tuya Integration that allows to control Tuya Devices locally) from HACS, everything seems to be installing fine, but you don’t get the latest version of the code
One easy way to see it is to look at one file in particular :
custom_components/localtuya/pytuya/__init__.py
line 820 : the version installed by HACS :
if self.version in [3.2, 3.3]: # 3.2 behaves like 3.3 with type_0d
but it’s OLD - doesn’t include 3.4 devices … which is why the code has been updated in localtuya on github … in January 2023 …
if you go look at the current file on github :
line 820 is currently :
if self.version in [3.2, 3.3, 3.4]: # 3.2 behaves like 3.3 with type_0d
(it was updated more than 18 months ago to include 3.4 devices)
I realized this because this ommission of 3.4 in the list (it’s in the update_dps function that forces the update of values) means localtuya doesn’t work properly with some 3.4 devices.(The values are never updated)
I looked at the code in my custom_components folder, realized the update_dps was missing 3.4, and edited it myself and now eveything works … but then I was curious as to why the code was not updated to include the 3.4 devices, went to github, and realized that … well … it was, and for some reason, HACS installs an older version of localtuya, or, at least, of the pytuya/__init__.py file
I checked if I was installing a different repository on HACS, but no, it’s the same : https://github.com/rospogrigio/localtuya
So the question is : am I missing something ? How is HACS getting the code it installs - does it get it directly from github ? Does someone have to manually package it and chose the wrong pytuya file ?
If I am just not undestanding something, can someone explains ? (I am relatively new to HA and HACS - well, a few months now but still - and I only ever used HACS to install localtuya I think, so … maybe I am missing something ?)
If not, who should I contact ? HACS creators, of localtuya creators on github ?
Thanks