Skip to content

Commit

Permalink
Merge branch 'make-all:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Waz-Cpt committed Feb 12, 2024
2 parents 0fed26c + 7ec76dc commit b69d2ad
Show file tree
Hide file tree
Showing 146 changed files with 3,136 additions and 325 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
python-version: ['3.12']

steps:
- uses: actions/checkout@v3
Expand Down
19 changes: 18 additions & 1 deletion ACKNOWLEDGEMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ Further device support has been made with the assistance of users. Please consid
- [Die-Meester](https://github.com/Die-Meester) for contributing support for CBI Astute smart switches.
- [ResteNarquois](https://github.com/ResteNarquois) for assisting with support for Zemismart roller shades.
- [grangoni](https://github.com/grangoni) for contributing support for PH-W218 water quality monitors.
- [antonio1475](https://github.com/antonio1475) for contributing support for Rojeco pet feeders and assisting with support for Mellerware and Lefant N3 vacuums.
- [antonio1475](https://github.com/antonio1475) for contributing support for Rojeco pet feeders and assisting with support for Mellerware and Lefant N3 vacuums, and IR controller pro.
- [erelke](https://github.com/erelke) for contributing Hungarian translations and support for EARU breakers, simple contact sensor, simple gate opener, and smart siren alarms.
- [p-owerscripter](https://github.com/p-owerscripter) for contributing support for KKMoon air quality monitors.
- [cataseven](https://github.com/cataseven) for contributing support for SM07-8 sprinkler controllers.
Expand Down Expand Up @@ -476,3 +476,20 @@ Further device support has been made with the assistance of users. Please consid
- [ceinmart](https://github.com/ceinmart) for assisting with support for Moes 4-gang switches.
- [mihasybn](https://github.com/mihasybn) for assisting with support for Idea Heating Belt air conditioners.
- [feeling001](https://github.com/feeling001) for contributing support for EcoPoint EV chargers.
- [a-r-j-a-n](https://github.com/a-r-j-a-n) for contributing support for Poolex Arctic spa pool heatpumps.
- [Geek-MD](https://github.com/Geek-MD) for contributing support for generic 2 outlet + 2 USB smartplugs.
- [TwoWheelPro](https://github.com/TwoWheelPro) for contributing support for Holman WX8 irrigation controllers.
- [scrampker](https://github.com/scrampker) for assisting with support for Ironzon fingerprint locks.
- [sergeymatsay](https://github.com/sergeymatsay) for assisting with support for Avatto ME81 thermostats.
- [hrenki](https://github.com/hrenki) for assisting with support for Tesla TAF series air conditioners.
- [FSJHecker](https://github.com/FSJHecker) for contributing support for CleanAir 604B humidifiers.
- [sambarlick](https://github.com/sambarlick) for contributing support for Kogan bladeless fans and Y12 and Y16 air conditioners.
- [AproveIPD](https://github.com/AproveIPD) for assisting with support for Tonepie T1PRO cat litter boxes.
- [hyperb1iss](https://github.com/hyperb1iss) for contributing a fix for lights in HA 2024.2
- [mikekornikh](https://github.com/mikekornikh) for assisting with support for Moes IR/RF remote controllers.
- [lowebb](https://github.com/lowebb) for contributing support for Wärme Designer wall panel heaters.
- [mmorenocab](https://github.com/mmorenocab) for assisting with support for Meterk single phase clamp meters.
- [KoKolaj](https://github.com/KoKolaj) for assisting with support for Tesla Smart XL dehumidifiers.
- [BenJamesAndo](https://github.com/BenJamesAndo) for contributing support for Lexi Lighting string light WiFi adapters.
- [LordPsycho202](https://github.com/LordPsycho202) for contributing support for Leo's Loo Too pet toilets.
- [RoelDU](https://github.com/RoelDU) for assisting with support for Mirabella Genio Pixel oval lights.
25 changes: 20 additions & 5 deletions DEVICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
- Sonnenkonig Eco 700 IR panel heater (probably also other Eco/Elegance series heaters)
- Taurus Agadir Connect oil column heaters
- Touchstone Sideline electric fireplace
- Wärme Designer wall panel heater
- Wetair WCH-750 heater

### Air Conditioners / Heatpumps
Expand All @@ -70,7 +71,7 @@
- Fisher Summer air conditioner
- Idea Heating Belt (with CS1 USB dongle)
- Inventor Leon (Tokens Legend series) air conditioner
- Kogan 2.6kW portable air conditioner
- Kogan portable air conditioners (Y09, Y12, Y16)
- Lyfco OL-A012 air conditioner
- Monzana Klimaanlage air conditioner
- Nedis ACMB1WT12 portable air conditioner
Expand All @@ -82,6 +83,7 @@
- Star-Light air conditioner (also confirmed to work with Polar branded devices)
- Suntec Wellness Coolfixx portable air conditioner
- Tadiran Wind 65/3P
- Tesla Smart TAF series air conditioner
- TroniTechnik Hellnar Klimagerät
- Trotec PAC-W 2600 SH heatpump
- Vivax Cool ACP-12CH35REWI
Expand All @@ -99,7 +101,7 @@
- Madimack Eco pool heatpump
- Madimack Elite V3 pool heatpump
- Madimack(model unknown) pool heatpump (seems to match Fairland IPH45 as well)
- Poolex Silverline, Q-7, Q-line and Vertigo heatpumps
- Poolex Silverline, Q-7, Q-line, Arctic and Vertigo heatpumps
- Remora pool heatpump
- W'eau pool heatpump (simple model and a more complex 13kW model)

Expand All @@ -122,9 +124,10 @@
### Thermostats

- Arlec PCTH01HA temperature/humidity smart switch
- Avatto ME81 thermostat
- Avatto WT100 thermostat
- Awow/Mi-heat TH213 thermostat (two variants)
- Beca BAC-002 thermostat
- Beca BAC-002 thermostat (confirmed on BAC-005 also, likely works with other BAC-00x models)
- Beca BHT-002/3000 floor heating thermostat (with external temp sensor)
- Beca BHP-6000 room heat pump control thermostat
- Beca BHT-6000/8000 floor heating thermostat
Expand Down Expand Up @@ -173,6 +176,7 @@
- Casafan ECO Neo III ceiling fan with light
- Cecotec ceiling fan with light
- Chanfok ceiling fan with cool/warm white dimmable light
- CleanAir 604B humidifier
- Deta fan controller
- Djive ARC humidifying fan
- Duux Whisper Flex pedestal fan
Expand All @@ -185,6 +189,7 @@
- Immax Neo Lite Vento ceiling fan with light
- Ledkia fan and light controller
- Lexy F501 fan
- Kogan bladeless fans
- Mantra ceiling fan with light
- Ovlaim ceiling fan with cool/warm white dimmable light
- Reiga 52 ceiling fan with light
Expand Down Expand Up @@ -219,7 +224,7 @@
- Smartmi E1 air purifier
- Soleusair A02 and A10 air purifiers
- Stadler Form Roger air purifier
- Tesla Pro and Mini air purifiers
- Tesla Smart Pro and Mini air purifiers
- Vork VK6067AW air purifier

### Dehumidifiers
Expand Down Expand Up @@ -257,6 +262,7 @@
- Kogan SmarterHome 7L desiccant dehumidifier
- Pro Breeze 30L dehumidifier
- Shinco 30D dehumidifier (also matches Klarstein DryFy Connect)
- Tesla Smart XL dehumidifier
- VacPlus dehumidifier
- Vivosun DE0003 dehumidifier

Expand All @@ -282,7 +288,7 @@
- Cadance ultrasonic aroma diffuser with light and music playback
- Ditua DT-1522-YN aroma diffuser
- Etersky aroma diffuser with light
- Tesla aroma diffuser with light
- Tesla Smart aroma diffuser with light
- YX316WIFI aroma diffuser
- YYM-805SW aroma diffuser with light (also supports GX Aroma diffuser)

Expand Down Expand Up @@ -312,6 +318,7 @@
- EARU SW RCB breaker
- eMylo EAI-90 smart meter
- MatSee Plus bidirectional two channel clamp meter
- Meterk single phase clamp meter
- Parkside PG/PMW-300 solar inverter
- PC311-TY 2 phase power clamp meter
- PC321-TY 3 phase power clamp meter
Expand Down Expand Up @@ -390,6 +397,7 @@ generic configurations that basically follow Tuya's templates with
different features enabled, so are known to work with multiple brands
of device.

- 2 outlet plus 2 USB smartplug with individual timers
- 4 way power monitoring strip (2 types)
_confirmed as working with Kogan KASPS10A3P3UA 3 socket + USB powerstrip_
- 4 way powerstrip with USB
Expand Down Expand Up @@ -444,10 +452,12 @@ of device.
- HDMI sync light
- iHD001 LED controller
- Kojima motion sensor RGBCW nightlight
- Lexi Lighting string light Wifi adapter
- Loycco sound machine with nightlight (also sold as Momland nightlight with white noise)
- Loginovo TV sync backlight
- Lytmi Fantasy/Neo 3 HDMI sync backlight
- Marpou RGBCW ceiling light
- Mirabella Genio Pixel LED oval light
- Moes dimmer switch
- Moes motion sensor lights (XZ-CGV3)
- Moes star projector
Expand Down Expand Up @@ -574,6 +584,7 @@ port and password.
### Remote controllers

- Arlec HUBRF06HA RF 8x8 learning remote transmitter
- Moes IR/RF remote controller (also IR controller pro, may work only for IR)
- Universal remote control with temperature and humidity sensors

### Miscellaneous
Expand All @@ -596,11 +607,13 @@ port and password.
- Haier Nayun NY-GS-04 combustible gas alarm
- Holman WX1 tap timer (sprinkler controller)
- Holman WX2 dual tap timer
- Holman WX8 8 sprinkler irrigation controller
- Inkbird PTH-9CW air quality monitor
- KKMoon 7in1 air quality monitor
- Kogan bidet toilet seat
- Kogan KAWHTNOSLPA white noise sleep aid
- Konlen/Rockson WF96L water level controller
- Leo's Loo Too pet toilet
- Mirabella Genio motion sensor
- Momcozy white noise machine (2 variants)
- Nedis WIFISA10CWT air quality monitor
Expand All @@ -615,6 +628,7 @@ port and password.
- SWS-001 smart weather station
- TH08 temperature and humidity sensor
- TH16 temperature and humidity sensor
- Tonepie T1PRO automatic cat litter box
- Tontine electric blanket
- Valehaus SYZN119 towel warmer
- WeatherStation Pro
Expand All @@ -633,6 +647,7 @@ port and password.
- Diivoo WT05 dual water timer
- HCT-611 water timer
- HU06 smart lock
- Ironzon fingerprint lock
- Orion DL021HA lock
- PT216/PT19DB-2 temperature and humidity sensor
- Smart Ape solar garden light
Expand Down
16 changes: 10 additions & 6 deletions custom_components/tuya_local/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,30 +199,34 @@ def min_temp(self):
"""Return the minimum supported target temperature."""
# if a separate min_temperature dps is specified, the device tells us.
if self._mintemp_dps is not None:
return self._mintemp_dps.get_value(self._device)
min = self._mintemp_dps.get_value(self._device)
if min is not None:
return min

if self._temperature_dps is None:
if self._temp_low_dps is None:
return None
r = self._temp_low_dps.range(self._device)
else:
r = self._temperature_dps.range(self._device)
return DEFAULT_MIN_TEMP if r is None else r["min"]
return DEFAULT_MIN_TEMP if r is None else r[0]

@property
def max_temp(self):
"""Return the maximum supported target temperature."""
# if a separate max_temperature dps is specified, the device tells us.
if self._maxtemp_dps is not None:
return self._maxtemp_dps.get_value(self._device)
max = self._maxtemp_dps.get_value(self._device)
if max is not None:
return max

if self._temperature_dps is None:
if self._temp_high_dps is None:
return None
r = self._temp_high_dps.range(self._device)
else:
r = self._temperature_dps.range(self._device)
return DEFAULT_MAX_TEMP if r is None else r["max"]
return DEFAULT_MAX_TEMP if r is None else r[1]

async def async_set_temperature(self, **kwargs):
"""Set new target temperature."""
Expand Down Expand Up @@ -280,15 +284,15 @@ def min_humidity(self):
if self._humidity_dps is None:
return None
r = self._humidity_dps.range(self._device)
return DEFAULT_MIN_HUMIDITY if r is None else r["min"]
return DEFAULT_MIN_HUMIDITY if r is None else r[0]

@property
def max_humidity(self):
"""Return the maximum supported target humidity."""
if self._humidity_dps is None:
return None
r = self._humidity_dps.range(self._device)
return DEFAULT_MAX_HUMIDITY if r is None else r["max"]
return DEFAULT_MAX_HUMIDITY if r is None else r[1]

async def async_set_humidity(self, humidity: int):
if self._humidity_dps is None:
Expand Down
7 changes: 7 additions & 0 deletions custom_components/tuya_local/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,13 @@ def _refresh_cached_state(self):
self.name,
log_json(new_state),
)
if "Err" in new_state:
_LOGGER.warning(
"%s protocol error %s: %s",
self.name,
new_state.get("Err"),
new_state.get("Error", "message not provided"),
)
_LOGGER.debug(
"new state (incl pending): %s",
log_json(self._get_cached_state()),
Expand Down
7 changes: 4 additions & 3 deletions custom_components/tuya_local/devices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,9 @@ Either **position** or **open** should be specified.
- **switch** (optional, boolean): a dp to control the power state of the fan
- **preset_mode** (optional, mapping of strings): a dp to control different modes of the fan.
Values `"off", low, medium, high` used to be handled specially by HA as deprecated speed aliases. If these are the only "presets", consider mapping them as **speed** values instead, as voice assistants will respond to phrases like "turn the fan up/down" for speed.
- **speed** (optional, number 0-100): a dp to control the speed of the fan (%).
scale and step can be used to convert smaller ranges to percentages, or a mapping for discrete values.
- **speed** (optional, number): a dp to control the speed of the fan (%).
if a range is supplied, it will be automatically scaled to the 0-100 range.
if a mapping is used for dicrete steps, the values must be mapped within that range.
- **oscillate** (optional, boolean): a dp to control whether the fan will oscillate or not.
- **direction** (optional, string): a dp to control the spin direction of the fan.
Valid values are `forward, reverse`.
Expand All @@ -603,7 +604,7 @@ Humidifer can also cover dehumidifiers (use class to specify which).

### `light`
- **switch** (optional, boolean): a dp to control the on/off state of the light
- **brightness** (optional, number 0-255): a dp to control the dimmer if available.
- **brightness** (optional, number): a dp to control the dimmer if available. If a range is provided, the value will be automatically scaled into the 0-255 range for HA, so there is no need to provide a scale. If there is a fixed list of mappings, the values should be between 0 (off) and 255 (full brightness). If there is no switch dp, a brightness of 0 will be sent to turn the light off.
- **color_temp** (optional, number): a dp to control the color temperature if available. See `target_range` above for mapping Tuya's range into Kelvin.

- **rgbhsv** (optional, hex): a dp to control the color of the light, using encoded RGB and HSV values. The `format` field names recognized for decoding this field are `r`, `g`, `b`, `h`, `s`, `v`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ secondary_entities:
min: 0
max: 100
optional: true
mapping:
- scale: 0.392
- id: 109
name: rgbhsv
type: base64
Expand Down Expand Up @@ -173,8 +171,6 @@ secondary_entities:
range:
min: 0
max: 100
mapping:
- scale: 0.392
- id: 110
name: rgbhsv
type: base64
Expand Down Expand Up @@ -219,8 +215,6 @@ secondary_entities:
range:
min: 0
max: 100
mapping:
- scale: 0.392
- id: 111
name: rgbhsv
type: base64
Expand Down
4 changes: 1 addition & 3 deletions custom_components/tuya_local/devices/arlec_19speed_fan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ primary_entity:
name: speed
type: integer
range:
min: 0
min: 1
max: 19
mapping:
- scale: 0.19
- id: 5
name: oscillate
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ primary_entity:
range:
min: 1
max: 3
mapping:
- scale: 0.03
secondary_entities:
- entity: light
dps:
Expand Down
4 changes: 1 addition & 3 deletions custom_components/tuya_local/devices/arlec_fan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ primary_entity:
name: speed
type: integer
range:
min: 0
min: 1
max: 6
mapping:
- scale: 0.06
- id: 4
name: direction
type: string
Expand Down
5 changes: 1 addition & 4 deletions custom_components/tuya_local/devices/arlec_fan_light.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ primary_entity:
name: speed
type: integer
range:
min: 0
min: 1
max: 6
mapping:
- scale: 0.06
- id: 4
name: direction
type: string
Expand All @@ -39,7 +37,6 @@ secondary_entities:
max: 100
mapping:
- step: 2
scale: 0.392
- id: 11
type: integer
name: color_temp
Expand Down
2 changes: 1 addition & 1 deletion custom_components/tuya_local/devices/asakuki_diffuser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ secondary_entities:
category: config
dps:
- id: 108
type: hex
type: string
name: option
mapping:
- dps_val: "ff00000064ff"
Expand Down
4 changes: 1 addition & 3 deletions custom_components/tuya_local/devices/aspen_asp200_fan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ primary_entity:
type: integer
name: speed
range:
min: 0
min: 1
max: 3
mapping:
- scale: 0.03
- id: 101
type: boolean
name: preset_mode
Expand Down
Loading

0 comments on commit b69d2ad

Please sign in to comment.