750 Commits

Author SHA1 Message Date
79804e107e Merge remote-tracking branch 'upstream/master' 2025-06-22 09:53:37 -04:00
Michiel De Wilde
9eabc43da2 Deprecation fix: use VacuumActivity
This fixes the following reported issue:

STATE_DOCKED was used from localtuya, this is a deprecated constant
which will be removed in HA Core 2026.1. Use VacuumActivity.DOCKED
instead, please report it to the author of the 'localtuya' custom
integration

STATE_ERROR was used from localtuya, this is a deprecated constant
which will be removed in HA Core 2026.1. Use VacuumActivity.ERROR
instead, please report it to the author of the 'localtuya' custom
integration

STATE_IDLE was used from localtuya, this is a deprecated constant
which will be removed in HA Core 2026.1. Use VacuumActivity.IDLE
instead, please report it to the author of the 'localtuya' custom
integration

STATE_PAUSED was used from localtuya, this is a deprecated constant
which will be removed in HA Core 2026.1. Use VacuumActivity.PAUSED
instead, please report it to the author of the 'localtuya' custom
integration

STATE_RETURNING was used from localtuya, this is a deprecated constant
which will be removed in HA Core 2026.1. Use VacuumActivity.RETURNING
instead, please report it to the author of the 'localtuya' custom
integration
2025-05-08 09:50:35 +02:00
Michiel De Wilde
2217b09286 Deprecation fix: do not call async_forward_entry_setups in an async task
This fixes the following reported issue:

Detected that custom integration 'localtuya' calls
async_forward_entry_setups for integration localtuya with title:
*** and entry_id: ***, during setup without awaiting
async_forward_entry_setups, which can cause the setup lock to be
released before the setup is done at
custom_components/localtuya/__init__.py, line 275:
await hass.config_entries.async_forward_entry_setups(entry, platforms).
This will stop working in Home Assistant 2025.1, please create a bug
report at https://github.com/rospogrigio/localtuya/issues
2025-05-08 09:50:35 +02:00
Michiel De Wilde
e6bcaa1127 Deprecation fix: use async_register_admin_service
This fixes the following reported issue:

Detected that custom integration 'localtuya' accesses
hass.helpers.service, which should be updated to import functions used
from service directly at custom_components/localtuya/__init__.py,
line 165: hass.helpers.service.async_register_admin_service(. This will
stop working in Home Assistant 2025.5, please create a bug report at
https://github.com/rospogrigio/localtuya/issues
2025-05-08 09:50:35 +02:00
rospogrigio
5f2c027c1e Update manifest.json 2025-01-14 15:05:27 +01:00
Handrail9
01a6f0fa15 Update README.md (#1808)
Tuya integration page shows new information and no longer includes how to get Client ID & Secret. Added those here.

Co-authored-by: rospogrigio <49229287+rospogrigio@users.noreply.github.com>
2025-01-14 15:03:16 +01:00
Tobias Dörfler
12d40f81af fix(common.py) - Change loglevel for missing device configuration from WARNING to DEBUG. (#1816)
Loglevel warning produces a huge amount of log messages (around 500000 a day - depends on how much tuya devices are in your local network).

Co-authored-by: Tobias Dörfler <doerfler.tobias@akdb.de>
Co-authored-by: rospogrigio <49229287+rospogrigio@users.noreply.github.com>
2025-01-14 11:26:26 +01:00
Alex
6202c74e39 add a subset of HVAC_MODE_SETS (#1875)
iPAC-40 Portable Air Conditioning Heat Pump with Wifi and Remote Control. These devices have a limited option of modes. The available modes are Hot, Cold and Dry.

Co-authored-by: rospogrigio <49229287+rospogrigio@users.noreply.github.com>
2025-01-14 11:13:07 +01:00
dim145
1369245b15 fix: climate deprecated attributes 2025-01-14 09:37:19 +01:00
dim145
096568bd20 fix: remove useless test line in status_updated of light 2025-01-14 09:37:19 +01:00
dim145
65f3dafd04 fix: add color_mode property & adapt color mode method (is_xxx_mode) 2025-01-14 09:37:19 +01:00
dim145
b01861d53e fix: add FanEntityFeature.TURN_OFF/ON to fans 2025-01-14 09:37:19 +01:00
dim145
42b6eb1fc1 refactor: define MODE_MANUAL 2025-01-14 09:37:19 +01:00
dim145
d57932e8e4 fix: do not use deprecated attr in light entity 2025-01-14 09:37:19 +01:00
dim145
e1fb0f2ccb fix: do not use deprecated features 2025-01-14 09:37:19 +01:00
Andy Barratt
1da7b313d4 Add discovered HVAC and PRESET options (#1177)
* Add discovered HVAC and PRESET options

This commit adds the HVAC Action Set and Preset Set that I've discovered my Bödenwarme Underfloor Heating thermostat to be using as detailed here: https://github.com/rospogrigio/localtuya/issues/1175

* Add HVAC mode and action sets for climate entities

These are the actions and modes as reported by the Magnum smart wifi
thermostat: https://www.magnumheating.com/product/remote-control/

---------

Co-authored-by: Rutger Kerkhoff <rutger.kerkhoff@grafana.com>
2024-09-13 15:04:02 +02:00
Esteban Zapata Rojas
87d61eea6f at init: Replace deprecated async entry setup call with suggestion.
Based on https://developers.home-assistant.io/blog/2024/06/12/async_forward_entry_setups/
it is possible to replace it with `async_forward_entry_setups` instead,
which accepts multiple platforms and it should be more efficient.
2024-07-29 18:04:05 +02:00
34ab80ad93 support boolean for HVAC Eco preset 2024-05-29 13:10:00 -04:00
f27de00793 time for a longhorn reset 2024-05-12 20:03:56 -04:00
112fbeb0dd fix translations 2024-05-11 18:58:17 -04:00
e5c98ab09d apparently i forgor to add the DP field 2024-05-11 18:56:58 -04:00
5beec4d43c lets try this 2024-05-11 17:59:40 -04:00
6ea37e31c2 reverting, breaks localtuya 2024-05-11 10:23:28 -04:00
65f61925c9 add onoff logic 2024-05-11 08:54:27 -04:00
f140290f13 apparently you can't have escape chars in these strings... 2024-05-09 22:02:01 -04:00
24e2887506 fix missing const references 2024-05-09 21:40:18 -04:00
a065a45764 implement UI changes 2024-05-09 21:31:55 -04:00
hello@theauthtoken.com
d2fa4dc2a0 added dict get() instead of assuming keys exist; now handles config_flow setup failures without crashing 2024-05-03 13:19:28 +02:00
Simon Tegelid
7b37f07fd0 Add support for more ac/fan modes (#1389)
* Add support for more ac/fan modes

* Replace deprecated constants with enums

* Add support for ClimateEntityFeature.TURN_{ON,OFF}

* Fix swing log message

---------

Co-authored-by: Simon Tegelid <simon.tegelid@bitvis.io>
2024-04-15 14:28:34 +02:00
rospogrigio
490ad9ed5a Merge pull request #1613 from elad-bar/master
Fix #1610 - Replaced SUPPORT_* with enums
2024-01-22 10:37:33 +01:00
Elad Bar
9c0e733804 Replaced SUPPORT_* with enums, set minimum HA version in HACS configuration to 2024.1.0 2024-01-05 13:29:06 +02:00
rospogrigio
e5009fd3f8 Merge pull request #1476 from ncd7/climate-minmax-default-temp-when-in-F-fix
fix bug when climate entity is using default min/max temp and temp un…
2023-09-22 19:16:59 +02:00
rospogrigio
1c173d949a Merge branch 'master' into climate-minmax-default-temp-when-in-F-fix 2023-09-22 17:15:19 +02:00
rospogrigio
180b6645d2 Merge pull request #1135 from ov1d1u/master
Allow calling localtuya.set_dp service by non-admin users
2023-09-22 11:06:43 +02:00
rospogrigio
bf8f2bb06c Merge branch 'master' into master 2023-09-16 13:03:45 +02:00
rospogrigio
0c8fd9d0ec Fixing tox issues 2023-09-15 15:04:40 +02:00
rospogrigio
69774f574a Merge pull request #1465 from Nealium/offline_init
Fixes #1328
2023-09-12 17:43:37 +02:00
rospogrigio
137ff78874 Merge branch 'master' into offline_init 2023-09-12 17:10:50 +02:00
Luke Bonaccorsi
23b0cfde6d Allow port reuse so that other integrations can read the same port (#1481)
Co-authored-by: rospogrigio <49229287+rospogrigio@users.noreply.github.com>
2023-09-12 17:10:28 +02:00
rospogrigio
fa8217cdfb Merge branch 'master' into offline_init 2023-09-12 13:28:45 +02:00
dulyts
25105427b8 Handle 3.4 protocol, fix CI (#1251)
* Use refresh interval in version 3.4
* Scan interval convert to integer
* Try to fix CI
* Try to fix CI
2023-09-12 13:24:39 +02:00
nu
b3afa14095 fix bug when climate entity is using default min/max temp and temp unit is F
The default min/max temps are in C but when the climate entity is set up with F this will cause incorrect boundary check and an inability to change the temperature from the home assistant entity UI widget.
2023-08-17 23:59:53 -04:00
Neal Joslin
62011a9d6b Fixed initialization with API but no internet. 2023-07-25 23:17:59 -04:00
Ovidiu D. Nițan
2b3ade04c7 Merge branch 'rospogrigio:master' into master 2023-07-17 15:43:12 +03:00
rospogrigio
f06e4848e6 Merge pull request #1424 from rospogrigio/fix_socket.send_exceptions
Fix for socket.send() exceptions in the logs
2023-06-07 12:27:31 +02:00
rospogrigio
ba5670fc1d Fixing pylint error 2023-06-07 12:23:41 +02:00
rospogrigio
9d5984e4cf Fix for socket.send() exceptions in the logs 2023-06-07 11:59:31 +02:00
rospogrigio
53e1ad8488 Updated manifest.json 2023-05-24 14:20:18 +02:00
rospogrigio
5f9141790d Fixed tox errors 2023-05-24 11:50:27 +02:00
rospogrigio
928f8e985a Merge branch 'master' into feat-add-entities 2023-05-24 11:27:28 +02:00