Releases: rospogrigio/localtuya
Fixed deprecated constants
- fixed "deprecated constants which will be removed in HA Core 2025.1" (thanks to all contributors)
- improved fan platform
- other minor improvements or code adjustments
Fix for socket.send() exceptions
Fix for "socket.send() raised exception" errors in the log files.
Add entities and deprecated call fix
Stability fixes
Fixed devices not reconnecting any more in several cases.
Introduced local_key update on device edit.
Improved logging.
Stability fixes
Fixed devices not reconnecting any more in several cases.
Introduced local_key update on device edit.
Improved logging.
Protocol 3.4 and more
- introduced 3.4 protocol! (and incidentally 3.2 as well). Thank you @Monacoslo for providing the test device for the development!
- introduced the possibility to enable the pytuya module debugging only on selected devices, to reduce logs flooding if many devices are present. Debugging has to be enabled in the configuration.yaml file, and then the new button has to be checked when adding/editing a device
- config flow now aborts with message when attempting to remove all entities from a device when editing it
Enjoy!
Fix for 4.1.0
Implementing safe default for devices not requiring RESET/Passive functionality.
This should help get rid of the issues a lot of users have encountered after installing 4.1.0
Thanks @sibowler for the fix provided.
Introduced support for Passive DPS devices, restoring state after power off, and NumberEntity enhancements
This release adds some features and addresses some issues introduced by HA updates. A number of these changes are focused around 'passive DPS' devices; which require a known DPS to be set to a valid value before they will start being returned as part of the status updates. I've debugged the communications between the Tuya App and the device (in my case an Arlec Security Light) and this is how the device is initialised.
Incorporated zombie fix changes from PR #817 and #491 as in further testing with Kogan and Arlec devices, the RESET command was needed to make these 'wake up' when they are disconnected from the internet.
The exact DPIDs passed to the RESET command need to be exactly correct or the devices don't wake up. So a configuration item was added to allow a user to specify the DPIDs to be used to RESET the device, which should allow this change to work with a wider variety of devices. The real credit for this change goes to @Elendilon who did the initial RESET implementation and @lloydw who did a recent port of changes, which made it a lot easier to integrate into this service.
With the Zombie and passive device changes in this PR, it was possible to successfully test/integrate the following devices without them requiring internet access:
Arlec Security Light - MAL315HA
Arlec Smart Plug-in Socket PC399HA
Kogan Smart Powerboard
Kogan Smart PowerPlug with USB
New Features:
Manually specify DPS to setup - used where automatic detection doesn't work.
Manually specify DPS to be used in RESET command - used when device doesn't respond to status requests
Specify default value - Used to initialise a device when reconnecting/after power loss. If not specified, the entity type will default to an appropriate value (either off, a minimum value, or the first state in a select)
Restore state on reconnect - Used to restore the state last seen by HA when a device reconnects. This is useful where a device doesn't persist states between power offs. Currently configured for basic entities (Switch, Number, Select), but can be extended to others in the future.
Step size to NumberEntity - Allow configuring the increment between numbers.
Thank you @sibowler (and all the other mentioned contributors) for the huge work!!
Fix for number entity
Fixes the error "LocaltuyaNumber is overriding deprecated methods".
Thank you @markvader!
Optimized setup_entities by regrouping platforms
Optimized setup_entities by regrouping platforms: this fixes the "Config entry has already been setup!" error some users might encounter.
Thank you @regevbr!