├── tests ├── __init__.py ├── devices │ ├── __init__.py │ └── test_simple_switch_with_timer.py └── mixins │ └── lock.py ├── custom_components ├── __init__.py └── tuya_local │ ├── devices │ ├── __init__.py │ ├── simple_switch.yaml │ ├── simple_contact_sensor.yaml │ ├── co2_box.yaml │ ├── simple_lightbulb.yaml │ ├── ble_adaprox_fingerbot.yaml │ ├── basic_ir_remote.yaml │ ├── cc_curtain.yaml │ ├── nwt_7speed_fan.yaml │ ├── nedis_openclose_sensor.yaml │ ├── kogan_glass_1_7l_kettle.yaml │ ├── pir_sensor.yaml │ ├── garage_door_opener.yaml │ ├── zigbee_waterleak_sensor.yaml │ ├── simple_dual_switch.yaml │ ├── avatto_curtain_switch.yaml │ ├── hoenyzy_valve_timer.yaml │ ├── cesmarthome_acwall_outlet.yaml │ ├── lucci_fan.yaml │ ├── ilonda_l88_fishfeeder.yaml │ ├── simple_triple_switch.yaml │ ├── inkbird_pth9cw_airquality.yaml │ ├── windcalm_fan.yaml │ ├── cct_modeless_lightbulb.yaml │ ├── illumanance_sensor.yaml │ ├── illumanance_v2_sensor.yaml │ ├── malmbergs_single_dimmer.yaml │ ├── arlec_ceiling_fan_remote.yaml │ ├── arlec_smart_button.yaml │ ├── simple_switch_timer.yaml │ ├── tmwf02_fan.yaml │ ├── deta_fan.yaml │ ├── loratap_curtain_switch_QCSC400ZB-V2.yaml │ ├── kesser_infrared_heater.yaml │ ├── hunterpacific_9speed_fanlight.yaml │ ├── grid_connect_double_switch.yaml │ ├── mirabella_genio_motion_sensor.yaml │ ├── desk_lamp.yaml │ ├── dimming_light_track.yaml │ ├── jh_pcmini.yaml │ ├── tuya_smart_zigbee_door_sensor.yaml │ ├── mirabella_genio_usb.yaml │ ├── catit_pet_feeder.yaml │ ├── hama_radiator_controller.yaml │ ├── ir_remote_sensors.yaml │ ├── kogan_noise_machine.yaml │ ├── pni_water_feeeder.yaml │ ├── simple_quad_switch.yaml │ ├── topens_wifi_remote_control.yaml │ ├── simple_blinds.yaml │ ├── smartplug_encoded.yaml │ ├── abalon_bcm700d_curtain.yaml │ ├── kesser_infrared_heater_floodlights.yaml │ ├── hauschen_smart_mirror.yaml │ ├── gold_cct_lightbulb.yaml │ ├── thermex_lima80v_waterheater.yaml │ ├── wfws02rj_dual_switch.yaml │ ├── zigbee_zn373186_temphumid_sensor.yaml │ ├── ard100_valve.yaml │ ├── zigbee_zb10wt_temphumid_sensor.yaml │ ├── tesla_pet_feeder.yaml │ ├── zigbee_mir_te100ty_climate_sensor.yaml │ ├── dual_dimmer_module.yaml │ ├── moes_wsyeuc_curtainswitch.yaml │ ├── etersky_curtain_switch.yaml │ ├── s11_rfir_remote.yaml │ ├── zigbee_zth08ztu_temphumid_sensor.yaml │ ├── benexmart_blind_motor.yaml │ ├── yp_petfeeeder.yaml │ ├── simple_gate_opener.yaml │ ├── eurom_600_heater_v2.yaml │ ├── eglo_ceiling_fan.yaml │ ├── carro_pn04f02d_fan_light.yaml │ ├── position_blinds.yaml │ ├── powerstrip_6outlet_usbs.yaml │ ├── eurom_600_heater.yaml │ ├── treatlife_ds02_fan.yaml │ ├── cct_v1_lightbulb.yaml │ ├── deltaco_shlw5m_ledstrip.yaml │ ├── ble_orion_lock.yaml │ ├── iebelong_ech_doorbell_rfhub.yaml │ ├── kogan_garage_opener.yaml │ ├── deta_dimmer_switch.yaml │ ├── dimming_lightbulb.yaml │ ├── th05_temp_humidity_sensor.yaml │ ├── dooya_curtain.yaml │ ├── rl_video_lock.yaml │ ├── gorilla_fan_v2.yaml │ ├── arlec_fan.yaml │ ├── ble_tcs024b_smart_plant_moisture.yaml │ ├── feit_dimmer.yaml │ ├── nue_smart_fan_3speed_light.yaml │ ├── greenwind_dehumidifier.yaml │ ├── linkoze_dual_button.yaml │ ├── blitzwolf_bwshp9_powerstrip.yaml │ ├── nooie_pu13_smartplug.yaml │ ├── th16_temp_humidity_sensor.yaml │ ├── windcalm_fan_with_light.yaml │ ├── brilliant_quad_powerstrip_usb.yaml │ ├── moes_touch_curtain_switch.yaml │ ├── goldair_fan.yaml │ ├── eurom_601_heater.yaml │ ├── tontine_039-WIFI_blanket.yaml │ ├── simple_six_switch.yaml │ ├── petoneer_frescomini_petfountain.yaml │ ├── treatlife_ds03_fan_light.yaml │ ├── goldair_101cm_tower_fan.yaml │ ├── cleverio_ad100_dehumidifier.yaml │ ├── th08_temperature_and_humidity_sensor.yaml │ ├── EM3390TF_weather_station.yaml │ ├── ion_wifi_dimmer.yaml │ ├── warme_gsh_heater.yaml │ ├── wf520d_wifi_dual_touch_dimmer.yaml │ ├── goldair_phet07ea_heater.yaml │ ├── inow_heater_element.yaml │ ├── reiga_ceiling_fan.yaml │ ├── eurom_800_heater.yaml │ ├── teckin_ss42_sockets.yaml │ ├── earu_dpn_circuitbreaker.yaml │ ├── point_panel_heater.yaml │ ├── simple_dual_switch_timer.yaml │ ├── simple_rgbcw_lightbulb.yaml │ ├── curtain_with_feedback.yaml │ ├── pziot_e01_energymeter.yaml │ ├── qs_c01_curtain.yaml │ ├── qoto_03_sprinkler.yaml │ ├── loeffen_LFIM6000_icecubemaker.yaml │ ├── tampa_led_system.yaml │ ├── simple_dual_switch_timer_v2.yaml │ ├── ihunt_50_airpurifier.yaml │ ├── smartmi_e1_purifier.yaml │ ├── somgom_double_switch.yaml │ ├── kogan_kawfhtp_heater.yaml │ ├── smart_mist3_fan.yaml │ ├── asc_wifi_circuit_breaker.yaml │ ├── caldo_up_t_wifi.yaml │ ├── kogan_kahtp_heater.yaml │ ├── giatsu_vaw2_waterheater.yaml │ ├── silvercrest_coffee_maker.yaml │ ├── airquality6in1.yaml │ ├── luko_dehumidifier.yaml │ ├── moes_bht002_thermostat_c.yaml │ ├── arlec_19speed_fan.yaml │ ├── graywind_shades.yaml │ ├── nybro_heater.yaml │ ├── andersson_gsh_heater.yaml │ ├── windmill_airconditioner.yaml │ ├── create_fan_light.yaml │ ├── electriq_cd12pw_dehumidifier.yaml │ ├── hosome_purifier.yaml │ ├── welltobe_cat_feeder.yaml │ ├── lifubide_x600_purifier.yaml │ ├── yidi_fan_light_switch.yaml │ ├── nedis_airquality.yaml │ ├── hydrotherm_dynamic_x8_water_heater.yaml │ ├── netmostat_n1_thermostat.yaml │ ├── thermex_if50v_waterheater.yaml │ ├── costway_portable_ac.yaml │ ├── ems_waterheater.yaml │ ├── cct_lightbulb.yaml │ ├── orion_indoor_siren.yaml │ ├── aquatech_x6_water_heater.yaml │ ├── goldair_platinum_tower_fan.yaml │ ├── powerstrip_4outlet_usbs.yaml │ ├── kkmoon_airquality_monitor.yaml │ ├── moes_dimmer.yaml │ ├── nedis_htpl20f_heater.yaml │ ├── simple_switch_timerv2.yaml │ ├── goldair_geco_heater.yaml │ ├── loratap_zigbee_curtain.yaml │ └── woods_milan_airconditioner.yaml │ ├── helpers │ └── log.py │ ├── manifest.json │ └── const.py ├── pyproject.toml ├── requirements.txt ├── setup.cfg ├── .yamllint ├── hacs.json ├── .coveragerc ├── .github ├── ISSUE_TEMPLATE │ └── config.yml ├── workflows │ ├── hassfest-validate.yml │ ├── hacs-validate.yml │ ├── linting.yml │ ├── yamltests.yml │ └── tests.yml └── dependabot.yml ├── requirements-dev.txt ├── .gitignore ├── sonar-project.properties ├── .vscode ├── settings.json └── tasks.json ├── util ├── catalog.py ├── config_match.py ├── duplicates.py ├── best_match.py ├── common_funcs.py └── match_against.py ├── SECURITY.md └── LICENSE.md /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/devices/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom_components/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.black] 2 | target-version = ["py312"] 3 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | tinytuya~=1.16.0 2 | tuya-device-sharing-sdk~=0.2.1 3 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [isort] 2 | profile=black 3 | 4 | [tool:pytest] 5 | asyncio_mode=auto 6 | -------------------------------------------------------------------------------- /.yamllint: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | extends: default 4 | rules: 5 | document-start: disable 6 | new-lines: disable 7 | -------------------------------------------------------------------------------- /hacs.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Tuya Local", 3 | "homeassistant": "2024.12.0", 4 | "hacs": "2.0.0" 5 | } 6 | -------------------------------------------------------------------------------- /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | # branch = True 3 | branch = False 4 | 5 | [report] 6 | skip_empty = True 7 | skip_covered = True 8 | include = custom_components/* -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/simple_switch.yaml: -------------------------------------------------------------------------------- 1 | name: Simple switch 2 | entities: 3 | - entity: switch 4 | dps: 5 | - id: 1 6 | name: switch 7 | type: boolean 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Community Support 4 | url: https://github.com/make-all/tuya-local/discussions 5 | about: Questions and requests for help should be made here 6 | -------------------------------------------------------------------------------- /requirements-dev.txt: -------------------------------------------------------------------------------- 1 | fuzzywuzzy 2 | levenshtein 3 | pytest-homeassistant-custom-component>=0.13.190 4 | pytest 5 | pytest-asyncio 6 | pytest-cov 7 | ruff 8 | tinytuya~=1.16.0 9 | tuya-device-sharing-sdk~=0.2.1 10 | yamllint 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | /.vscode/ 3 | /.env/ 4 | /*.egg-info/ 5 | __pycache__/ 6 | .pytest_cache/ 7 | /config/ 8 | *.zip 9 | /.coverage 10 | /coverage.xml 11 | *~ 12 | \#*\# 13 | .\#* 14 | *.orig 15 | *.rej 16 | .history 17 | .DS_Store 18 | Thumbs.db 19 | -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | sonar.organization=scan-all-with-sonar 2 | sonar.projectKey=make-all_tuya-local 3 | sonar.sources=./custom_components/tuya_local 4 | sonar.tests=./tests 5 | sonar.python.coverage.reportPaths=/github/workspace/coverage.xml 6 | sonar.python.version=3 7 | -------------------------------------------------------------------------------- /.github/workflows/hassfest-validate.yml: -------------------------------------------------------------------------------- 1 | name: Validate with hassfest 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | jobs: 8 | validate: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v4 12 | - uses: home-assistant/actions/hassfest@master 13 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/simple_contact_sensor.yaml: -------------------------------------------------------------------------------- 1 | name: Window sensor 2 | products: 3 | - id: 0mjj67aaztcfmc3i 4 | model: AW201_XR3 5 | entities: 6 | - entity: binary_sensor 7 | class: window 8 | dps: 9 | - id: 1 10 | name: sensor 11 | type: boolean 12 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/co2_box.yaml: -------------------------------------------------------------------------------- 1 | name: CO2 box 2 | products: 3 | - id: ot8jbazilxrskg6s 4 | model: DCR-CO2 5 | entities: 6 | - entity: sensor 7 | class: carbon_dioxide 8 | dps: 9 | - id: 2 10 | type: integer 11 | class: measurement 12 | name: sensor 13 | unit: ppm 14 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/simple_lightbulb.yaml: -------------------------------------------------------------------------------- 1 | name: Simple lightbulb 2 | entities: 3 | - entity: light 4 | dps: 5 | - id: 1 6 | name: switch 7 | type: boolean 8 | - id: 2 9 | name: brightness 10 | type: integer 11 | range: 12 | min: 10 13 | max: 255 14 | -------------------------------------------------------------------------------- /custom_components/tuya_local/helpers/log.py: -------------------------------------------------------------------------------- 1 | """ 2 | Functions for logging 3 | """ 4 | 5 | import json 6 | 7 | 8 | def non_json(input): 9 | """Handler for json_dumps when used for debugging.""" 10 | return f"Non-JSON: ({input})" 11 | 12 | 13 | def log_json(data): 14 | """Function for logging data as json.""" 15 | return json.dumps(data, default=non_json) 16 | -------------------------------------------------------------------------------- /.github/workflows/hacs-validate.yml: -------------------------------------------------------------------------------- 1 | name: Validate with HACS 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | jobs: 8 | validate: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v4 12 | - name: HACS validation 13 | uses: hacs/action@main 14 | with: 15 | category: integration 16 | ignore: wheels 17 | 18 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/ble_adaprox_fingerbot.yaml: -------------------------------------------------------------------------------- 1 | name: Fingerbot 2 | products: 3 | - id: yiihr7zh 4 | manufacturer: Adaprox 5 | name: BLE fingerbot 6 | entities: 7 | - entity: switch 8 | dps: 9 | - id: 2 10 | type: boolean 11 | name: switch 12 | - entity: sensor 13 | class: battery 14 | category: diagnostic 15 | dps: 16 | - id: 12 17 | type: integer 18 | name: sensor 19 | unit: "%" 20 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/basic_ir_remote.yaml: -------------------------------------------------------------------------------- 1 | name: Remote controller 2 | products: 3 | - id: mjffeakbzlnfxpzt 4 | manufacturer: UanTii 5 | model: S06/S18 IR 6 | - id: ejv37o6yz9vtxcuo 7 | manufacturer: RightSitu 8 | model: S18 IR 9 | entities: 10 | - entity: remote 11 | dps: 12 | - id: 201 13 | name: send 14 | type: string 15 | optional: true 16 | - id: 202 17 | name: receive 18 | type: string 19 | optional: true 20 | persist: false 21 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/cc_curtain.yaml: -------------------------------------------------------------------------------- 1 | name: Curtain 2 | products: 3 | - id: dy1jPRPGVR9G7PWY 4 | model: CC smart curtain 1 5 | entities: 6 | - entity: cover 7 | dps: 8 | - id: 2 9 | name: curtain_status 10 | type: string 11 | - id: 101 12 | name: control 13 | type: string 14 | mapping: 15 | - dps_val: 01 16 | value: stop 17 | - dps_val: 02 18 | value: open 19 | - dps_val: 03 20 | value: close 21 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/nwt_7speed_fan.yaml: -------------------------------------------------------------------------------- 1 | name: Pedestal 7 speed fan 2 | products: 3 | - id: qdxgvuj2ncbx5aha 4 | manufacturer: NEW WIDETECH 5 | model: WPF-16SW5 6 | entities: 7 | - entity: fan 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 3 13 | type: integer 14 | name: speed 15 | range: 16 | min: 1 17 | max: 7 18 | - entity: light 19 | dps: 20 | - id: 15 21 | type: boolean 22 | name: switch 23 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/nedis_openclose_sensor.yaml: -------------------------------------------------------------------------------- 1 | name: Door/window sensor 2 | products: 3 | - id: bzxlofth 4 | manufacturer: Nedis 5 | model: Zigbee ZBSD10WT 6 | entities: 7 | - entity: binary_sensor 8 | class: door 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: sensor 13 | - entity: sensor 14 | class: battery 15 | category: diagnostic 16 | dps: 17 | - id: 2 18 | type: integer 19 | name: sensor 20 | unit: "%" 21 | class: measurement 22 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/kogan_glass_1_7l_kettle.yaml: -------------------------------------------------------------------------------- 1 | name: Kogan smart kettle 2 | entities: 3 | - entity: climate 4 | dps: 5 | - id: 1 6 | type: boolean 7 | name: hvac_mode 8 | mapping: 9 | - dps_val: false 10 | value: "off" 11 | icon: "mdi:kettle-off" 12 | - dps_val: true 13 | value: "heat" 14 | icon: "mdi:kettle" 15 | - id: 5 16 | type: integer 17 | name: current_temperature 18 | unit: C 19 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/pir_sensor.yaml: -------------------------------------------------------------------------------- 1 | name: PIR sensor 2 | products: 3 | - id: gaczanu8noooebfe 4 | entities: 5 | - entity: binary_sensor 6 | class: motion 7 | dps: 8 | - id: 1 9 | type: string 10 | name: sensor 11 | mapping: 12 | - dps_val: pir 13 | value: true 14 | - dps_val: "none" 15 | value: false 16 | - entity: sensor 17 | class: battery 18 | dps: 19 | - id: 4 20 | type: integer 21 | name: sensor 22 | unit: "%" 23 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnPaste": false, 3 | "editor.formatOnSave": true, 4 | "editor.formatOnType": true, 5 | "files.eol": "\n", 6 | "files.trimTrailingWhitespace": true, 7 | "files.insertFinalNewline": true, 8 | "python.linting.pylintEnabled": true, 9 | "python.linting.enabled": true, 10 | "python.formatting.provider": "black", 11 | "black-formatter.importStrategy": "fromEnvironment", 12 | "python.testing.pytestEnabled": true, 13 | "pylint.importStrategy": "fromEnvironment", 14 | "python.linting.lintOnSave": true, 15 | } 16 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/garage_door_opener.yaml: -------------------------------------------------------------------------------- 1 | # Based on info on the web, this is a common subset of Garage door opener dps. 2 | name: Simple garage door 3 | entities: 4 | - entity: cover 5 | class: garage 6 | dps: 7 | - id: 1 8 | name: control 9 | type: boolean 10 | optional: true 11 | mapping: 12 | - dps_val: true 13 | value: "open" 14 | - dps_val: false 15 | value: "close" 16 | - id: 101 17 | name: open 18 | type: boolean 19 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/zigbee_waterleak_sensor.yaml: -------------------------------------------------------------------------------- 1 | name: Water leak sensor 2 | products: 3 | - id: upgcbody 4 | model: WL-898WZ 5 | entities: 6 | - entity: binary_sensor 7 | class: moisture 8 | category: diagnostic 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: sensor 13 | optional: true 14 | - entity: sensor 15 | class: battery 16 | category: diagnostic 17 | dps: 18 | - id: 4 19 | type: integer 20 | name: sensor 21 | unit: "%" 22 | class: measurement 23 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "pip" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "weekly" 12 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/simple_dual_switch.yaml: -------------------------------------------------------------------------------- 1 | name: Dual switch 2 | products: 3 | - id: jupECyrdMrUifHd8 4 | manufacturer: eMylo 5 | model: WiFi/RF 2 Gang 6 | entities: 7 | - entity: switch 8 | translation_key: switch_x 9 | translation_placeholders: 10 | x: "1" 11 | dps: 12 | - id: 1 13 | type: boolean 14 | name: switch 15 | - entity: switch 16 | translation_key: switch_x 17 | translation_placeholders: 18 | x: "2" 19 | dps: 20 | - id: 2 21 | type: boolean 22 | name: switch 23 | -------------------------------------------------------------------------------- /custom_components/tuya_local/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "domain": "tuya_local", 4 | "name": "Tuya Local", 5 | "codeowners": [ 6 | "@make-all" 7 | ], 8 | "config_flow": true, 9 | "dependencies": [], 10 | "documentation": "https://github.com/make-all/tuya-local", 11 | "integration_type": "device", 12 | "iot_class": "local_push", 13 | "issue_tracker": "https://github.com/make-all/tuya-local/issues", 14 | "requirements": [ 15 | "tinytuya==1.16.0", 16 | "tuya-device-sharing-sdk~=0.2.1" 17 | ], 18 | "version": "2025.1.0" 19 | } 20 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/avatto_curtain_switch.yaml: -------------------------------------------------------------------------------- 1 | name: Avatto curtain switch 2 | entities: 3 | - entity: cover 4 | class: curtain 5 | dps: 6 | - id: 1 7 | name: control 8 | type: string 9 | mapping: 10 | - dps_val: open 11 | value: open 12 | - dps_val: close 13 | value: close 14 | - dps_val: stop 15 | value: stop 16 | - entity: light 17 | category: config 18 | translation_key: backlight 19 | dps: 20 | - id: 101 21 | type: boolean 22 | name: switch 23 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/hoenyzy_valve_timer.yaml: -------------------------------------------------------------------------------- 1 | name: Valve timer 2 | products: 3 | - id: gbm9ata1zrzaez4a 4 | manufacturer: Hoenyzi 5 | model: DN15/20/25 6 | entities: 7 | - entity: valve 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: valve 12 | - entity: number 13 | translation_key: timer 14 | class: duration 15 | category: config 16 | dps: 17 | - id: 9 18 | type: integer 19 | name: value 20 | unit: min 21 | range: 22 | min: 0 23 | max: 86400 24 | mapping: 25 | - scale: 60 26 | step: 60 27 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/cesmarthome_acwall_outlet.yaml: -------------------------------------------------------------------------------- 1 | name: Wall outlet 2 | products: 3 | - id: xca2lqfaztnmk5jh 4 | manufacturer: CE Smart Home 5 | model: LQ-2-W3 6 | entities: 7 | - entity: switch 8 | dps: 9 | - id: 101 10 | name: switch 11 | type: boolean 12 | - entity: number 13 | category: config 14 | class: duration 15 | translation_key: timer 16 | dps: 17 | - id: 102 18 | name: value 19 | type: integer 20 | unit: min 21 | range: 22 | min: 0 23 | max: 86400 24 | mapping: 25 | - scale: 60 26 | step: 60 27 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/lucci_fan.yaml: -------------------------------------------------------------------------------- 1 | name: Ceiling Fan 2 | products: 3 | - id: U8wU126HQlIeQHvS 4 | manufacturer: Lucci Connect 5 | name: WiFi fan remote 6 | entities: 7 | - entity: fan 8 | dps: 9 | - id: 1 10 | name: switch 11 | type: boolean 12 | - id: 2 13 | name: speed 14 | type: string 15 | mapping: 16 | - dps_val: "1" 17 | value: 33 18 | - dps_val: "2" 19 | value: 66 20 | - dps_val: "3" 21 | value: 100 22 | - entity: light 23 | dps: 24 | - id: 102 25 | name: switch 26 | type: boolean 27 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/ilonda_l88_fishfeeder.yaml: -------------------------------------------------------------------------------- 1 | name: Fish feeder 2 | products: 3 | - id: 3jskpz3pwqn9oojn 4 | manufacturer: iLonda 5 | model: L88 6 | entities: 7 | - entity: switch 8 | icon: "mdi:fish" 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: switch 13 | - entity: number 14 | translation_key: timer 15 | class: duration 16 | category: config 17 | dps: 18 | - id: 6 19 | type: integer 20 | name: value 21 | unit: min 22 | range: 23 | min: 0 24 | max: 86400 25 | mapping: 26 | - scale: 60 27 | step: 60 28 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/simple_triple_switch.yaml: -------------------------------------------------------------------------------- 1 | name: Triple switch 2 | entities: 3 | - entity: switch 4 | translation_key: switch_x 5 | translation_placeholders: 6 | x: "1" 7 | dps: 8 | - id: 1 9 | name: switch 10 | type: boolean 11 | - entity: switch 12 | translation_key: switch_x 13 | translation_placeholders: 14 | x: "2" 15 | dps: 16 | - id: 2 17 | name: switch 18 | type: boolean 19 | - entity: switch 20 | translation_key: switch_x 21 | translation_placeholders: 22 | x: "3" 23 | dps: 24 | - id: 3 25 | name: switch 26 | type: boolean 27 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/inkbird_pth9cw_airquality.yaml: -------------------------------------------------------------------------------- 1 | name: Inkbird air quality monitor 2 | entities: 3 | - entity: sensor 4 | class: carbon_dioxide 5 | dps: 6 | - id: 2 7 | type: integer 8 | name: sensor 9 | unit: ppm 10 | class: measurement 11 | - entity: sensor 12 | class: temperature 13 | dps: 14 | - id: 18 15 | type: integer 16 | name: sensor 17 | unit: C 18 | class: measurement 19 | - entity: sensor 20 | class: humidity 21 | dps: 22 | - id: 19 23 | type: integer 24 | name: sensor 25 | unit: "%" 26 | class: measurement 27 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/windcalm_fan.yaml: -------------------------------------------------------------------------------- 1 | name: Windcalm Ceiling Fan 2 | entities: 3 | - entity: fan 4 | dps: 5 | - id: 60 6 | type: boolean 7 | name: switch 8 | - id: 62 9 | type: integer 10 | name: speed 11 | range: 12 | min: 1 13 | max: 6 14 | - id: 63 15 | type: string 16 | name: direction 17 | - entity: number 18 | class: duration 19 | translation_key: timer 20 | category: config 21 | dps: 22 | - id: 64 23 | type: integer 24 | name: value 25 | unit: min 26 | range: 27 | min: 0 28 | max: 540 29 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/cct_modeless_lightbulb.yaml: -------------------------------------------------------------------------------- 1 | name: CCT light 2 | products: 3 | - id: ewrj9uit2axunpyn 4 | manufacturer: Connect 5 | model: CSH-GU53WW5W 6 | entities: 7 | - entity: light 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 3 13 | name: brightness 14 | type: integer 15 | range: 16 | min: 25 17 | max: 255 18 | - id: 4 19 | name: color_temp 20 | type: integer 21 | range: 22 | min: 0 23 | max: 255 24 | mapping: 25 | - target_range: 26 | min: 2700 27 | max: 6500 28 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/illumanance_sensor.yaml: -------------------------------------------------------------------------------- 1 | name: Illuminance sensor 2 | entities: 3 | - entity: sensor 4 | name: Brightness 5 | class: illuminance 6 | dps: 7 | - id: 2 8 | type: integer 9 | name: sensor 10 | unit: lx 11 | class: measurement 12 | - entity: sensor 13 | name: Light level 14 | class: enum 15 | category: diagnostic 16 | dps: 17 | - id: 1 18 | type: string 19 | name: sensor 20 | mapping: 21 | - dps_val: low 22 | value: Low 23 | - dps_val: middle 24 | value: Medium 25 | - dps_val: high 26 | value: High 27 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/illumanance_v2_sensor.yaml: -------------------------------------------------------------------------------- 1 | name: Light sensor 2 | entities: 3 | - entity: sensor 4 | class: illuminance 5 | dps: 6 | - id: 7 7 | type: integer 8 | name: sensor 9 | unit: lx 10 | class: measurement 11 | - entity: sensor 12 | name: Light level 13 | class: enum 14 | icon: "mdi:brightness-4" 15 | category: diagnostic 16 | dps: 17 | - id: 6 18 | type: string 19 | name: sensor 20 | mapping: 21 | - dps_val: low 22 | value: Low 23 | - dps_val: middle 24 | value: Medium 25 | - dps_val: high 26 | value: High 27 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/malmbergs_single_dimmer.yaml: -------------------------------------------------------------------------------- 1 | name: Dimmer 2 | products: 3 | - id: yrli99lsgtmebarq 4 | manufacturer: Malmbergs 5 | model: QS-WIFI-D02-TRIAC 6 | entities: 7 | - entity: light 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 3 13 | name: brightness 14 | type: integer 15 | range: 16 | min: 25 17 | max: 255 18 | - entity: number 19 | name: Minimum brightness 20 | category: config 21 | icon: "mdi:lightbulb-on-40" 22 | dps: 23 | - id: 101 24 | type: integer 25 | name: value 26 | range: 27 | min: 25 28 | max: 255 29 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/arlec_ceiling_fan_remote.yaml: -------------------------------------------------------------------------------- 1 | name: Ceiling fan remote 2 | legacy_type: sulion_ceiling_fan_remote 3 | products: 4 | - id: 0000008sff 5 | manufacturer: Sulion 6 | model: Cadillac 7 | name: Fan controller 8 | - id: b8bofb3ruee9zwxc 9 | manufacturer: Arlec 10 | model: CFR225HA 11 | name: AC fan controller 12 | entities: 13 | - entity: fan 14 | dps: 15 | - id: 1 16 | type: boolean 17 | name: switch 18 | - id: 3 19 | type: integer 20 | name: speed 21 | range: 22 | min: 1 23 | max: 3 24 | - entity: light 25 | dps: 26 | - id: 15 27 | type: boolean 28 | name: switch 29 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/arlec_smart_button.yaml: -------------------------------------------------------------------------------- 1 | name: Smart button 2 | products: 3 | - id: kpzc6pm8 4 | manufacturer: Arlec 5 | model: SG022HA 6 | entities: 7 | - entity: event 8 | class: button 9 | dps: 10 | - id: 1 11 | type: string 12 | name: event 13 | mapping: 14 | - dps_val: single_click 15 | value: single_click 16 | - dps_val: long_press 17 | value: long_press 18 | - dps_val: double_click 19 | value: double_click 20 | - entity: sensor 21 | class: battery 22 | category: diagnostic 23 | dps: 24 | - id: 10 25 | type: integer 26 | name: sensor 27 | unit: "%" 28 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/simple_switch_timer.yaml: -------------------------------------------------------------------------------- 1 | name: Simple switch with timer 2 | products: 3 | - id: r15JnoGqWPM4PPtl 4 | manufacturer: Teckin 5 | model: SP21 6 | - id: 5bvnmoqjth5nd4de 7 | manufacturer: Teckin 8 | model: SP21/SP22/SP27 9 | entities: 10 | - entity: switch 11 | dps: 12 | - id: 1 13 | name: switch 14 | type: boolean 15 | - entity: number 16 | category: config 17 | class: duration 18 | translation_key: timer 19 | dps: 20 | - id: 11 21 | name: value 22 | type: integer 23 | unit: min 24 | range: 25 | min: 0 26 | max: 86400 27 | mapping: 28 | - scale: 60 29 | step: 60 30 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/tmwf02_fan.yaml: -------------------------------------------------------------------------------- 1 | name: TMWF02 fan controller 2 | entities: 3 | - entity: fan 4 | dps: 5 | - id: 1 6 | type: boolean 7 | name: switch 8 | - id: 3 9 | type: string 10 | name: fan_level 11 | - id: 4 12 | type: integer 13 | name: speed 14 | range: 15 | min: 1 16 | max: 100 17 | - entity: number 18 | category: config 19 | class: duration 20 | translation_key: timer 21 | dps: 22 | - id: 2 23 | name: value 24 | type: integer 25 | unit: min 26 | range: 27 | min: 0 28 | max: 86400 29 | mapping: 30 | - scale: 60 31 | step: 60 32 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/deta_fan.yaml: -------------------------------------------------------------------------------- 1 | name: Deta fan controller 2 | entities: 3 | - entity: fan 4 | dps: 5 | - id: 1 6 | type: boolean 7 | name: switch 8 | - id: 3 9 | type: integer 10 | name: speed 11 | range: 12 | min: 1 13 | max: 3 14 | - id: 102 15 | type: integer 16 | name: timer 17 | - entity: light 18 | dps: 19 | - id: 9 20 | type: boolean 21 | name: switch 22 | - id: 103 23 | type: integer 24 | name: timer 25 | - entity: switch 26 | name: Master 27 | category: config 28 | dps: 29 | - id: 101 30 | type: boolean 31 | name: switch 32 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/loratap_curtain_switch_QCSC400ZB-V2.yaml: -------------------------------------------------------------------------------- 1 | name: Curtain switch 2 | products: 3 | - id: qa8s8vca 4 | manufacturer: LoraTap 5 | model: QCSC400ZB-V2 6 | entities: 7 | - entity: cover 8 | class: blind 9 | dps: 10 | - id: 1 11 | name: control 12 | type: string 13 | mapping: 14 | - dps_val: open 15 | value: open 16 | - dps_val: close 17 | value: close 18 | - dps_val: stop 19 | value: stop 20 | - id: 8 21 | name: control_back_mode 22 | type: string 23 | mapping: 24 | - dps_val: forward 25 | value: forward 26 | - dps_val: backward 27 | value: backward 28 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/kesser_infrared_heater.yaml: -------------------------------------------------------------------------------- 1 | name: Infrared heater 2 | products: 3 | - id: trsas9jlfgcbxhq9 4 | manufacturer: Kesser 5 | model: "3000W" 6 | entities: 7 | - entity: switch 8 | name: Power 9 | icon: "mdi:radiator" 10 | dps: 11 | - id: 1 12 | type: boolean 13 | name: switch 14 | - entity: select 15 | name: Mode 16 | icon: "mdi:radiator" 17 | dps: 18 | - id: 4 19 | type: string 20 | name: option 21 | mapping: 22 | - dps_val: "P0" 23 | value: "Off" 24 | - dps_val: "P1" 25 | value: "1000W" 26 | - dps_val: "P2" 27 | value: "2000W" 28 | - dps_val: "P3" 29 | value: "3000W" 30 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/hunterpacific_9speed_fanlight.yaml: -------------------------------------------------------------------------------- 1 | name: Ceiling fan with light 2 | products: 3 | - id: agjbamgmrbcbazp7 4 | manufacturer: Hunter Pacific 5 | model: "9 speed" 6 | entities: 7 | - entity: fan 8 | dps: 9 | - id: 60 10 | type: boolean 11 | name: switch 12 | - id: 62 13 | type: integer 14 | name: speed 15 | range: 16 | min: 1 17 | max: 9 18 | - id: 63 19 | type: string 20 | name: direction 21 | - entity: light 22 | dps: 23 | - id: 20 24 | type: boolean 25 | name: switch 26 | - id: 22 27 | name: brightness 28 | type: integer 29 | range: 30 | min: 1 31 | max: 9 32 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/grid_connect_double_switch.yaml: -------------------------------------------------------------------------------- 1 | name: Grid Connect double wall switch 2 | entities: 3 | - entity: switch 4 | translation_key: outlet_x 5 | translation_placeholders: 6 | x: "1" 7 | class: switch 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 11 13 | type: integer 14 | name: unknown_11 15 | - id: 104 16 | type: integer 17 | name: unknown_104 18 | - id: 105 19 | type: boolean 20 | name: unknown_105 21 | - entity: switch 22 | translation_key: outlet_x 23 | translation_placeholders: 24 | x: "2" 25 | class: switch 26 | dps: 27 | - id: 2 28 | type: boolean 29 | name: switch 30 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/mirabella_genio_motion_sensor.yaml: -------------------------------------------------------------------------------- 1 | name: Motion sensor 2 | products: 3 | - id: p0y7ucexietpcqlq 4 | manufacturer: Mirabella Genio 5 | entities: 6 | - entity: binary_sensor 7 | class: motion 8 | dps: 9 | - id: 101 10 | type: string 11 | name: sensor 12 | mapping: 13 | - dps_val: pir 14 | value: true 15 | - dps_val: "none" 16 | value: false 17 | - entity: sensor 18 | class: battery 19 | dps: 20 | - id: 103 21 | type: integer 22 | name: sensor 23 | unit: "%" 24 | - entity: binary_sensor 25 | name: Tamper alarm 26 | class: tamper 27 | dps: 28 | - id: 104 29 | type: boolean 30 | name: sensor 31 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/desk_lamp.yaml: -------------------------------------------------------------------------------- 1 | name: Desk Lamp 2 | products: 3 | - id: b0j0lto1o0ijwb39 4 | manufacturer: Setti+ 5 | model: SL601 6 | entities: 7 | - entity: light 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 2 13 | type: string 14 | name: work_mode 15 | - id: 3 16 | name: brightness 17 | type: integer 18 | optional: true 19 | range: 20 | min: 25 21 | max: 255 22 | - id: 4 23 | name: color_temp 24 | type: integer 25 | optional: true 26 | range: 27 | min: 0 28 | max: 255 29 | mapping: 30 | - target_range: 31 | min: 2700 32 | max: 6500 33 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/dimming_light_track.yaml: -------------------------------------------------------------------------------- 1 | name: Dimming CCT light 2 | products: 3 | - id: fkxcslivaluonzdp 4 | manufacturer: LightStar 5 | name: Track light 6 | entities: 7 | - entity: light 8 | dps: 9 | - id: 20 10 | type: boolean 11 | name: switch 12 | - id: 22 13 | name: brightness 14 | type: integer 15 | range: 16 | min: 5 17 | max: 1000 18 | - id: 23 19 | name: color_temp 20 | type: integer 21 | range: 22 | min: 0 23 | max: 1000 24 | mapping: 25 | - invert: true 26 | target_range: 27 | min: 2700 28 | max: 6500 29 | - id: 106 30 | name: identity 31 | type: string 32 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/jh_pcmini.yaml: -------------------------------------------------------------------------------- 1 | name: Pcie computer power 2 | products: 3 | - id: na90jncjlvw5t0ba 4 | model: JH-PC mini 5 | entities: 6 | - entity: switch 7 | class: outlet 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - entity: button 13 | name: Reset 14 | icon: mdi:restart 15 | dps: 16 | - id: 101 17 | name: button 18 | type: string 19 | mapping: 20 | - dps_val: Reset 21 | value: true 22 | - entity: button 23 | name: Force reset 24 | icon: mdi:restart-alert 25 | dps: 26 | - id: 101 27 | name: button 28 | type: string 29 | mapping: 30 | - dps_val: forceReset 31 | value: true 32 | -------------------------------------------------------------------------------- /util/catalog.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | """Build a catalog of supported devices/entities 3 | 4 | This script was created to check for entity ids that change between versions. 5 | The script needs to be run on the version before a potential id changing 6 | modification, then again after to compare the two outputs. 7 | """ 8 | 9 | import sys 10 | 11 | from custom_components.tuya_local.helpers.device_config import ( 12 | TuyaDeviceConfig, 13 | available_configs, 14 | ) 15 | 16 | 17 | def main() -> int: 18 | print("Catalog================") 19 | for config in available_configs(): 20 | device = TuyaDeviceConfig(config) 21 | for entity in device.all_entities(): 22 | print(f"{config}: {entity.config_id}") 23 | 24 | 25 | if __name__ == "__main__": 26 | sys.exit(main()) 27 | -------------------------------------------------------------------------------- /custom_components/tuya_local/const.py: -------------------------------------------------------------------------------- 1 | DOMAIN = "tuya_local" 2 | DATA_STORE = "store" 3 | 4 | CONF_DEVICE_ID = "device_id" 5 | CONF_LOCAL_KEY = "local_key" 6 | CONF_TYPE = "type" 7 | CONF_POLL_ONLY = "poll_only" 8 | CONF_DEVICE_CID = "device_cid" 9 | CONF_PROTOCOL_VERSION = "protocol_version" 10 | API_PROTOCOL_VERSIONS = [3.3, 3.1, 3.2, 3.4, 3.5] 11 | 12 | CONF_APP_TYPE = "tuya_app_type" 13 | CONF_ENDPOINT = "endpoint" 14 | CONF_TERMINAL_ID = "terminal_id" 15 | CONF_TOKEN_INFO = "token_info" 16 | CONF_USER_CODE = "user_code" 17 | CONF_USERNAME = "username" 18 | 19 | TUYA_CLIENT_ID = "HA_3y9q4ak7g4ephrvke" 20 | TUYA_SCHEMA = "haauthorize" 21 | 22 | TUYA_RESPONSE_CODE = "code" 23 | TUYA_RESPONSE_MSG = "msg" 24 | TUYA_RESPONSE_QR_CODE = "qrcode" 25 | TUYA_RESPONSE_RESULT = "result" 26 | TUYA_RESPONSE_SUCCESS = "success" 27 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/tuya_smart_zigbee_door_sensor.yaml: -------------------------------------------------------------------------------- 1 | name: Door sensor 2 | products: 3 | - id: iqoy7jgeosgbgk9i 4 | manufacturer: Mirabella Genio 5 | - id: 7jIGJAymiH8OsFFb 6 | name: Zigbee door sensor 7 | entities: 8 | - entity: binary_sensor 9 | class: door 10 | dps: 11 | - id: 101 12 | type: boolean 13 | name: sensor 14 | - entity: sensor 15 | class: battery 16 | category: diagnostic 17 | dps: 18 | - id: 103 19 | type: integer 20 | name: sensor 21 | optional: true 22 | unit: "%" 23 | class: measurement 24 | - entity: binary_sensor 25 | class: tamper 26 | category: diagnostic 27 | dps: 28 | - id: 102 29 | type: boolean 30 | optional: true 31 | name: sensor 32 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/mirabella_genio_usb.yaml: -------------------------------------------------------------------------------- 1 | name: Smartplug with timer 2 | products: 3 | # Original product id unknown: Mirabella Genio USB smartplug 4 | - id: PGEkBctAbtzKOZng 5 | manufacturer: Maxcio 6 | model: W-DE004 7 | - id: O0YnvNLlDWbJd4KC 8 | manufacturer: Hyleton 9 | model: "315" 10 | entities: 11 | - entity: switch 12 | class: outlet 13 | dps: 14 | - id: 1 15 | type: boolean 16 | name: switch 17 | - entity: number 18 | translation_key: timer 19 | class: duration 20 | category: config 21 | dps: 22 | - id: 2 23 | type: integer 24 | name: value 25 | unit: min 26 | range: 27 | min: 0 28 | max: 86400 29 | mapping: 30 | - scale: 60 31 | step: 60 32 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/catit_pet_feeder.yaml: -------------------------------------------------------------------------------- 1 | name: Catit Pet Feeder 2 | entities: 3 | - entity: number 4 | icon: "mdi:paw" 5 | name: Manual feed 6 | dps: 7 | - id: 14 8 | name: value 9 | type: integer 10 | range: 11 | min: 1 12 | max: 12 13 | - id: 104 14 | name: meal_plan 15 | type: string 16 | - id: 102 17 | name: unknown_102 18 | type: boolean 19 | - entity: sensor 20 | icon: "mdi:paw" 21 | name: Feed report 22 | category: diagnostic 23 | dps: 24 | - id: 101 25 | name: sensor 26 | type: integer 27 | - entity: button 28 | translation_key: factory_reset 29 | category: config 30 | dps: 31 | - id: 103 32 | type: boolean 33 | name: button 34 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/hama_radiator_controller.yaml: -------------------------------------------------------------------------------- 1 | name: Radiator controller 2 | products: 3 | - id: yw7cahqs 4 | manufacturer: Hama 5 | entities: 6 | - entity: climate 7 | translation_only_key: heater 8 | dps: 9 | - id: 101 10 | name: hvac_mode 11 | type: boolean 12 | mapping: 13 | - dps_val: true 14 | value: "heat" 15 | - dps_val: false 16 | value: "off" 17 | - id: 102 18 | name: current_temperature 19 | type: integer 20 | mapping: 21 | - scale: 10 22 | - id: 103 23 | name: temperature 24 | type: integer 25 | unit: C 26 | range: 27 | min: 50 28 | max: 300 29 | mapping: 30 | - scale: 10 31 | step: 5 32 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/ir_remote_sensors.yaml: -------------------------------------------------------------------------------- 1 | name: Universal remote control 2 | products: 3 | - id: whs3cty93fzrqkpt 4 | entities: 5 | - entity: remote 6 | dps: 7 | - id: 201 8 | name: send 9 | type: string 10 | optional: true 11 | - id: 202 12 | name: receive 13 | type: string 14 | optional: true 15 | persist: false 16 | - entity: sensor 17 | class: temperature 18 | dps: 19 | - id: 101 20 | name: sensor 21 | type: integer 22 | class: measurement 23 | unit: C 24 | mapping: 25 | - scale: 10 26 | - entity: sensor 27 | class: humidity 28 | dps: 29 | - id: 102 30 | name: sensor 31 | type: integer 32 | unit: "%" 33 | class: measurement 34 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/kogan_noise_machine.yaml: -------------------------------------------------------------------------------- 1 | name: Sleep aid 2 | products: 3 | - id: d9tnlvjvlgwqr9ov 4 | manufacturer: Kogan 5 | model: KAWHTNOSLPA 6 | entities: 7 | - entity: switch 8 | icon: "mdi:power-standby" 9 | dps: 10 | - id: 105 11 | type: boolean 12 | name: switch 13 | - entity: light 14 | dps: 15 | - id: 104 16 | name: brightness 17 | type: integer 18 | range: 19 | min: 0 20 | max: 255 21 | - entity: select 22 | name: Volume 23 | icon: "mdi:volume-high" 24 | category: config 25 | dps: 26 | - id: 101 27 | type: string 28 | name: option 29 | mapping: 30 | - dps_val: low 31 | value: Low 32 | - dps_val: high 33 | value: High 34 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/pni_water_feeeder.yaml: -------------------------------------------------------------------------------- 1 | name: Water feeder 2 | products: 3 | - id: ajkayo9kucq6vttv 4 | manufacturer: PNI 5 | model: TA-WF-SMART(UV) 6 | entities: 7 | - entity: switch 8 | icon: "mdi:paw" 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: switch 13 | - entity: switch 14 | translation_key: uv_sterilization 15 | category: config 16 | dps: 17 | - id: 10 18 | type: boolean 19 | name: switch 20 | - entity: binary_sensor 21 | class: problem 22 | category: diagnostic 23 | dps: 24 | - id: 13 25 | type: bitfield 26 | name: sensor 27 | mapping: 28 | - dps_val: 0 29 | value: false 30 | - value: true 31 | - id: 13 32 | type: bitfield 33 | name: fault_code 34 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/simple_quad_switch.yaml: -------------------------------------------------------------------------------- 1 | name: Simple switch 2 | entities: 3 | - entity: switch 4 | translation_key: switch_x 5 | translation_placeholders: 6 | x: "1" 7 | dps: 8 | - id: 1 9 | name: switch 10 | type: boolean 11 | - entity: switch 12 | translation_key: switch_x 13 | translation_placeholders: 14 | x: "2" 15 | dps: 16 | - id: 2 17 | name: switch 18 | type: boolean 19 | - entity: switch 20 | translation_key: switch_x 21 | translation_placeholders: 22 | x: "3" 23 | dps: 24 | - id: 3 25 | name: switch 26 | type: boolean 27 | - entity: switch 28 | translation_key: switch_x 29 | translation_placeholders: 30 | x: "4" 31 | dps: 32 | - id: 4 33 | name: switch 34 | type: boolean 35 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/topens_wifi_remote_control.yaml: -------------------------------------------------------------------------------- 1 | name: Remote control 2 | products: 3 | - id: plgiarn7jndeu6js 4 | manufacturer: TOPENS 5 | model: TC196 6 | entities: 7 | - entity: button 8 | name: A 9 | dps: 10 | - id: 101 11 | type: boolean 12 | name: button 13 | - entity: button 14 | name: B 15 | dps: 16 | - id: 102 17 | type: boolean 18 | name: button 19 | - entity: button 20 | name: C 21 | dps: 22 | - id: 103 23 | type: boolean 24 | name: button 25 | - entity: button 26 | name: D 27 | dps: 28 | - id: 104 29 | type: boolean 30 | name: button 31 | - entity: sensor 32 | name: Limit Status 33 | category: diagnostic 34 | dps: 35 | - id: 7 36 | type: string 37 | name: sensor 38 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/simple_blinds.yaml: -------------------------------------------------------------------------------- 1 | name: Blind controller 2 | entities: 3 | - entity: cover 4 | class: blind 5 | dps: 6 | - id: 1 7 | name: control 8 | type: string 9 | mapping: 10 | - dps_val: open 11 | value: open 12 | - dps_val: close 13 | value: close 14 | - dps_val: stop 15 | value: stop 16 | - id: 2 17 | name: position 18 | type: integer 19 | range: 20 | min: 0 21 | max: 100 22 | mapping: 23 | - invert: true 24 | - id: 5 25 | name: control_back_mode 26 | type: boolean 27 | - id: 7 28 | # seems intended to match action, but doesn't change in observation 29 | name: work_state 30 | type: string 31 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/smartplug_encoded.yaml: -------------------------------------------------------------------------------- 1 | name: Smartplug with encoded info 2 | products: 3 | - id: A6bBfm2fmKKRfIxU 4 | name: スマートプラグ 5 | entities: 6 | - entity: switch 7 | class: outlet 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 101 13 | type: base64 14 | name: random 15 | - id: 102 16 | type: base64 17 | name: circulate 18 | - id: 103 19 | type: base64 20 | name: schedule 21 | - entity: number 22 | category: config 23 | class: duration 24 | translation_key: timer 25 | dps: 26 | - id: 11 27 | type: integer 28 | name: value 29 | unit: min 30 | range: 31 | min: 0 32 | max: 86400 33 | mapping: 34 | - scale: 60 35 | step: 60 36 | -------------------------------------------------------------------------------- /.github/workflows/linting.yml: -------------------------------------------------------------------------------- 1 | name: Linting 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | lint: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v4 10 | 11 | - name: Setup Python 12 | uses: actions/setup-python@v5 13 | with: 14 | python-version: '3.13' 15 | 16 | - name: Install dependencies 17 | run: | 18 | python -m pip install --upgrade pip 19 | pip install -r requirements-dev.txt 20 | - name: Python lint 21 | run: ruff check --output-format=github . 22 | - name: Python include order 23 | run: ruff check --select I --diff . 24 | - name: Python coding style 25 | run: ruff format --check --diff . 26 | - name: YAML lint 27 | run: yamllint --format github custom_components/tuya_local/devices 28 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/abalon_bcm700d_curtain.yaml: -------------------------------------------------------------------------------- 1 | name: Curtain rail motor 2 | products: 3 | - id: XS76BY5Q1uKO6gjC 4 | manufacturer: Abalon 5 | model: BCM700D 6 | entities: 7 | - entity: cover 8 | class: curtain 9 | dps: 10 | - id: 101 11 | name: position 12 | type: integer 13 | range: 14 | min: 0 15 | max: 100 16 | - id: 102 17 | name: control 18 | type: string 19 | mapping: 20 | - dps_val: ZZ 21 | value: open 22 | - dps_val: FZ 23 | value: close 24 | - dps_val: STOP 25 | value: stop 26 | - entity: switch 27 | name: Reverse 28 | category: config 29 | icon: "mdi:arrow-u-down-left" 30 | dps: 31 | - id: 103 32 | type: boolean 33 | name: switch 34 | optional: true 35 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/kesser_infrared_heater_floodlights.yaml: -------------------------------------------------------------------------------- 1 | name: Heater with light 2 | products: 3 | - id: trsas9jlfgcbxhq9 4 | manufacturer: Kesser 5 | model: "3000W Floodlights" 6 | entities: 7 | - entity: switch 8 | icon: "mdi:radiator" 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: switch 13 | - entity: select 14 | name: Mode 15 | icon: "mdi:radiator" 16 | dps: 17 | - id: 4 18 | type: string 19 | name: option 20 | mapping: 21 | - dps_val: "OFF" 22 | value: "Off" 23 | - dps_val: "F1" 24 | value: "1000W" 25 | - dps_val: "F2" 26 | value: "2000W" 27 | - dps_val: "F3" 28 | value: "3000W" 29 | - entity: light 30 | dps: 31 | - id: 10 32 | type: boolean 33 | name: switch 34 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/hauschen_smart_mirror.yaml: -------------------------------------------------------------------------------- 1 | name: Mirror 2 | products: 3 | - id: aI7d0iudqVMbCkHL 4 | manufacturer: Hauschen 5 | model: 48x36 Mirror 6 | entities: 7 | - entity: light 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 3 13 | type: integer 14 | name: brightness 15 | optional: true 16 | range: 17 | min: 1 18 | max: 100 19 | - id: 4 20 | type: integer 21 | optional: true 22 | name: color_temp 23 | range: 24 | min: 0 25 | max: 255 26 | mapping: 27 | - target_range: 28 | min: 2700 29 | max: 6500 30 | - entity: switch 31 | name: Defogger 32 | dps: 33 | - id: 101 34 | type: boolean 35 | optional: true 36 | name: switch 37 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/gold_cct_lightbulb.yaml: -------------------------------------------------------------------------------- 1 | name: Gold lightbulb 2 | products: 3 | - id: baf9tt9lb8t5uc7z 4 | model: Dim2Warm G95 5 | name: Golden globe 6 | entities: 7 | - entity: light 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 2 13 | name: brightness 14 | type: integer 15 | range: 16 | min: 25 17 | max: 255 18 | - id: 3 19 | name: color_temp 20 | type: integer 21 | range: 22 | min: 0 23 | max: 255 24 | mapping: 25 | - target_range: 26 | min: 1800 27 | max: 2700 28 | - entity: switch 29 | name: Remote switch 30 | icon: "mdi:remote" 31 | category: config 32 | dps: 33 | - id: 101 34 | type: boolean 35 | name: switch 36 | optional: true 37 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/thermex_lima80v_waterheater.yaml: -------------------------------------------------------------------------------- 1 | name: Water heater 2 | entities: 3 | - entity: water_heater 4 | dps: 5 | - id: 1 6 | type: boolean 7 | name: operation_mode 8 | mapping: 9 | - dps_val: false 10 | value: "off" 11 | - dps_val: true 12 | value: electric 13 | - id: 9 14 | type: integer 15 | name: temperature 16 | unit: C 17 | range: 18 | min: 35 19 | max: 75 20 | - id: 13 21 | type: string 22 | name: work_mode # to observe for potential expansion of operation_mode 23 | - id: 20 24 | type: integer 25 | name: attr1 # maybe fault_code? 26 | - id: 101 27 | name: away_mode 28 | type: boolean 29 | - id: 102 30 | type: integer 31 | name: current_temperature 32 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/wfws02rj_dual_switch.yaml: -------------------------------------------------------------------------------- 1 | name: Dual switch 2 | products: 3 | - id: LOeuvI6KCxzuZe0k 4 | model: WF-WS02 RJ 5 | entities: 6 | - entity: switch 7 | name: Master 8 | class: switch 9 | category: config 10 | dps: 11 | - id: 5 12 | type: integer 13 | name: switch 14 | mapping: 15 | - dps_val: 1 16 | value: true 17 | - dps_val: 0 18 | value: false 19 | - entity: switch 20 | translation_key: switch_x 21 | translation_placeholders: 22 | x: "1" 23 | class: switch 24 | dps: 25 | - id: 1 26 | type: boolean 27 | name: switch 28 | - entity: switch 29 | translation_key: switch_x 30 | translation_placeholders: 31 | x: "2" 32 | class: switch 33 | dps: 34 | - id: 2 35 | type: boolean 36 | name: switch 37 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/zigbee_zn373186_temphumid_sensor.yaml: -------------------------------------------------------------------------------- 1 | name: Climate sensor 2 | products: 3 | - id: xr3htd96 4 | manufacturer: Aubess 5 | model: ZN373186_01 6 | entities: 7 | - entity: sensor 8 | class: temperature 9 | dps: 10 | - id: 1 11 | type: integer 12 | name: sensor 13 | unit: C 14 | class: measurement 15 | mapping: 16 | - scale: 10 17 | - entity: sensor 18 | class: humidity 19 | dps: 20 | - id: 2 21 | type: integer 22 | name: sensor 23 | unit: "%" 24 | class: measurement 25 | mapping: 26 | - scale: 10 27 | - entity: sensor 28 | class: battery 29 | category: diagnostic 30 | dps: 31 | - id: 4 32 | type: integer 33 | name: sensor 34 | optional: true 35 | unit: "%" 36 | class: measurement 37 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Security updates are only supported for the latest release. 6 | If you cannot upgrade due to using an older version of Home Assistant, 7 | then you should upgrade HA also, as that may also have vulnerabilities 8 | in older versions. 9 | 10 | | Version | Supported | 11 | | ------- | ------------------ | 12 | | latest release | :white_check_mark: | 13 | | main branch HEAD | :white_check_mark: | 14 | | old versions | :x: | 15 | 16 | ## Reporting a Vulnerability 17 | 18 | Please use the "Report a VUlnerability" button on the new Issue page to report vulnerabilities. 19 | 20 | This will give the developers a heads up about the issue before posting publicly, to protect other users who may be affected. 21 | Security issues will be treated as top priority, so you should get a response within 72 hours, usually much sooner. 22 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/ard100_valve.yaml: -------------------------------------------------------------------------------- 1 | name: Valve controller 2 | products: 3 | - id: nguto5atyd2xxnap 4 | model: ARD-100+ 5 | entities: 6 | - entity: valve 7 | dps: 8 | - id: 1 9 | type: boolean 10 | name: valve 11 | - entity: number 12 | translation_key: timer 13 | class: duration 14 | category: config 15 | dps: 16 | - id: 7 17 | name: value 18 | type: integer 19 | range: 20 | min: 0 21 | max: 86400 22 | unit: s 23 | - entity: select 24 | translation_key: initial_state 25 | category: config 26 | dps: 27 | - id: 14 28 | type: string 29 | name: option 30 | mapping: 31 | - dps_val: "off" 32 | value: "off" 33 | - dps_val: "on" 34 | value: "on" 35 | - dps_val: memory 36 | value: memory 37 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/zigbee_zb10wt_temphumid_sensor.yaml: -------------------------------------------------------------------------------- 1 | name: Climate sensor 2 | products: 3 | - id: fie1dpkm 4 | manufacturer: Nedis 5 | model: ZBSC10WT 6 | entities: 7 | - entity: sensor 8 | class: temperature 9 | dps: 10 | - id: 1 11 | type: integer 12 | name: sensor 13 | unit: C 14 | class: measurement 15 | mapping: 16 | - scale: 10 17 | - entity: sensor 18 | class: humidity 19 | dps: 20 | - id: 2 21 | type: integer 22 | name: sensor 23 | unit: "%" 24 | class: measurement 25 | mapping: 26 | - scale: 10 27 | - entity: sensor 28 | class: battery 29 | category: diagnostic 30 | dps: 31 | - id: 4 32 | type: integer 33 | name: sensor 34 | unit: "%" 35 | class: measurement 36 | mapping: 37 | - scale: 10 38 | -------------------------------------------------------------------------------- /util/config_match.py: -------------------------------------------------------------------------------- 1 | """Find matching devices for the supplied dp list""" 2 | 3 | import json 4 | import sys 5 | 6 | from common_funcs import FakeDevice 7 | 8 | from custom_components.tuya_local.helpers.device_config import possible_matches 9 | 10 | 11 | def main() -> int: 12 | dps = json.loads(" ".join(sys.argv[1:])) 13 | device = FakeDevice(dps) 14 | 15 | for match in possible_matches(dps): 16 | dps_seen = set(dps.keys()) 17 | print(f"{match.config_type} matched {match.match_quality(dps)}%") 18 | for entity in match.all_entities(): 19 | print(f" {entity.config_id}:") 20 | for dp in entity.dps(): 21 | dps_seen.discard(dp.id) 22 | print(f" {dp.name}: {dp.get_value(device)}") 23 | for dp in dps_seen: 24 | print(f" Missing {dp}: {dps[dp]}") 25 | 26 | 27 | if __name__ == "__main__": 28 | sys.exit(main()) 29 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/tesla_pet_feeder.yaml: -------------------------------------------------------------------------------- 1 | name: Pet feeder 2 | products: 3 | - id: 8gdwxpoqdxdzefpe 4 | manufacturer: Tesla Smart 5 | model: TSL-PC-BL4 6 | entities: 7 | - entity: switch 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - entity: number 13 | name: Serving size 14 | category: config 15 | icon: "mdi:dots-hexagon" 16 | dps: 17 | - id: 101 18 | type: integer 19 | name: value 20 | unit: portions 21 | range: 22 | min: 1 23 | max: 10 24 | - entity: binary_sensor 25 | class: problem 26 | category: diagnostic 27 | dps: 28 | - id: 102 29 | type: bitfield 30 | name: sensor 31 | mapping: 32 | - dps_val: 0 33 | value: false 34 | - value: true 35 | - id: 102 36 | type: bitfield 37 | name: fault_code 38 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/zigbee_mir_te100ty_climate_sensor.yaml: -------------------------------------------------------------------------------- 1 | name: Climate sensor 2 | products: 3 | - id: a476raq2 4 | manufacturer: MultiIR 5 | model: Zigbee TE100-TY 6 | entities: 7 | - entity: sensor 8 | class: humidity 9 | dps: 10 | - id: 101 11 | type: integer 12 | name: sensor 13 | unit: "%" 14 | class: measurement 15 | mapping: 16 | - scale: 100 17 | - entity: sensor 18 | class: temperature 19 | dps: 20 | - id: 103 21 | type: integer 22 | name: sensor 23 | unit: C 24 | class: measurement 25 | mapping: 26 | - scale: 100 27 | - entity: sensor 28 | class: battery 29 | category: diagnostic 30 | dps: 31 | - id: 102 32 | type: integer 33 | name: sensor 34 | unit: "%" 35 | class: measurement 36 | mapping: 37 | - scale: 5 38 | -------------------------------------------------------------------------------- /.github/workflows/yamltests.yml: -------------------------------------------------------------------------------- 1 | name: YAML tests 2 | 3 | on: 4 | workflow_dispatch: 5 | pull_request: 6 | paths: 7 | - 'custom_components/tuya_local/devices/*.yaml' 8 | push: 9 | paths: 10 | - 'custom_components/tuya_local/devices/*.yaml' 11 | 12 | jobs: 13 | tests: 14 | runs-on: ubuntu-latest 15 | strategy: 16 | matrix: 17 | python-version: ['3.13'] 18 | 19 | steps: 20 | - uses: actions/checkout@v4 21 | with: 22 | fetch-depth: 0 23 | - name: Set up Python ${{ matrix.python-version }} 24 | uses: actions/setup-python@v5 25 | with: 26 | python-version: ${{ matrix.python-version }} 27 | - name: Install dependencies 28 | run: | 29 | python -m pip install --upgrade pip 30 | pip install -r requirements-dev.txt 31 | - name: Device configs check with pytest 32 | run: pytest tests/test_device_config.py 33 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/dual_dimmer_module.yaml: -------------------------------------------------------------------------------- 1 | name: Dual dimmer 2 | products: 3 | - id: 3ovuf2vazfsz2hfd 4 | model: LG921 5 | entities: 6 | - entity: light 7 | name: Light 1 8 | dps: 9 | - id: 101 10 | type: boolean 11 | name: switch 12 | - id: 102 13 | name: brightness 14 | type: integer 15 | range: 16 | min: 25 17 | max: 255 18 | - entity: light 19 | name: Light 2 20 | dps: 21 | - id: 1 22 | type: boolean 23 | name: switch 24 | - id: 3 25 | name: brightness 26 | type: integer 27 | range: 28 | min: 25 29 | max: 255 30 | - entity: number 31 | category: config 32 | name: Minimum brightness 33 | dps: 34 | - id: 104 35 | type: integer 36 | name: value 37 | range: 38 | min: 0 39 | max: 255 40 | optional: true 41 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/moes_wsyeuc_curtainswitch.yaml: -------------------------------------------------------------------------------- 1 | name: Curtain switch 2 | products: 3 | - id: 1qhlrytqcpnqmzj7 4 | manufacturer: Moes 5 | model: WS-Y-EUC 6 | entities: 7 | - entity: cover 8 | class: curtain 9 | dps: 10 | - id: 1 11 | name: control 12 | type: string 13 | mapping: 14 | - dps_val: "on" 15 | value: open 16 | - dps_val: "off" 17 | value: close 18 | - dps_val: stop 19 | value: stop 20 | - entity: light 21 | category: config 22 | translation_key: backlight 23 | dps: 24 | - id: 101 25 | type: boolean 26 | name: switch 27 | - entity: number 28 | name: Travel time 29 | category: config 30 | icon: "mdi:clock-end" 31 | dps: 32 | - id: 9 33 | type: integer 34 | name: value 35 | unit: s 36 | range: 37 | min: 10 38 | max: 120 39 | -------------------------------------------------------------------------------- /util/duplicates.py: -------------------------------------------------------------------------------- 1 | """Check for duplicates of the supplied file.""" 2 | 3 | import sys 4 | 5 | from common_funcs import load_config, make_sample_dps 6 | 7 | from custom_components.tuya_local.helpers.device_config import possible_matches 8 | 9 | 10 | def main(): 11 | for filename in sys.argv[1:]: 12 | config = load_config(filename) 13 | if config is None: 14 | print(f"No config could be loaded for {filename}") 15 | continue 16 | sample_dps = make_sample_dps(config) 17 | 18 | # device = FakeDevice(sample_dps) 19 | for m in possible_matches(sample_dps): 20 | if m.config_type == config.config_type: 21 | continue 22 | if m.match_quality(sample_dps) > 50: 23 | print( 24 | f"{m.config_type} matched {filename} {m.match_quality(sample_dps)}%" 25 | ) 26 | 27 | 28 | if __name__ == "__main__": 29 | sys.exit(main()) 30 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/etersky_curtain_switch.yaml: -------------------------------------------------------------------------------- 1 | name: Curtain switch 2 | products: 3 | - id: 81dyy7vqe426s0yc 4 | manufacturer: Etersky 5 | model: WF-CS01 6 | entities: 7 | - entity: cover 8 | class: curtain 9 | dps: 10 | - id: 1 11 | name: control 12 | type: string 13 | mapping: 14 | - dps_val: open 15 | value: open 16 | - dps_val: close 17 | value: close 18 | - dps_val: stop 19 | value: stop 20 | - entity: light 21 | translation_key: backlight 22 | category: config 23 | dps: 24 | - id: 7 25 | type: boolean 26 | name: switch 27 | - entity: number 28 | name: Time control 29 | category: config 30 | class: duration 31 | icon: "mdi:timer" 32 | dps: 33 | - id: 10 34 | type: integer 35 | name: value 36 | unit: s 37 | range: 38 | min: 10 39 | max: 180 40 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "Install requirements", 6 | "type": "shell", 7 | "command": "pip3 install -r requirements-dev.txt", 8 | "problemMatcher": [] 9 | }, 10 | { 11 | "label": "Run Home Assistant on port 8123", 12 | "type": "shell", 13 | "command": "python -m homeassistant", 14 | "problemMatcher": [] 15 | }, 16 | { 17 | "label": "Upgrade Home Assistant to latest dev", 18 | "type": "shell", 19 | "command": "pip install -U home-assistant", 20 | "problemMatcher": [] 21 | }, 22 | { 23 | "label": "Unit tests", 24 | "type": "shell", 25 | "command": "pytest --cov=. --cov-config=.coveragerc --cov-report xml:coverage.xml", 26 | "problemMatcher": [] 27 | }, 28 | { 29 | "label": "Reformat code", 30 | "type": "shell", 31 | "command": "isort . && black .", 32 | "problemMatcher": [] 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/s11_rfir_remote.yaml: -------------------------------------------------------------------------------- 1 | name: Remote control 2 | legacy_type: moes_rfir_remote 3 | products: 4 | - id: nwpvjlq7qacvnqf3 5 | model: S11+ (IR+RF Pro) 6 | - id: wbaloeb3kiwwhads 7 | manufacturer: Moes 8 | name: RF/IR remote 9 | - id: 0gawnyfgyneswent 10 | model: IR Controller Pro 11 | entities: 12 | - entity: remote 13 | dps: 14 | - id: 201 15 | name: send 16 | type: string 17 | optional: true 18 | - id: 202 19 | name: receive 20 | type: string 21 | optional: true 22 | persist: false 23 | - id: 1 24 | type: string 25 | name: scene_1 26 | optional: true 27 | - id: 2 28 | type: string 29 | optional: true 30 | name: scene_2 31 | - id: 3 32 | type: string 33 | optional: true 34 | name: scene_3 35 | - id: 4 36 | type: string 37 | optional: true 38 | name: scene_4 39 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/zigbee_zth08ztu_temphumid_sensor.yaml: -------------------------------------------------------------------------------- 1 | name: Temperature humidity sensor 2 | products: 3 | - id: cirvgep4 4 | model: ZTH08ZTU 5 | entities: 6 | - entity: sensor 7 | class: temperature 8 | dps: 9 | - id: 1 10 | type: integer 11 | name: sensor 12 | unit: C 13 | class: measurement 14 | mapping: 15 | - scale: 10 16 | - entity: sensor 17 | class: humidity 18 | dps: 19 | - id: 2 20 | type: integer 21 | name: sensor 22 | unit: "%" 23 | class: measurement 24 | - entity: sensor 25 | class: battery 26 | category: diagnostic 27 | dps: 28 | - id: 3 29 | type: integer 30 | name: sensor 31 | optional: true 32 | unit: "%" 33 | mapping: 34 | - dps_val: low 35 | value: 20 36 | - dps_val: middle 37 | value: 50 38 | - dps_val: high 39 | value: 90 40 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/benexmart_blind_motor.yaml: -------------------------------------------------------------------------------- 1 | name: benexmart blind motor 2 | entities: 3 | - entity: cover 4 | class: blind 5 | dps: 6 | - id: 1 7 | name: control 8 | type: string 9 | mapping: 10 | - dps_val: open 11 | value: open 12 | - dps_val: close 13 | value: close 14 | - dps_val: stop 15 | value: stop 16 | - id: 2 17 | name: position 18 | type: integer 19 | range: 20 | min: 0 21 | max: 100 22 | mapping: 23 | - invert: true 24 | - id: 2 25 | name: current_position 26 | type: integer 27 | range: 28 | min: 0 29 | max: 100 30 | mapping: 31 | - invert: true 32 | - entity: switch 33 | category: config 34 | name: Reversed 35 | icon: "mdi:arrow-u-down-left" 36 | dps: 37 | - id: 5 38 | type: boolean 39 | name: switch 40 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/yp_petfeeeder.yaml: -------------------------------------------------------------------------------- 1 | name: Pet feeder 2 | products: 3 | - id: wfnmgiqqch80sg1w 4 | manufacturer: YP 5 | model: PAF-40PCS-WBR3 6 | entities: 7 | - entity: number 8 | icon: "mdi:paw" 9 | name: Manual feed 10 | dps: 11 | - id: 3 12 | name: value 13 | type: integer 14 | range: 15 | min: 1 16 | max: 40 17 | - id: 1 18 | name: meal_plan 19 | type: string 20 | - entity: sensor 21 | icon: "mdi:paw" 22 | name: Feed report 23 | category: diagnostic 24 | dps: 25 | - id: 15 26 | name: sensor 27 | type: integer 28 | - entity: button 29 | translation_key: factory_reset 30 | category: config 31 | dps: 32 | - id: 9 33 | type: boolean 34 | name: button 35 | - entity: binary_sensor 36 | class: problem 37 | category: diagnostic 38 | dps: 39 | - id: 14 40 | type: boolean 41 | name: sensor 42 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/simple_gate_opener.yaml: -------------------------------------------------------------------------------- 1 | # Based on info on the web, this is a common subset of Garage door opener dps. 2 | name: Simple garage-door-gate opener 3 | products: 4 | - id: b1uk4ftduaqopxv1 5 | entities: 6 | - entity: cover 7 | class: gate 8 | dps: 9 | - id: 1 10 | name: control 11 | type: boolean 12 | force: true 13 | mapping: 14 | - dps_val: true 15 | value: "open" 16 | - dps_val: false 17 | value: "close" 18 | - id: 101 19 | name: open 20 | type: boolean 21 | - entity: number 22 | category: config 23 | class: duration 24 | translation_key: timer 25 | dps: 26 | - id: 7 27 | type: integer 28 | optional: true 29 | name: value 30 | unit: min 31 | range: 32 | min: 0 33 | max: 86400 34 | mapping: 35 | - scale: 60 36 | step: 60 37 | - dps_val: null 38 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/eurom_600_heater_v2.yaml: -------------------------------------------------------------------------------- 1 | name: Eurom Mon Soleil heater 2 | entities: 3 | - entity: climate 4 | translation_only_key: heater 5 | dps: 6 | - id: 1 7 | type: boolean 8 | mapping: 9 | - dps_val: false 10 | value: "off" 11 | - dps_val: true 12 | value: "heat" 13 | name: hvac_mode 14 | - id: 2 15 | type: integer 16 | range: 17 | min: 0 18 | max: 37 19 | name: temperature 20 | unit: C 21 | - id: 5 22 | type: integer 23 | name: current_temperature 24 | - entity: binary_sensor 25 | category: diagnostic 26 | class: problem 27 | dps: 28 | - id: 7 29 | type: bitfield 30 | name: sensor 31 | mapping: 32 | - dps_val: 0 33 | value: false 34 | - value: true 35 | - id: 7 36 | type: bitfield 37 | name: fault_code 38 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/eglo_ceiling_fan.yaml: -------------------------------------------------------------------------------- 1 | name: Ceiling fan 2 | products: 3 | - id: k8j78n65zeu3orz7 4 | manufacturer: Eglo 5 | model: Surf 6 | entities: 7 | - entity: fan 8 | dps: 9 | - id: 60 10 | type: boolean 11 | name: switch 12 | - id: 62 13 | type: integer 14 | name: speed 15 | mapping: 16 | - dps_val: 0 17 | value: 0 18 | - dps_val: 1 19 | value: 20 20 | - dps_val: 2 21 | value: 40 22 | - dps_val: 3 23 | value: 60 24 | - dps_val: 4 25 | value: 80 26 | - dps_val: 5 27 | value: 100 28 | # Sleep mode - extra slow 29 | - dps_val: -1 30 | value: 10 31 | - id: 63 32 | type: string 33 | name: direction 34 | - id: 64 35 | type: integer 36 | name: timer 37 | range: 38 | min: 0 39 | max: 540 40 | unit: min 41 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/carro_pn04f02d_fan_light.yaml: -------------------------------------------------------------------------------- 1 | name: Ceiling fan 2 | products: 3 | - id: 6ahfblexspuaem65 4 | manufacturer: Carro 5 | model: PN-04F02D 6 | entities: 7 | - entity: light 8 | dps: 9 | - id: 20 10 | type: boolean 11 | name: switch 12 | - id: 21 13 | type: string 14 | # Shows in the docs with standard white/colour/scene/music 15 | # properties but this is a dimming switch and doesn't have those 16 | name: work_mode 17 | optional: true 18 | - id: 22 19 | name: brightness 20 | type: integer 21 | range: 22 | min: 10 23 | max: 1000 24 | - id: 28 25 | type: string 26 | name: control_data 27 | optional: true 28 | - entity: fan 29 | dps: 30 | - id: 60 31 | type: boolean 32 | name: switch 33 | - id: 62 34 | type: integer 35 | name: speed 36 | range: 37 | min: 1 38 | max: 3 39 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/position_blinds.yaml: -------------------------------------------------------------------------------- 1 | name: Blind controller 2 | entities: 3 | - entity: cover 4 | class: blind 5 | dps: 6 | - id: 1 7 | name: control 8 | type: string 9 | mapping: 10 | - dps_val: open 11 | value: open 12 | - dps_val: close 13 | value: close 14 | - dps_val: stop 15 | value: stop 16 | - id: 2 17 | name: position 18 | type: integer 19 | range: 20 | min: 0 21 | max: 100 22 | mapping: 23 | - invert: true 24 | - id: 2 25 | name: current_position 26 | type: integer 27 | range: 28 | min: 0 29 | max: 100 30 | mapping: 31 | - invert: true 32 | - id: 5 33 | name: control_back_mode 34 | type: boolean 35 | - id: 7 36 | # seems intended to match action, but doesn't change in observation 37 | name: work_state 38 | type: string 39 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/powerstrip_6outlet_usbs.yaml: -------------------------------------------------------------------------------- 1 | name: 6 outlet + 4 USB power strip 2 | products: 3 | - id: 2fcngzxvsivfzhzj 4 | manufacturer: ACME 5 | model: SH3305 6 | entities: 7 | - entity: switch 8 | translation_key: switch_x 9 | translation_placeholders: 10 | x: "1" 11 | class: outlet 12 | dps: 13 | - id: 1 14 | type: boolean 15 | name: switch 16 | - id: 101 17 | type: integer 18 | name: countdown 19 | - entity: switch 20 | translation_key: switch_x 21 | translation_placeholders: 22 | x: "2" 23 | class: outlet 24 | dps: 25 | - id: 2 26 | type: boolean 27 | name: switch 28 | - id: 102 29 | type: integer 30 | name: countdown_2 31 | - entity: switch 32 | name: USB 33 | class: switch 34 | icon: "mdi:usb" 35 | dps: 36 | - id: 7 37 | type: boolean 38 | name: switch 39 | - id: 105 40 | type: integer 41 | name: countdown_usb 42 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/eurom_600_heater.yaml: -------------------------------------------------------------------------------- 1 | name: Eurom Mon Soleil heater 2 | legacy_type: eurom_heater 3 | entities: 4 | - entity: climate 5 | translation_only_key: heater 6 | dps: 7 | - id: 1 8 | type: boolean 9 | mapping: 10 | - dps_val: false 11 | value: "off" 12 | - dps_val: true 13 | value: "heat" 14 | name: hvac_mode 15 | - id: 2 16 | type: integer 17 | range: 18 | min: 0 19 | max: 37 20 | name: temperature 21 | unit: C 22 | - id: 5 23 | type: integer 24 | name: current_temperature 25 | - entity: binary_sensor 26 | category: diagnostic 27 | class: problem 28 | dps: 29 | - id: 6 30 | type: bitfield 31 | name: sensor 32 | mapping: 33 | - dps_val: 0 34 | value: false 35 | - value: true 36 | - id: 6 37 | type: bitfield 38 | name: fault_code 39 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright 2018 Nik Rolls, 2020 Jason Rumney 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/treatlife_ds02_fan.yaml: -------------------------------------------------------------------------------- 1 | name: Fan switch 2 | products: 3 | - id: qmijt70hk4op6snl 4 | manufacturer: Treatlife 5 | model: DS02-F 6 | entities: 7 | - entity: fan 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 3 13 | type: string 14 | name: speed 15 | mapping: 16 | - dps_val: level_1 17 | value: 25 18 | step: 25 19 | - dps_val: level_2 20 | value: 50 21 | step: 25 22 | - dps_val: level_3 23 | value: 75 24 | step: 25 25 | - dps_val: level_4 26 | value: 100 27 | step: 25 28 | - entity: number 29 | class: duration 30 | translation_key: timer 31 | category: config 32 | dps: 33 | - id: 2 34 | type: integer 35 | name: value 36 | unit: min 37 | range: 38 | min: 0 39 | max: 86400 40 | mapping: 41 | - scale: 60 42 | step: 60 43 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/cct_v1_lightbulb.yaml: -------------------------------------------------------------------------------- 1 | name: CCT Light 2 | products: 3 | - id: xhkuywg6rwwqocl6 4 | manufacturer: Connect 5 | model: White GU10 6 | - id: hvfqgkigk9nj0p6p 7 | manufacturer: Geeni 8 | model: GN-BW223-999 9 | - id: 41xqxqiflb6lqaqv 10 | manufacturer: Geeni 11 | model: GN-BW223-999 12 | - id: gbi4ljmlyrxx23mz 13 | manufacturer: Geeni 14 | model: GN-BW230-999 15 | - id: xhkuywg6rwwqocl6 16 | manufacturer: Laser 17 | model: SMT-WWDL53-L 18 | entities: 19 | - entity: light 20 | dps: 21 | - id: 1 22 | type: boolean 23 | name: switch 24 | - id: 2 25 | type: integer 26 | name: brightness 27 | optional: true 28 | range: 29 | min: 25 30 | max: 255 31 | - id: 3 32 | type: integer 33 | optional: true 34 | name: color_temp 35 | range: 36 | min: 0 37 | max: 255 38 | mapping: 39 | - target_range: 40 | min: 2700 41 | max: 6500 42 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/deltaco_shlw5m_ledstrip.yaml: -------------------------------------------------------------------------------- 1 | name: LED strip 2 | products: 3 | - id: gplzywt8cht24mhs 4 | manufacturer: Deltaco 5 | model: SH-LW5M 6 | entities: 7 | - entity: light 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 3 13 | type: integer 14 | name: brightness 15 | optional: true 16 | range: 17 | min: 25 18 | max: 255 19 | - id: 104 20 | type: string 21 | name: effect 22 | optional: true 23 | mapping: 24 | - dps_val: "1" 25 | value: "Combination" 26 | - dps_val: "2" 27 | value: "In Wave" 28 | - dps_val: "3" 29 | value: "Sequence" 30 | - dps_val: "4" 31 | value: "Slo-glo" 32 | - dps_val: "5" 33 | value: "Chasing" 34 | - dps_val: "6" 35 | value: "Fade" 36 | - dps_val: "7" 37 | value: "Twinkle" 38 | - dps_val: "8" 39 | value: "Steady" 40 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/ble_orion_lock.yaml: -------------------------------------------------------------------------------- 1 | name: Door lock 2 | products: 3 | - id: a6nttc41 4 | manufacturer: Orion 5 | model: DL021HA 6 | entities: 7 | - entity: lock 8 | dps: 9 | - id: 1 10 | type: string 11 | name: unlock_method_register 12 | optional: true 13 | sensitive: true 14 | - id: 2 15 | type: string 16 | name: unlock_method_delete 17 | optional: true 18 | - id: 12 19 | type: integer 20 | name: unlock_fingerprint 21 | persist: false 22 | optional: true 23 | - id: 19 24 | type: integer 25 | name: unlock_app 26 | persist: false 27 | optional: true 28 | - id: 33 29 | type: boolean 30 | name: lock 31 | - id: 54 32 | type: string 33 | name: sync_method 34 | optional: true 35 | sensitive: true 36 | - entity: sensor 37 | class: battery 38 | category: diagnostic 39 | dps: 40 | - id: 8 41 | type: integer 42 | name: sensor 43 | unit: "%" 44 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/iebelong_ech_doorbell_rfhub.yaml: -------------------------------------------------------------------------------- 1 | name: Doorbell 2 | products: 3 | - id: mu90mkl2valkaar3 4 | manufacturer: Iebelong 5 | model: ECH-103 6 | name: Doorbell and 433MHz RF hub 7 | entities: 8 | - entity: siren 9 | dps: 10 | - id: 30 11 | type: string 12 | name: volume_level 13 | mapping: 14 | - dps_val: mute 15 | value: 0.0 16 | - dps_val: low 17 | value: 0.33 18 | - dps_val: middle 19 | value: 0.67 20 | - dps_val: high 21 | value: 1.0 22 | - id: 39 23 | type: string 24 | name: tone 25 | optional: true 26 | mapping: 27 | - dps_val: "1" 28 | value: Tone 1 29 | - dps_val: "2" 30 | value: Tone 2 31 | - dps_val: "3" 32 | value: Tone 3 33 | - dps_val: "4" 34 | value: Tone 4 35 | - dps_val: "5" 36 | value: Tone 5 37 | - id: 26 38 | type: string 39 | name: alarm_msg 40 | optional: true 41 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/kogan_garage_opener.yaml: -------------------------------------------------------------------------------- 1 | name: Kogan garage door 2 | entities: 3 | - entity: cover 4 | class: garage 5 | dps: 6 | - id: 101 7 | name: control 8 | type: string 9 | mapping: 10 | - dps_val: "fopen" 11 | value: "open" 12 | - dps_val: "fclose" 13 | value: "close" 14 | - id: 102 15 | name: action 16 | type: string 17 | mapping: 18 | - dps_val: openning 19 | value: opening 20 | - dps_val: opened 21 | value: opened 22 | - dps_val: closing 23 | value: closing 24 | - dps_val: closed 25 | value: closed 26 | - entity: sensor 27 | class: battery 28 | category: diagnostic 29 | dps: 30 | - id: 104 31 | name: sensor 32 | type: integer 33 | - entity: binary_sensor 34 | name: Door open 35 | class: garage_door 36 | category: diagnostic 37 | dps: 38 | - id: 105 39 | name: sensor 40 | type: boolean 41 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/deta_dimmer_switch.yaml: -------------------------------------------------------------------------------- 1 | name: Dimmer switch 2 | products: 3 | - id: zdbapiyvwyi4wtrr 4 | manufacturer: Deta 5 | model: 6910HA series2 6 | entities: 7 | - entity: light 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 2 13 | name: brightness 14 | type: integer 15 | range: 16 | min: 10 17 | max: 1000 18 | - entity: number 19 | name: Minimum brightness 20 | category: config 21 | icon: "mdi:lightbulb-on-50" 22 | dps: 23 | - id: 3 24 | type: integer 25 | name: value 26 | range: 27 | min: 10 28 | max: 1000 29 | unit: "%" 30 | mapping: 31 | - scale: 10 32 | - entity: number 33 | translation_key: timer 34 | class: duration 35 | category: config 36 | dps: 37 | - id: 6 38 | type: integer 39 | name: value 40 | unit: min 41 | range: 42 | min: 0 43 | max: 86400 44 | mapping: 45 | - scale: 60 46 | step: 60 47 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/dimming_lightbulb.yaml: -------------------------------------------------------------------------------- 1 | name: Dimming lightbulb 2 | products: 3 | - id: uoqzzanrvopvxddl 4 | manufacturer: Deta 5 | model: Grid Connect Smart 18W 1900lm 6 | name: Daylight T8 tube 7 | model_id: DET018HA 8 | - id: vjapigi170njdq09 9 | manufacturer: Arlec 10 | model: Smart 4W 380lm 11 | name: Candle dimmable bulb 12 | model_id: GLD060HA 13 | - id: aok3caeleulg1neh 14 | model: S10 15 | name: Wireless dimmer 16 | entities: 17 | - entity: light 18 | dps: 19 | - id: 20 20 | type: boolean 21 | name: switch 22 | - id: 22 23 | name: brightness 24 | type: integer 25 | range: 26 | min: 10 27 | max: 1000 28 | - entity: number 29 | translation_key: timer 30 | class: duration 31 | category: config 32 | dps: 33 | - id: 26 34 | type: integer 35 | name: value 36 | unit: min 37 | optional: true 38 | range: 39 | min: 0 40 | max: 86400 41 | mapping: 42 | - scale: 60 43 | step: 60 44 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/th05_temp_humidity_sensor.yaml: -------------------------------------------------------------------------------- 1 | name: Temperature and humidity Sensor 2 | products: 3 | - id: vyfoip9h 4 | model: TH05-BLE 5 | entities: 6 | - entity: sensor 7 | class: temperature 8 | dps: 9 | - id: 1 10 | name: sensor 11 | type: integer 12 | unit: C 13 | mapping: 14 | - scale: 10 15 | class: measurement 16 | - entity: sensor 17 | class: humidity 18 | dps: 19 | - id: 2 20 | type: integer 21 | name: sensor 22 | unit: "%" 23 | class: measurement 24 | - entity: select 25 | translation_key: temperature_unit 26 | category: config 27 | dps: 28 | - id: 9 29 | name: option 30 | type: string 31 | mapping: 32 | - dps_val: "f" 33 | value: fahrenheit 34 | - dps_val: "c" 35 | value: celsius 36 | optional: true 37 | - entity: sensor 38 | class: battery 39 | category: diagnostic 40 | dps: 41 | - id: 4 42 | type: integer 43 | name: sensor 44 | unit: "%" 45 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/dooya_curtain.yaml: -------------------------------------------------------------------------------- 1 | name: Curtain 2 | legacy_type: smartcurtain_acs_wt 3 | products: 4 | - id: spjpuwf1u2dc7tlt 5 | model: SmartCurtain 3 6 | entities: 7 | - entity: cover 8 | class: curtain 9 | dps: 10 | - id: 101 11 | type: string 12 | name: control 13 | mapping: 14 | - dps_val: open 15 | value: open 16 | - dps_val: close 17 | value: close 18 | - dps_val: stop 19 | value: stop 20 | - id: 102 21 | type: integer 22 | name: current_position 23 | - id: 104 24 | type: integer 25 | name: position 26 | - entity: select 27 | name: Direction 28 | icon: "mdi:swap-horizontal" 29 | category: config 30 | dps: 31 | - id: 103 32 | type: boolean 33 | optional: true 34 | name: option 35 | mapping: 36 | - dps_val: false 37 | value: Forward 38 | - dps_val: true 39 | value: Reverse 40 | - dps_val: null 41 | value: Forward 42 | hidden: true 43 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/rl_video_lock.yaml: -------------------------------------------------------------------------------- 1 | name: Video intercom 2 | entities: 3 | - entity: camera 4 | dps: 5 | - id: 150 6 | name: record 7 | type: boolean 8 | optional: true 9 | mapping: 10 | - dps_val: null 11 | value: false 12 | - id: 154 13 | name: snapshot 14 | type: base64 15 | optional: true 16 | sensitive: true 17 | - id: 191 18 | name: smart_action 19 | type: string 20 | optional: true 21 | - entity: lock 22 | name: Lock 1 23 | dps: 24 | - id: 148 25 | type: boolean 26 | name: lock 27 | - entity: lock 28 | name: Lock 2 29 | dps: 30 | - id: 232 31 | type: boolean 32 | name: lock 33 | - entity: event 34 | class: doorbell 35 | category: diagnostic 36 | dps: 37 | - id: 136 38 | type: string 39 | name: event 40 | optional: true 41 | mapping: 42 | - dps_val: "" 43 | value: null 44 | - dps_val: null 45 | value: null 46 | - value: ring 47 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/gorilla_fan_v2.yaml: -------------------------------------------------------------------------------- 1 | name: Ceiling fan 2 | # products: 3 | # - id: UNKNOWN 4 | # manufacturer: Atomberg 5 | # model: Gorilla Fan V2 6 | entities: 7 | - entity: fan 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 3 13 | type: integer 14 | name: speed 15 | range: 16 | min: 1 17 | max: 5 18 | - entity: light 19 | translation_key: nightlight 20 | dps: 21 | - id: 15 22 | type: boolean 23 | name: switch 24 | - entity: switch 25 | name: Boost 26 | icon: mdi:car-turbocharger 27 | dps: 28 | - id: 115 29 | type: boolean 30 | name: switch 31 | - entity: switch 32 | translation_key: sleep 33 | dps: 34 | - id: 113 35 | type: boolean 36 | name: switch 37 | - entity: number 38 | translation_key: timer 39 | class: duration 40 | category: config 41 | dps: 42 | - id: 102 43 | type: integer 44 | name: value 45 | unit: min 46 | range: 47 | min: 0 48 | max: 360 49 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/arlec_fan.yaml: -------------------------------------------------------------------------------- 1 | name: ARLEC Grid Connect Fan 2 | entities: 3 | - entity: fan 4 | translation_only_key: fan_with_presets 5 | dps: 6 | - id: 1 7 | name: switch 8 | type: boolean 9 | - id: 3 10 | name: speed 11 | type: integer 12 | range: 13 | min: 1 14 | max: 6 15 | - id: 4 16 | name: direction 17 | type: string 18 | - id: 102 19 | name: preset_mode 20 | type: string 21 | mapping: 22 | - dps_val: normal 23 | value: normal 24 | - dps_val: sleep 25 | value: sleep 26 | - dps_val: breeze 27 | value: nature 28 | - entity: select 29 | translation_key: timer 30 | category: config 31 | dps: 32 | - id: 103 33 | name: option 34 | type: string 35 | mapping: 36 | - dps_val: "off" 37 | value: cancel 38 | - dps_val: 2hour 39 | value: "2h" 40 | - dps_val: 4hour 41 | value: "4h" 42 | - dps_val: 8hour 43 | value: "8h" 44 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/ble_tcs024b_smart_plant_moisture.yaml: -------------------------------------------------------------------------------- 1 | name: Soil moisture sensor 2 | products: 3 | - id: j5mynqs3 4 | model: TCS024B 5 | entities: 6 | - entity: sensor 7 | class: moisture 8 | dps: 9 | - id: 2 10 | name: sensor 11 | type: integer 12 | unit: "%" 13 | - entity: sensor 14 | class: temperature 15 | dps: 16 | - id: 1 17 | name: sensor 18 | type: integer 19 | class: measurement 20 | - id: 9 21 | name: unit 22 | type: string 23 | mapping: 24 | - dps_val: f 25 | value: F 26 | - value: C 27 | - entity: sensor 28 | class: battery 29 | category: diagnostic 30 | dps: 31 | - id: 4 32 | type: integer 33 | name: sensor 34 | unit: "%" 35 | - entity: select 36 | translation_key: temperature_unit 37 | category: config 38 | dps: 39 | - id: 9 40 | type: string 41 | name: option 42 | mapping: 43 | - dps_val: c 44 | value: celsius 45 | - dps_val: f 46 | value: fahrenheit 47 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/feit_dimmer.yaml: -------------------------------------------------------------------------------- 1 | name: Dimmable light 2 | products: 3 | - id: tebc75erlgslgpn5 4 | manufacturer: Feit 5 | name: Dimmer 6 | entities: 7 | - entity: light 8 | dps: 9 | - id: 1 10 | name: switch 11 | type: boolean 12 | optional: true 13 | mapping: 14 | - dps_val: null 15 | value: false 16 | - id: 2 17 | name: brightness 18 | type: integer 19 | range: 20 | min: 10 21 | max: 1000 22 | - id: 3 23 | # advisory only, the integration does not actually use this, setting it 24 | # does not seem to work, so probably determined by bulb type 25 | type: integer 26 | name: minimum_brightness 27 | optional: true 28 | - entity: select 29 | name: Light Type 30 | icon: mdi:lightbulb-variant 31 | category: config 32 | dps: 33 | - id: 4 34 | type: string 35 | name: option 36 | optional: true 37 | mapping: 38 | - dps_val: incandescent 39 | value: Incandescent 40 | - dps_val: halogen 41 | value: LED 42 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/nue_smart_fan_3speed_light.yaml: -------------------------------------------------------------------------------- 1 | name: Fan and light controller 2 | products: 3 | - id: hqq73kftvzh8c92u 4 | manufacturer: 3A Nue 5 | model: LGT-SWCH10006 6 | entities: 7 | - entity: fan 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 3 13 | type: string 14 | name: speed 15 | mapping: 16 | - dps_val: "1" 17 | value: 33 18 | - dps_val: "2" 19 | value: 66 20 | - dps_val: "3" 21 | value: 100 22 | - entity: light 23 | dps: 24 | - id: 9 25 | type: boolean 26 | name: switch 27 | - entity: number 28 | translation_key: timer 29 | category: config 30 | class: duration 31 | dps: 32 | - id: 6 33 | name: value 34 | type: integer 35 | unit: h 36 | range: 37 | min: 0 38 | max: 6 39 | - entity: sensor 40 | translation_key: time_remaining 41 | category: diagnostic 42 | class: duration 43 | dps: 44 | - id: 7 45 | name: sensor 46 | type: integer 47 | unit: min 48 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/greenwind_dehumidifier.yaml: -------------------------------------------------------------------------------- 1 | name: Dehumidifier 2 | products: 3 | - id: 3ZXJDubQ13lNTaLT 4 | manufacturer: Greenwind 5 | entities: 6 | - entity: humidifier 7 | class: dehumidifier 8 | dps: 9 | - id: 1 10 | name: switch 11 | type: boolean 12 | - id: 5 13 | name: mode 14 | type: integer 15 | mapping: 16 | - dps_val: 1 17 | value: eco 18 | - dps_val: 2 19 | value: normal 20 | - dps_val: 3 21 | value: boost 22 | - id: 6 23 | name: humidity 24 | type: integer 25 | range: 26 | min: 20 27 | max: 80 28 | - id: 18 29 | name: current_humidity 30 | type: integer 31 | - entity: binary_sensor 32 | class: problem 33 | category: diagnostic 34 | dps: 35 | - id: 15 36 | type: bitfield 37 | name: sensor 38 | mapping: 39 | - dps_val: 0 40 | value: false 41 | - value: true 42 | - id: 15 43 | type: bitfield 44 | name: fault_code 45 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/linkoze_dual_button.yaml: -------------------------------------------------------------------------------- 1 | name: Dual buttons 2 | products: 3 | - id: l8yaz4um5b3pwyvf 4 | manufacturer: Linkoze 5 | model: LKWSW201 6 | entities: 7 | - entity: event 8 | name: Button 1 9 | class: button 10 | dps: 11 | - id: 1 12 | type: string 13 | name: event 14 | mapping: 15 | - dps_val: single_click 16 | value: single_click 17 | - dps_val: long_press 18 | value: long_press 19 | - dps_val: double_click 20 | value: double_click 21 | - entity: event 22 | name: Button 2 23 | class: button 24 | dps: 25 | - id: 2 26 | type: string 27 | name: event 28 | mapping: 29 | - dps_val: single_click 30 | value: single_click 31 | - dps_val: long_press 32 | value: long_press 33 | - dps_val: double_click 34 | value: double_click 35 | - entity: sensor 36 | class: battery 37 | category: diagnostic 38 | dps: 39 | - id: 10 40 | type: integer 41 | name: sensor 42 | unit: "%" 43 | optional: true 44 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/blitzwolf_bwshp9_powerstrip.yaml: -------------------------------------------------------------------------------- 1 | name: 3 outlet + USB powerstrip 2 | products: 3 | - id: 4es44udrj48pqtlb 4 | manufacturer: BlitzWolf 5 | model: SHP-9 6 | entities: 7 | - entity: switch 8 | class: outlet 9 | translation_key: outlet_x 10 | translation_placeholders: 11 | x: "1" 12 | dps: 13 | - id: 1 14 | type: boolean 15 | name: switch 16 | - entity: switch 17 | translation_key: outlet_x 18 | translation_placeholders: 19 | x: "2" 20 | class: outlet 21 | dps: 22 | - id: 2 23 | type: boolean 24 | name: switch 25 | - entity: switch 26 | translation_key: outlet_x 27 | translation_placeholders: 28 | x: "3" 29 | class: outlet 30 | dps: 31 | - id: 3 32 | type: boolean 33 | name: switch 34 | - entity: switch 35 | name: USB 36 | class: switch 37 | icon: "mdi:usb" 38 | dps: 39 | - id: 7 40 | type: boolean 41 | name: switch 42 | - entity: switch 43 | name: Switch All 44 | class: switch 45 | dps: 46 | - id: 101 47 | type: boolean 48 | name: switch 49 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/nooie_pu13_smartplug.yaml: -------------------------------------------------------------------------------- 1 | name: SmartPlug 2 | products: 3 | - id: eimdzrehi6a6vixn 4 | manufacturer: Nooie 5 | model: PU13 6 | entities: 7 | - entity: switch 8 | class: outlet 9 | dps: 10 | - id: 1 11 | name: switch 12 | type: boolean 13 | - entity: number 14 | translation_key: timer 15 | class: duration 16 | category: config 17 | dps: 18 | - id: 9 19 | type: integer 20 | name: value 21 | unit: min 22 | range: 23 | min: 0 24 | max: 86400 25 | mapping: 26 | - scale: 60 27 | step: 60 28 | - entity: lock 29 | translation_key: child_lock 30 | category: config 31 | dps: 32 | - id: 41 33 | type: boolean 34 | name: lock 35 | - entity: select 36 | translation_key: initial_state 37 | category: config 38 | dps: 39 | - id: 39 40 | type: string 41 | name: option 42 | mapping: 43 | - dps_val: 1 44 | value: "on" 45 | - dps_val: 0 46 | value: "off" 47 | - dps_val: 2 48 | value: memory 49 | -------------------------------------------------------------------------------- /util/best_match.py: -------------------------------------------------------------------------------- 1 | """Find matching devices for the supplied dp list""" 2 | 3 | import json 4 | import sys 5 | 6 | from common_funcs import FakeDevice 7 | 8 | from custom_components.tuya_local.helpers.device_config import possible_matches 9 | 10 | 11 | def main() -> int: 12 | dps = json.loads(" ".join(sys.argv[1:])) 13 | device = FakeDevice(dps) 14 | best = 0 15 | best_matches = set() 16 | 17 | for m in possible_matches(dps): 18 | if m.match_quality(dps) > best: 19 | best_matches.clear() 20 | best = m.match_quality(dps) 21 | 22 | if m.match_quality(dps) == best: 23 | best_matches.add(m) 24 | 25 | for m in best_matches: 26 | dps_seen = set(dps.keys()) 27 | print(f"{m.config_type} matched {m.match_quality(dps)}%") 28 | for entity in m.all_entities(): 29 | print(f" {entity.config_id}:") 30 | for dp in entity.dps(): 31 | dps_seen.discard(dp.id) 32 | print(f" {dp.name}: {dp.get_value(device)}") 33 | for dp in dps_seen: 34 | print(f" Missing {dp}: {dps[dp]}") 35 | 36 | 37 | if __name__ == "__main__": 38 | sys.exit(main()) 39 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/th16_temp_humidity_sensor.yaml: -------------------------------------------------------------------------------- 1 | name: Temperature and humidity sensor 2 | products: 3 | - id: 7akwzwfwhukkdsib 4 | model: TH16 5 | model_id: TH06WB3S 6 | entities: 7 | - entity: sensor 8 | class: temperature 9 | dps: 10 | - id: 1 11 | name: sensor 12 | type: integer 13 | unit: C 14 | mapping: 15 | - scale: 10 16 | class: measurement 17 | - entity: sensor 18 | class: humidity 19 | dps: 20 | - id: 2 21 | type: integer 22 | name: sensor 23 | unit: "%" 24 | class: measurement 25 | - entity: select 26 | translation_key: temperature_unit 27 | category: config 28 | dps: 29 | - id: 9 30 | name: option 31 | type: string 32 | mapping: 33 | - dps_val: "f" 34 | value: fahrenheit 35 | - dps_val: "c" 36 | value: celsius 37 | optional: true 38 | - entity: light 39 | translation_key: display 40 | category: config 41 | dps: 42 | - id: 21 43 | type: boolean 44 | name: switch 45 | optional: true 46 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: Python tests 2 | 3 | on: 4 | workflow_dispatch: 5 | pull_request: 6 | paths: 7 | - '**.py' 8 | push: 9 | paths: 10 | - '**.py' 11 | 12 | jobs: 13 | tests: 14 | runs-on: ubuntu-latest 15 | strategy: 16 | matrix: 17 | python-version: ['3.13'] 18 | 19 | steps: 20 | - uses: actions/checkout@v4 21 | with: 22 | fetch-depth: 0 23 | - name: Set up Python ${{ matrix.python-version }} 24 | uses: actions/setup-python@v5 25 | with: 26 | python-version: ${{ matrix.python-version }} 27 | - name: Install dependencies 28 | run: | 29 | python -m pip install --upgrade pip 30 | pip install -r requirements-dev.txt 31 | - name: Full test with pytest 32 | run: pytest --cov=custom_components/tuya_local --cov-report term:skip-covered --junit-xml=test-results.xml 33 | - name: Surface results 34 | if: always() 35 | uses: pmeier/pytest-results-action@main 36 | with: 37 | path: test-results.xml 38 | summary: true 39 | display-options: fEX 40 | fail-on-empty: true 41 | title: Test results 42 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/windcalm_fan_with_light.yaml: -------------------------------------------------------------------------------- 1 | name: Windcalm Ceiling Fan with Light 2 | entities: 3 | - entity: fan 4 | dps: 5 | - id: 60 6 | type: boolean 7 | name: switch 8 | - id: 62 9 | type: integer 10 | name: speed 11 | range: 12 | min: 1 13 | max: 6 14 | - id: 63 15 | type: string 16 | name: direction 17 | - entity: light 18 | dps: 19 | - id: 20 20 | type: boolean 21 | name: switch 22 | - id: 22 23 | name: brightness 24 | type: integer 25 | optional: true 26 | range: 27 | min: 10 28 | max: 1000 29 | - id: 23 30 | name: color_temp 31 | type: integer 32 | range: 33 | min: 0 34 | max: 1000 35 | mapping: 36 | - target_range: 37 | min: 3000 38 | max: 6500 39 | - entity: number 40 | class: duration 41 | translation_key: timer 42 | category: config 43 | dps: 44 | - id: 64 45 | type: integer 46 | name: value 47 | unit: min 48 | range: 49 | min: 0 50 | max: 540 51 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/brilliant_quad_powerstrip_usb.yaml: -------------------------------------------------------------------------------- 1 | name: Quad powerstrip with USB 2 | products: 3 | - id: keyphg5es7xsedyr 4 | manufacturer: Brilliant Smart 5 | entities: 6 | - entity: switch 7 | translation_key: outlet_x 8 | translation_placeholders: 9 | x: "1" 10 | class: outlet 11 | dps: 12 | - id: 1 13 | type: boolean 14 | name: switch 15 | - entity: switch 16 | translation_key: outlet_x 17 | translation_placeholders: 18 | x: "2" 19 | class: outlet 20 | dps: 21 | - id: 2 22 | type: boolean 23 | name: switch 24 | - entity: switch 25 | translation_key: outlet_x 26 | translation_placeholders: 27 | x: "3" 28 | class: outlet 29 | dps: 30 | - id: 3 31 | type: boolean 32 | name: switch 33 | - entity: switch 34 | translation_key: outlet_x 35 | translation_placeholders: 36 | x: "4" 37 | class: outlet 38 | dps: 39 | - id: 4 40 | type: boolean 41 | name: switch 42 | - entity: switch 43 | name: USB 44 | class: outlet 45 | icon: mdi:usb 46 | dps: 47 | - id: 5 48 | type: boolean 49 | name: switch 50 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/moes_touch_curtain_switch.yaml: -------------------------------------------------------------------------------- 1 | name: Curtain switch 2 | products: 3 | - id: 6tb9dko4t15optxz 4 | manufacturer: Moes 5 | model: SCS80 Touch 6 | entities: 7 | - entity: cover 8 | class: curtain 9 | dps: 10 | - id: 1 11 | name: control 12 | type: string 13 | mapping: 14 | - dps_val: open 15 | value: open 16 | - dps_val: close 17 | value: close 18 | - dps_val: continue 19 | value: stop 20 | - entity: light 21 | translation_key: backlight 22 | category: config 23 | dps: 24 | - id: 7 25 | type: boolean 26 | name: switch 27 | - entity: number 28 | name: Time control 29 | category: config 30 | class: duration 31 | icon: "mdi:timer" 32 | dps: 33 | - id: 10 34 | type: integer 35 | name: value 36 | unit: s 37 | range: 38 | min: 10 39 | max: 120 40 | - entity: button 41 | name: Stop button 42 | category: config 43 | icon: "mdi:stop" 44 | dps: 45 | - id: 101 46 | type: boolean 47 | name: button 48 | optional: true 49 | persist: false 50 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/goldair_fan.yaml: -------------------------------------------------------------------------------- 1 | name: Goldair fan 2 | legacy_type: fan 3 | entities: 4 | - entity: fan 5 | translation_only_key: fan_with_presets 6 | dps: 7 | - id: 1 8 | type: boolean 9 | name: switch 10 | - id: 2 11 | type: integer 12 | name: speed 13 | range: 14 | min: 1 15 | max: 12 16 | mapping: 17 | - constraint: preset_mode 18 | conditions: 19 | - dps_val: nature 20 | step: 4 21 | - dps_val: sleep 22 | step: 4 23 | - id: 3 24 | type: string 25 | mapping: 26 | - dps_val: normal 27 | value: normal 28 | - dps_val: nature 29 | value: nature 30 | - dps_val: sleep 31 | value: sleep 32 | name: preset_mode 33 | - id: 8 34 | type: boolean 35 | name: oscillate 36 | - id: 11 37 | type: string 38 | name: timer 39 | - entity: light 40 | translation_key: display 41 | category: config 42 | dps: 43 | - id: 101 44 | type: boolean 45 | name: switch 46 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/eurom_601_heater.yaml: -------------------------------------------------------------------------------- 1 | name: Eurom Mon Soleil heater 2 | entities: 3 | - entity: climate 4 | translation_only_key: heater 5 | dps: 6 | - id: 1 7 | type: boolean 8 | mapping: 9 | - dps_val: false 10 | value: "off" 11 | - dps_val: true 12 | value: "heat" 13 | name: hvac_mode 14 | - id: 2 15 | type: integer 16 | range: 17 | min: 0 18 | max: 37 19 | name: temperature 20 | unit: C 21 | - id: 3 22 | type: integer 23 | name: current_temperature 24 | - id: 6 25 | type: boolean 26 | mapping: 27 | - dps_val: false 28 | value: comfort 29 | - dps_val: true 30 | value: eco 31 | name: preset_mode 32 | - entity: binary_sensor 33 | category: diagnostic 34 | class: problem 35 | dps: 36 | - id: 13 37 | type: bitfield 38 | name: sensor 39 | mapping: 40 | - dps_val: 0 41 | value: false 42 | - value: true 43 | - id: 13 44 | type: bitfield 45 | name: fault_code 46 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/tontine_039-WIFI_blanket.yaml: -------------------------------------------------------------------------------- 1 | # ConforTech Platinum Electric Blanket 2 | # Model No:TEB2045QB 3 | # Controller Unit No: 039-WIFI 4 | 5 | name: Electric blanket 6 | products: 7 | - id: m3kmcn9evognklsp 8 | manufacturer: Tontine 9 | model: O39 10 | entities: 11 | - entity: switch 12 | icon: "mdi:bed" 13 | dps: 14 | - id: 1 15 | type: boolean 16 | name: switch 17 | - entity: select 18 | name: Temperature 19 | icon: "mdi:thermometer" 20 | dps: 21 | - id: 4 22 | type: string 23 | name: option 24 | mapping: 25 | - dps_val: low 26 | value: "low" 27 | - dps_val: middle 28 | value: "middle" 29 | - dps_val: high 30 | value: "high" 31 | - entity: number 32 | class: duration 33 | translation_key: timer 34 | dps: 35 | - id: 9 36 | type: integer 37 | name: value 38 | unit: h 39 | range: 40 | min: 1 41 | max: 10 42 | - entity: sensor 43 | class: duration 44 | translation_key: time_remaining 45 | dps: 46 | - id: 10 47 | name: sensor 48 | type: integer 49 | unit: min 50 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/simple_six_switch.yaml: -------------------------------------------------------------------------------- 1 | name: Simple Six Switch 2 | entities: 3 | - entity: switch 4 | translation_key: switch_x 5 | translation_placeholders: 6 | x: "1" 7 | dps: 8 | - id: 1 9 | name: switch 10 | type: boolean 11 | - entity: switch 12 | translation_key: switch_x 13 | translation_placeholders: 14 | x: "2" 15 | dps: 16 | - id: 2 17 | name: switch 18 | type: boolean 19 | - entity: switch 20 | translation_key: switch_x 21 | translation_placeholders: 22 | x: "3" 23 | dps: 24 | - id: 3 25 | name: switch 26 | type: boolean 27 | - entity: switch 28 | translation_key: switch_x 29 | translation_placeholders: 30 | x: "4" 31 | dps: 32 | - id: 4 33 | name: switch 34 | type: boolean 35 | - entity: switch 36 | translation_key: switch_x 37 | translation_placeholders: 38 | x: "5" 39 | dps: 40 | - id: 5 41 | name: switch 42 | type: boolean 43 | - entity: switch 44 | translation_key: switch_x 45 | translation_placeholders: 46 | x: "6" 47 | dps: 48 | - id: 6 49 | name: switch 50 | type: boolean 51 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/petoneer_frescomini_petfountain.yaml: -------------------------------------------------------------------------------- 1 | name: Pet fountain 2 | products: 3 | - id: uoihz7w5myinwrdx 4 | manufacturer: Petoneer 5 | model: Fresco Mini 6 | entities: 7 | - entity: switch 8 | icon: "mdi:water-pump" 9 | dps: 10 | - id: 101 11 | type: boolean 12 | name: switch 13 | - entity: light 14 | class: indicator 15 | category: config 16 | dps: 17 | - id: 102 18 | type: integer 19 | name: switch 20 | mapping: 21 | - dps_val: 0 22 | value: false 23 | - dps_val: 1 24 | value: true 25 | - entity: sensor 26 | name: Filter remaining 27 | class: duration 28 | category: diagnostic 29 | dps: 30 | - id: 104 31 | type: integer 32 | name: sensor 33 | unit: min 34 | - entity: sensor 35 | name: Pump cleaning in 36 | class: duration 37 | category: diagnostic 38 | dps: 39 | - id: 105 40 | type: integer 41 | name: sensor 42 | unit: min 43 | - entity: sensor 44 | name: Water level 45 | category: diagnostic 46 | dps: 47 | - id: 108 48 | type: integer 49 | name: sensor 50 | class: measurement 51 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/treatlife_ds03_fan_light.yaml: -------------------------------------------------------------------------------- 1 | name: Ceiling fan 2 | products: 3 | - id: ipyqwvhvzzjezv35 4 | manufacturer: Treatlife 5 | model: DS03 6 | entities: 7 | - entity: fan 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 3 13 | type: string 14 | name: speed 15 | mapping: 16 | - dps_val: "1" 17 | value: 25 18 | - dps_val: "2" 19 | value: 50 20 | - dps_val: "3" 21 | value: 75 22 | - dps_val: "4" 23 | value: 100 24 | - id: 101 25 | type: integer 26 | name: unknown_101 27 | optional: true 28 | - id: 103 29 | type: integer 30 | name: unknown_103 31 | optional: true 32 | - id: 105 33 | type: integer 34 | name: unknown_105 35 | optional: true 36 | - id: 106 37 | type: string 38 | name: unknown_106 39 | optional: true 40 | - entity: light 41 | dps: 42 | - id: 9 43 | type: boolean 44 | name: switch 45 | - id: 10 46 | type: integer 47 | name: brightness 48 | range: 49 | min: 10 50 | max: 1000 51 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/goldair_101cm_tower_fan.yaml: -------------------------------------------------------------------------------- 1 | name: Tower fan 2 | products: 3 | - id: xonvukal96pf99s6 4 | manufacturer: Goldair 5 | model: 101cm Tower Fan 6 | entities: 7 | - entity: fan 8 | translation_only_key: fan_with_presets 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: switch 13 | - id: 2 14 | type: string 15 | name: preset_mode 16 | mapping: 17 | - dps_val: "1" 18 | value: normal 19 | - dps_val: "2" 20 | value: nature 21 | - dps_val: "3" 22 | value: sleep 23 | - id: 3 24 | type: integer 25 | name: speed 26 | range: 27 | min: 1 28 | max: 3 29 | - id: 5 30 | type: boolean 31 | name: oscillate 32 | - entity: sensor 33 | class: temperature 34 | dps: 35 | - id: 21 36 | type: integer 37 | name: sensor 38 | class: measurement 39 | unit: C 40 | - entity: number 41 | translation_key: timer 42 | class: duration 43 | category: config 44 | dps: 45 | - id: 22 46 | type: string 47 | name: value 48 | unit: h 49 | range: 50 | min: 0 51 | max: 12 52 | -------------------------------------------------------------------------------- /util/common_funcs.py: -------------------------------------------------------------------------------- 1 | """Common functions used in the utilities.""" 2 | 3 | from custom_components.tuya_local.helpers.device_config import ( 4 | get_config, 5 | ) 6 | 7 | 8 | class FakeDevice: 9 | def __init__(self, dps): 10 | self._dps = dps 11 | 12 | def get_property(self, id): 13 | return self._dps.get(id) 14 | 15 | @property 16 | def name(self): 17 | return "cmdline" 18 | 19 | 20 | def load_config(filename): 21 | """Load the config for the device.""" 22 | if filename.endswith(".yaml"): 23 | filename = filename[:-5] 24 | if "/" in filename: 25 | filename = filename.split("/")[-1] 26 | 27 | return get_config(filename) 28 | 29 | 30 | def representation(dp): 31 | """Return a represenative value for the dp.""" 32 | if dp.type is bool: 33 | return True 34 | if dp.type is int: 35 | if dp._config.get(range): 36 | return dp._config.get(range)["min"] 37 | return 0 38 | if dp.type is str: 39 | return "" 40 | if dp.type is float: 41 | return 0.0 42 | 43 | 44 | def make_sample_dps(config): 45 | """Return a dictionary of sample DPS values.""" 46 | all_dps = config._get_all_dps() 47 | return {dp.id: representation(dp) for dp in all_dps} 48 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/cleverio_ad100_dehumidifier.yaml: -------------------------------------------------------------------------------- 1 | name: Dehumidifier 2 | products: 3 | - id: jkscqnjueuczotho 4 | manufacturer: Cleverio 5 | model: AD100 6 | entities: 7 | - entity: fan 8 | name: Dehumidifier 9 | translation_key: fan_with_presets 10 | dps: 11 | - id: 102 12 | type: boolean 13 | name: switch 14 | - id: 2 15 | type: string 16 | name: preset_mode 17 | mapping: 18 | - dps_val: sleep 19 | value: sleep 20 | - dps_val: High 21 | value: strong 22 | - entity: binary_sensor 23 | class: problem 24 | category: diagnostic 25 | dps: 26 | - id: 12 27 | type: bitfield 28 | name: sensor 29 | mapping: 30 | - dps_val: 0 31 | value: false 32 | - value: true 33 | - id: 12 34 | type: bitfield 35 | name: fault_code 36 | - entity: switch 37 | name: Air purifier 38 | category: config 39 | dps: 40 | - id: 101 41 | type: boolean 42 | name: switch 43 | - entity: binary_sensor 44 | name: Replace filter 45 | class: problem 46 | category: diagnostic 47 | dps: 48 | - id: 103 49 | type: boolean 50 | name: sensor 51 | -------------------------------------------------------------------------------- /tests/mixins/lock.py: -------------------------------------------------------------------------------- 1 | # Mixins for testing locks 2 | 3 | from ..helpers import assert_device_properties_set 4 | 5 | 6 | class BasicLockTests: 7 | def setUpBasicLock(self, dps, subject): 8 | self.basicLock = subject 9 | self.basicLockDps = dps 10 | 11 | def test_basic_lock_is_locked(self): 12 | self.dps[self.basicLockDps] = True 13 | self.assertTrue(self.basicLock.is_locked) 14 | 15 | self.dps[self.basicLockDps] = False 16 | self.assertFalse(self.basicLock.is_locked) 17 | 18 | self.dps[self.basicLockDps] = None 19 | self.assertFalse(self.basicLock.is_locked) 20 | 21 | async def test_basic_lock_locks(self): 22 | async with assert_device_properties_set( 23 | self.basicLock._device, 24 | {self.basicLockDps: True}, 25 | ): 26 | await self.basicLock.async_lock() 27 | 28 | async def test_basic_lock_unlocks(self): 29 | async with assert_device_properties_set( 30 | self.basicLock._device, 31 | {self.basicLockDps: False}, 32 | ): 33 | await self.basicLock.async_unlock() 34 | 35 | def test_basic_lock_state_attributes(self): 36 | self.assertEqual(self.basicLock.extra_state_attributes, {}) 37 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/th08_temperature_and_humidity_sensor.yaml: -------------------------------------------------------------------------------- 1 | name: Temperature and humidity sensor 2 | products: 3 | - id: xlk3mtpjo1zkmdvh 4 | model: TH08 5 | entities: 6 | - entity: sensor 7 | class: temperature 8 | dps: 9 | - id: 1 10 | name: sensor 11 | type: integer 12 | unit: C 13 | mapping: 14 | - scale: 10 15 | class: measurement 16 | - entity: sensor 17 | class: humidity 18 | dps: 19 | - id: 2 20 | type: integer 21 | name: sensor 22 | unit: "%" 23 | class: measurement 24 | - entity: sensor 25 | name: Power state 26 | class: enum 27 | category: diagnostic 28 | dps: 29 | - id: 3 30 | type: string 31 | name: sensor 32 | mapping: 33 | - dps_val: low 34 | value: low 35 | - dps_val: middle 36 | value: middle 37 | - dps_val: high 38 | value: high 39 | - entity: select 40 | translation_key: temperature_unit 41 | category: config 42 | dps: 43 | - id: 9 44 | name: option 45 | type: string 46 | mapping: 47 | - dps_val: "f" 48 | value: fahrenheit 49 | - dps_val: "c" 50 | value: celsius 51 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/EM3390TF_weather_station.yaml: -------------------------------------------------------------------------------- 1 | name: Weather station 2 | products: 3 | - id: cvurn5ynloebrpwy 4 | manufacturer: Viflykoo 5 | model: EM3390TF 6 | entities: 7 | - entity: sensor 8 | name: Indoor temperature 9 | class: temperature 10 | dps: 11 | - id: 101 12 | type: integer 13 | name: sensor 14 | class: measurement 15 | mapping: 16 | - scale: 10 17 | unit: C 18 | - entity: sensor 19 | name: Indoor humidity 20 | class: humidity 21 | dps: 22 | - id: 102 23 | type: integer 24 | name: sensor 25 | unit: "%" 26 | class: measurement 27 | mapping: 28 | - scale: 10 29 | - entity: sensor 30 | name: Outdoor temperature 31 | class: temperature 32 | dps: 33 | - id: 103 34 | type: integer 35 | name: sensor 36 | class: measurement 37 | mapping: 38 | - scale: 10 39 | unit: C 40 | - entity: sensor 41 | name: Outdoor humidity 42 | class: humidity 43 | dps: 44 | - id: 104 45 | type: integer 46 | name: sensor 47 | unit: "%" 48 | class: measurement 49 | mapping: 50 | - scale: 10 51 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/ion_wifi_dimmer.yaml: -------------------------------------------------------------------------------- 1 | name: Dimmer 2 | products: 3 | - id: ceikasvm5p5ymcax 4 | manufacturer: Ion 5 | model: LED WiFi 200W NF 6 | entities: 7 | - entity: light 8 | dps: 9 | - id: 1 10 | name: switch 11 | type: boolean 12 | - id: 2 13 | name: brightness 14 | type: integer 15 | range: 16 | min: 10 17 | max: 1000 18 | - entity: number 19 | name: Minimum brightness 20 | category: config 21 | icon: "mdi:brightness-percent" 22 | dps: 23 | - id: 3 24 | type: integer 25 | name: value 26 | range: 27 | min: 10 28 | max: 1000 29 | - entity: number 30 | name: Maximum brightness 31 | category: config 32 | icon: "mdi:brightness-percent" 33 | dps: 34 | - id: 5 35 | type: integer 36 | name: value 37 | range: 38 | min: 10 39 | max: 1000 40 | - entity: number 41 | translation_key: timer 42 | class: duration 43 | category: config 44 | dps: 45 | - id: 6 46 | type: integer 47 | name: value 48 | unit: min 49 | range: 50 | min: 0 51 | max: 86400 52 | mapping: 53 | - scale: 60 54 | step: 60 55 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/warme_gsh_heater.yaml: -------------------------------------------------------------------------------- 1 | name: Heater 2 | products: 3 | - id: 8UGflCDtNYJw1dZs 4 | manufacturer: Warme 5 | model: GSH 6 | entities: 7 | - entity: climate 8 | translation_only_key: heater 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: hvac_mode 13 | mapping: 14 | - dps_val: true 15 | value: "heat" 16 | - dps_val: false 17 | value: "off" 18 | - id: 2 19 | name: temperature 20 | type: integer 21 | precision: 0 22 | unit: "C" 23 | range: 24 | min: 12 25 | max: 50 26 | - id: 3 27 | name: current_temperature 28 | type: integer 29 | unit: "C" 30 | - id: 102 31 | name: preset_mode 32 | type: string 33 | mapping: 34 | - dps_val: Comfort 35 | value: Comfort 36 | - dps_val: ECO 37 | value: ECO 38 | - dps_val: Frost 39 | value: Frost 40 | - entity: light 41 | translation_key: display 42 | dps: 43 | - id: 101 44 | name: switch 45 | type: boolean 46 | mapping: 47 | - dps_val: true 48 | value: false 49 | - dps_val: false 50 | value: true 51 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/wf520d_wifi_dual_touch_dimmer.yaml: -------------------------------------------------------------------------------- 1 | name: Dual dimmer 2 | entities: 3 | - entity: light 4 | name: Dimmer 1 5 | dps: 6 | - id: 1 7 | type: boolean 8 | name: switch 9 | - id: 2 10 | name: brightness 11 | type: integer 12 | range: 13 | min: 10 14 | max: 1000 15 | - entity: light 16 | name: Dimmer 2 17 | dps: 18 | - id: 7 19 | type: boolean 20 | name: switch 21 | - id: 8 22 | name: brightness 23 | type: integer 24 | range: 25 | min: 10 26 | max: 1000 27 | - entity: number 28 | name: Minimum brightness 1 29 | category: config 30 | icon: "mdi:lightbulb-on-50" 31 | dps: 32 | - id: 3 33 | type: integer 34 | name: value 35 | range: 36 | min: 10 37 | max: 1000 38 | unit: "%" 39 | mapping: 40 | - scale: 10 41 | - entity: number 42 | name: Minimum brightness 2 43 | category: config 44 | icon: "mdi:lightbulb-on-50" 45 | dps: 46 | - id: 9 47 | type: integer 48 | name: value 49 | range: 50 | min: 10 51 | max: 1000 52 | unit: "%" 53 | mapping: 54 | - scale: 10 55 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/goldair_phet07ea_heater.yaml: -------------------------------------------------------------------------------- 1 | name: Panel heater 2 | products: 3 | - id: 71v2TpoRp54r0Vmj 4 | manufacturer: Goldair 5 | model: PH-ET07EA 6 | entities: 7 | - entity: climate 8 | translation_key: heater 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: hvac_mode 13 | mapping: 14 | - dps_val: false 15 | value: "off" 16 | - dps_val: true 17 | value: heat 18 | - id: 3 19 | type: integer 20 | name: temperature 21 | unit: C 22 | range: 23 | min: 0 24 | max: 37 25 | - id: 4 26 | type: integer 27 | name: current_temperature 28 | - id: 101 29 | type: string 30 | optional: true 31 | name: mod 32 | - entity: lock 33 | translation_key: child_lock 34 | category: config 35 | dps: 36 | - id: 2 37 | type: boolean 38 | name: lock 39 | - entity: number 40 | translation_key: timer 41 | class: duration 42 | category: config 43 | dps: 44 | - id: 5 45 | type: integer 46 | name: value 47 | unit: h 48 | range: 49 | min: 0 50 | max: 1440 51 | mapping: 52 | - step: 60 53 | scale: 60 54 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/inow_heater_element.yaml: -------------------------------------------------------------------------------- 1 | name: INOW heating element 2 | entities: 3 | - entity: climate 4 | dps: 5 | - id: 1 6 | type: boolean 7 | name: hvac_mode 8 | mapping: 9 | - dps_val: true 10 | value: heat 11 | - dps_val: false 12 | value: "off" 13 | - id: 2 14 | type: integer 15 | name: temperature 16 | unit: C 17 | range: 18 | min: 15 19 | max: 70 20 | mapping: 21 | - step: 5 22 | - id: 3 23 | type: integer 24 | name: current_temperature 25 | - id: 4 26 | type: string 27 | name: preset_mode 28 | mapping: 29 | - dps_val: smart 30 | value: comfort 31 | - dps_val: antifreezing 32 | value: away 33 | - id: 19 34 | type: string 35 | name: timer 36 | optional: true 37 | mapping: 38 | - dps_val: "0h" 39 | value: cancel 40 | - dps_val: "1h" 41 | value: "1h" 42 | - dps_val: "2h" 43 | value: "2h" 44 | - entity: lock 45 | translation_key: child_lock 46 | category: config 47 | dps: 48 | - id: 7 49 | type: boolean 50 | name: lock 51 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/reiga_ceiling_fan.yaml: -------------------------------------------------------------------------------- 1 | name: Ceiling Fan 2 | products: 3 | - id: aktxh7558udrex8a 4 | manufacturer: CasaFan / Reiga 5 | model: Eco Genuino 6 | entities: 7 | - entity: fan 8 | translation_only_key: fan_with_presets 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: switch 13 | - id: 2 14 | type: string 15 | name: preset_mode 16 | mapping: 17 | - dps_val: normal 18 | value: normal 19 | - dps_val: nature 20 | value: nature 21 | - dps_val: sleep 22 | value: sleep 23 | - id: 3 24 | type: integer 25 | name: speed 26 | range: 27 | min: 1 28 | max: 6 29 | - id: 8 30 | type: string 31 | name: direction 32 | - entity: select 33 | translation_key: timer 34 | category: config 35 | dps: 36 | - id: 22 37 | type: string 38 | name: option 39 | mapping: 40 | - dps_val: "off" 41 | value: cancel 42 | - dps_val: "1hour" 43 | value: "1h" 44 | - dps_val: "2hour" 45 | value: "2h" 46 | - dps_val: "4hour" 47 | value: "4h" 48 | - dps_val: "8hour" 49 | value: "8h" 50 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/eurom_800_heater.yaml: -------------------------------------------------------------------------------- 1 | name: Eurom Mon Soleil heater 2 | entities: 3 | - entity: climate 4 | translation_only_key: heater 5 | dps: 6 | - id: 1 7 | type: boolean 8 | name: hvac_mode 9 | mapping: 10 | - dps_val: false 11 | value: "off" 12 | - dps_val: true 13 | value: heat 14 | - id: 2 15 | type: integer 16 | name: temperature 17 | unit: C 18 | range: 19 | min: 0 20 | max: 37 21 | - id: 5 22 | type: integer 23 | name: current_temperature 24 | - id: 3 25 | type: integer 26 | name: temp_set_f 27 | optional: true 28 | - id: 4 29 | type: boolean 30 | name: c_f_switch 31 | optional: true 32 | - id: 6 33 | type: integer 34 | name: cur_temp_f 35 | optional: true 36 | - id: 7 37 | type: integer 38 | name: timer 39 | optional: true 40 | - id: 8 41 | type: bitfield 42 | name: reservation_flags 43 | optional: true 44 | - id: 9 45 | type: string 46 | name: schedule 47 | optional: true 48 | - id: 10 49 | type: string 50 | name: timing 51 | optional: true 52 | -------------------------------------------------------------------------------- /tests/devices/test_simple_switch_with_timer.py: -------------------------------------------------------------------------------- 1 | """Tests for a simple switch with timer""" 2 | 3 | from homeassistant.components.number import NumberDeviceClass 4 | from homeassistant.const import UnitOfTime 5 | 6 | from ..const import TIMED_SOCKET_PAYLOAD 7 | from ..mixins.number import BasicNumberTests 8 | from ..mixins.switch import SwitchableTests 9 | from .base_device_tests import TuyaDeviceTestCase 10 | 11 | SWITCH_DPS = "1" 12 | TIMER_DPS = "11" 13 | 14 | 15 | class TestTimedSwitch(BasicNumberTests, SwitchableTests, TuyaDeviceTestCase): 16 | __test__ = True 17 | 18 | def setUp(self): 19 | self.setUpForConfig("simple_switch_timer.yaml", TIMED_SOCKET_PAYLOAD) 20 | self.subject = self.entities.get("switch") 21 | self.setUpSwitchable(SWITCH_DPS, self.subject) 22 | self.setUpBasicNumber( 23 | TIMER_DPS, 24 | self.entities.get("number_timer"), 25 | max=1440, 26 | scale=60, 27 | unit=UnitOfTime.MINUTES, 28 | device_class=NumberDeviceClass.DURATION, 29 | ) 30 | self.mark_secondary(["number_timer"]) 31 | 32 | def test_extra_state_attributes_set(self): 33 | self.assertDictEqual( 34 | self.subject.extra_state_attributes, 35 | {}, 36 | ) 37 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/teckin_ss42_sockets.yaml: -------------------------------------------------------------------------------- 1 | name: Outdoor double plug 2 | entities: 3 | - entity: switch 4 | class: outlet 5 | translation_key: outlet_x 6 | translation_placeholders: 7 | x: "1" 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - entity: switch 13 | class: outlet 14 | translation_key: outlet_x 15 | translation_placeholders: 16 | x: "2" 17 | dps: 18 | - id: 2 19 | type: boolean 20 | name: switch 21 | - entity: number 22 | category: config 23 | class: duration 24 | translation_key: timer_x 25 | translation_placeholders: 26 | x: "2" 27 | dps: 28 | - id: 101 29 | type: integer 30 | name: value 31 | unit: min 32 | range: 33 | min: 0 34 | max: 86400 35 | mapping: 36 | - scale: 60 37 | step: 60 38 | - entity: number 39 | category: config 40 | class: duration 41 | translation_key: timer_x 42 | translation_placeholders: 43 | x: "1" 44 | dps: 45 | - id: 102 46 | type: integer 47 | name: value 48 | unit: min 49 | range: 50 | min: 0 51 | max: 86400 52 | mapping: 53 | - scale: 60 54 | step: 60 55 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/earu_dpn_circuitbreaker.yaml: -------------------------------------------------------------------------------- 1 | name: Circuit breaker 2 | products: 3 | - id: azpywu5zfg5wyzpn 4 | manufacturer: EARU 5 | model: SW MCB 6 | entities: 7 | - entity: switch 8 | icon: "mdi:fuse" 9 | dps: 10 | - id: 1 11 | name: switch 12 | type: boolean 13 | - entity: lock 14 | translation_key: child_lock 15 | category: config 16 | dps: 17 | - id: 41 18 | name: lock 19 | type: boolean 20 | - entity: sensor 21 | category: diagnostic 22 | class: voltage 23 | dps: 24 | - id: 20 25 | name: sensor 26 | type: integer 27 | unit: V 28 | class: measurement 29 | force: true 30 | mapping: 31 | - scale: 10 32 | - entity: sensor 33 | category: diagnostic 34 | class: current 35 | dps: 36 | - id: 18 37 | name: sensor 38 | type: integer 39 | unit: A 40 | class: measurement 41 | force: true 42 | mapping: 43 | - scale: 1000 44 | - entity: sensor 45 | category: diagnostic 46 | class: power 47 | dps: 48 | - id: 19 49 | name: sensor 50 | type: integer 51 | unit: kW 52 | class: measurement 53 | force: true 54 | mapping: 55 | - scale: 10 56 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/point_panel_heater.yaml: -------------------------------------------------------------------------------- 1 | name: Panel heater 2 | products: 3 | - id: nqj51hxb2tx5kklv 4 | manufacturer: Point 5 | model: POPANW600 6 | entities: 7 | - entity: climate 8 | translation_only_key: heater 9 | dps: 10 | - id: 1 11 | name: hvac_mode 12 | type: boolean 13 | mapping: 14 | - dps_val: true 15 | value: "heat" 16 | - dps_val: false 17 | value: "off" 18 | - id: 2 19 | name: temperature 20 | type: integer 21 | unit: C 22 | mapping: 23 | - scale: 10 24 | range: 25 | min: 50 26 | max: 500 27 | - id: 3 28 | name: current_temperature 29 | type: integer 30 | - id: 4 31 | name: preset_mode 32 | type: string 33 | optional: true 34 | mapping: 35 | - dps_val: ECO 36 | value: eco 37 | - dps_val: Comfort 38 | value: comfort 39 | - entity: lock 40 | translation_key: child_lock 41 | category: config 42 | dps: 43 | - id: 7 44 | type: boolean 45 | name: lock 46 | - entity: light 47 | translation_key: display 48 | category: config 49 | dps: 50 | - id: 109 51 | type: boolean 52 | name: switch 53 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/simple_dual_switch_timer.yaml: -------------------------------------------------------------------------------- 1 | name: Dual switch with timers 2 | products: 3 | - id: key9nfnyp89j4esc 4 | entities: 5 | - entity: switch 6 | translation_key: switch_x 7 | translation_placeholders: 8 | x: "1" 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: switch 13 | - entity: switch 14 | translation_key: switch_x 15 | translation_placeholders: 16 | x: "2" 17 | dps: 18 | - id: 2 19 | type: boolean 20 | name: switch 21 | - entity: number 22 | class: duration 23 | translation_key: timer_x 24 | translation_placeholders: 25 | x: "1" 26 | category: config 27 | dps: 28 | - id: 7 29 | type: integer 30 | name: value 31 | range: 32 | min: 0 33 | max: 86400 34 | mapping: 35 | - scale: 60 36 | step: 60 37 | unit: min 38 | - entity: number 39 | class: duration 40 | translation_key: timer_x 41 | translation_placeholders: 42 | x: "2" 43 | category: config 44 | dps: 45 | - id: 8 46 | type: integer 47 | name: value 48 | range: 49 | min: 0 50 | max: 86400 51 | mapping: 52 | - scale: 60 53 | step: 60 54 | unit: min 55 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/simple_rgbcw_lightbulb.yaml: -------------------------------------------------------------------------------- 1 | name: Simple RGBCW lightbulb 2 | entities: 3 | - entity: light 4 | dps: 5 | - id: 20 6 | type: boolean 7 | name: switch 8 | - id: 21 9 | type: string 10 | name: color_mode 11 | mapping: 12 | - dps_val: white 13 | value: color_temp 14 | - dps_val: colour 15 | value: hs 16 | - id: 22 17 | name: brightness 18 | type: integer 19 | range: 20 | min: 10 21 | max: 1000 22 | - id: 23 23 | name: color_temp 24 | type: integer 25 | optional: true 26 | range: 27 | min: 0 28 | max: 1000 29 | mapping: 30 | - target_range: 31 | min: 2700 32 | max: 6500 33 | - id: 24 34 | name: rgbhsv 35 | type: hex 36 | optional: true 37 | format: 38 | - name: h 39 | bytes: 2 40 | range: 41 | min: 0 42 | max: 360 43 | - name: s 44 | bytes: 2 45 | range: 46 | min: 0 47 | max: 1000 48 | - name: v 49 | bytes: 2 50 | range: 51 | min: 0 52 | max: 1000 53 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/curtain_with_feedback.yaml: -------------------------------------------------------------------------------- 1 | name: Curtain module 2 | entities: 3 | - entity: cover 4 | class: curtain 5 | dps: 6 | - id: 1 7 | name: control 8 | type: string 9 | mapping: 10 | - dps_val: open 11 | value: open 12 | - dps_val: close 13 | value: close 14 | - dps_val: stop 15 | value: stop 16 | - id: 2 17 | name: position 18 | type: integer 19 | unit: "%" 20 | range: 21 | min: 0 22 | max: 100 23 | mapping: 24 | - step: 10 25 | - id: 2 26 | name: current_position 27 | type: integer 28 | - entity: select 29 | name: Motor reverse mode 30 | category: config 31 | icon: "mdi:sign-direction" 32 | dps: 33 | - id: 8 34 | name: option 35 | type: string 36 | mapping: 37 | - dps_val: forward 38 | value: Forward 39 | - dps_val: back 40 | value: Back 41 | - entity: number 42 | name: Travel time 43 | category: config 44 | class: duration 45 | icon: "mdi:timer" 46 | dps: 47 | - id: 10 48 | name: value 49 | type: integer 50 | unit: s 51 | range: 52 | min: 1 53 | max: 60 54 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/pziot_e01_energymeter.yaml: -------------------------------------------------------------------------------- 1 | name: Energy meter 2 | # products: 3 | # - id: UNKNOWN 4 | # manufacturer: PZIOT 5 | # model: E01 6 | entities: 7 | - entity: sensor 8 | name: Total energy 9 | class: energy 10 | dps: 11 | - id: 109 12 | type: integer 13 | name: sensor 14 | unit: kWh 15 | class: total_increasing 16 | mapping: 17 | - scale: 100 18 | - id: 104 19 | type: integer 20 | name: unknown_104 21 | - id: 105 22 | type: integer 23 | name: unknown_105 24 | - id: 106 25 | type: integer 26 | name: unknown_106 27 | - entity: sensor 28 | class: voltage 29 | dps: 30 | - id: 101 31 | name: sensor 32 | type: integer 33 | unit: V 34 | class: measurement 35 | mapping: 36 | - scale: 10 37 | - entity: sensor 38 | class: current 39 | dps: 40 | - id: 102 41 | name: sensor 42 | type: integer 43 | unit: A 44 | class: measurement 45 | mapping: 46 | - scale: 100 47 | - entity: sensor 48 | class: power 49 | dps: 50 | - id: 103 51 | name: sensor 52 | type: integer 53 | unit: W 54 | class: measurement 55 | mapping: 56 | - scale: 100 57 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/qs_c01_curtain.yaml: -------------------------------------------------------------------------------- 1 | name: Curtain module 2 | products: 3 | - id: ujrix5o9vgovrctb 4 | model: QS-WIFI-C01 5 | - id: ol1uhvza 6 | model: QS-ZIGBEE-C01 7 | entities: 8 | - entity: cover 9 | class: curtain 10 | dps: 11 | - id: 1 12 | name: control 13 | type: string 14 | mapping: 15 | - dps_val: open 16 | value: open 17 | - dps_val: close 18 | value: close 19 | - dps_val: stop 20 | value: stop 21 | - id: 2 22 | name: position 23 | type: integer 24 | unit: "%" 25 | range: 26 | min: 0 27 | max: 100 28 | mapping: 29 | - step: 10 30 | - entity: select 31 | name: Motor reverse mode 32 | category: config 33 | icon: "mdi:sign-direction" 34 | dps: 35 | - id: 8 36 | name: option 37 | type: string 38 | mapping: 39 | - dps_val: forward 40 | value: Forward 41 | - dps_val: back 42 | value: Back 43 | - entity: number 44 | name: Travel time 45 | category: config 46 | class: duration 47 | icon: "mdi:timer" 48 | dps: 49 | - id: 10 50 | name: value 51 | type: integer 52 | unit: s 53 | range: 54 | min: 1 55 | max: 60 56 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/qoto_03_sprinkler.yaml: -------------------------------------------------------------------------------- 1 | name: QOTO 03 sprinkler controller 2 | entities: 3 | - entity: valve 4 | class: water 5 | dps: 6 | - id: 102 7 | type: integer 8 | name: valve 9 | mapping: 10 | - step: 5 11 | - entity: sensor 12 | category: diagnostic 13 | icon: "mdi:valve" 14 | name: Open 15 | dps: 16 | - id: 103 17 | name: sensor 18 | type: integer 19 | unit: "%" 20 | - entity: sensor 21 | category: diagnostic 22 | translation_key: time_remaining 23 | class: duration 24 | dps: 25 | - id: 104 26 | name: sensor 27 | type: integer 28 | unit: s 29 | - entity: number 30 | category: config 31 | class: duration 32 | translation_key: timer 33 | dps: 34 | - id: 105 35 | type: integer 36 | name: value 37 | unit: s 38 | range: 39 | min: 0 40 | max: 86399 41 | - entity: binary_sensor 42 | category: diagnostic 43 | class: problem 44 | dps: 45 | - id: 108 46 | name: sensor 47 | type: bitfield 48 | mapping: 49 | - dps_val: 0 50 | value: false 51 | - value: true 52 | - id: 108 53 | type: bitfield 54 | name: fault_code 55 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/loeffen_LFIM6000_icecubemaker.yaml: -------------------------------------------------------------------------------- 1 | name: Ice cube maker 2 | products: 3 | - id: 2y44i6euwk9eeiz8 4 | manufacturer: Loeffen 5 | model: LFIM6000 6 | entities: 7 | - entity: switch 8 | icon: "mdi:delete-variant" 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: switch 13 | - entity: select 14 | name: Ice cube size 15 | icon: "mdi:cube-scan" 16 | category: config 17 | dps: 18 | - id: 2 19 | type: string 20 | name: option 21 | mapping: 22 | - dps_val: big 23 | value: Large 24 | - dps_val: small 25 | value: Small 26 | - entity: binary_sensor 27 | class: problem 28 | category: diagnostic 29 | dps: 30 | - id: 3 31 | type: bitfield 32 | name: sensor 33 | mapping: 34 | - dps_val: 0 35 | value: false 36 | - value: true 37 | - id: 3 38 | type: bitfield 39 | name: fault_code 40 | - entity: switch 41 | translation_key: uv_sterilization 42 | category: config 43 | dps: 44 | - id: 101 45 | type: boolean 46 | name: switch 47 | - entity: switch 48 | name: Cleaning mode 49 | icon: "mdi:silverware-clean" 50 | category: config 51 | dps: 52 | - id: 102 53 | type: boolean 54 | name: switch 55 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/tampa_led_system.yaml: -------------------------------------------------------------------------------- 1 | name: Lights 2 | products: 3 | - id: ge0bfvco 4 | manufacturer: Tampa 5 | model: CD-TY-WY05 6 | entities: 7 | - entity: light 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 2 13 | name: work_mode 14 | type: string 15 | - id: 3 16 | name: brightness 17 | type: integer 18 | range: 19 | min: 0 20 | max: 1000 21 | - id: 4 22 | name: color_temp 23 | type: integer 24 | range: 25 | min: 0 26 | max: 1000 27 | mapping: 28 | - target_range: 29 | min: 3000 30 | max: 6000 31 | - id: 6 32 | name: scene 33 | type: hex 34 | - id: 33 35 | type: string 36 | name: power_off_memory 37 | - entity: number 38 | translation_key: timer 39 | class: duration 40 | category: config 41 | dps: 42 | - id: 7 43 | type: integer 44 | name: value 45 | unit: min 46 | range: 47 | min: 0 48 | max: 86400 49 | mapping: 50 | - scale: 60 51 | step: 60 52 | - entity: switch 53 | name: Do not disturb 54 | category: config 55 | dps: 56 | - id: 34 57 | type: boolean 58 | name: switch 59 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/simple_dual_switch_timer_v2.yaml: -------------------------------------------------------------------------------- 1 | name: Dual switch with timers 2 | products: 3 | - id: 7c35xxu0foeqpdka 4 | manufacturer: BlitzWolf 5 | model: BW-SS5 6 | entities: 7 | - entity: switch 8 | translation_key: switch_x 9 | translation_placeholders: 10 | x: "1" 11 | dps: 12 | - id: 1 13 | type: boolean 14 | name: switch 15 | - entity: switch 16 | translation_key: switch_x 17 | translation_placeholders: 18 | x: "2" 19 | dps: 20 | - id: 2 21 | type: boolean 22 | name: switch 23 | - entity: number 24 | class: duration 25 | translation_key: timer_x 26 | translation_placeholders: 27 | x: "1" 28 | category: config 29 | dps: 30 | - id: 9 31 | type: integer 32 | name: value 33 | range: 34 | min: 0 35 | max: 86400 36 | mapping: 37 | - scale: 60 38 | step: 60 39 | unit: min 40 | - entity: number 41 | class: duration 42 | translation_key: timer_x 43 | translation_placeholders: 44 | x: "2" 45 | category: config 46 | dps: 47 | - id: 10 48 | type: integer 49 | name: value 50 | range: 51 | min: 0 52 | max: 86400 53 | mapping: 54 | - scale: 60 55 | step: 60 56 | unit: min 57 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/ihunt_50_airpurifier.yaml: -------------------------------------------------------------------------------- 1 | name: Air purifier 2 | products: 3 | - id: qjlhoysvavudtp3d 4 | manufacturer: iHunt 5 | model: 50m³/h 6 | entities: 7 | - entity: fan 8 | icon: "mdi:air-purifier" 9 | dps: 10 | - id: 1 11 | name: switch 12 | type: boolean 13 | - id: 4 14 | name: speed 15 | type: string 16 | mapping: 17 | - dps_val: sleep 18 | value: 25 19 | - dps_val: low 20 | value: 50 21 | - dps_val: mid 22 | value: 75 23 | - dps_val: high 24 | value: 100 25 | - entity: sensor 26 | name: Filter 27 | category: diagnostic 28 | icon: "mdi:air-filter" 29 | dps: 30 | - id: 5 31 | type: integer 32 | name: sensor 33 | unit: "%" 34 | - entity: switch 35 | translation_key: ionizer 36 | category: config 37 | dps: 38 | - id: 6 39 | type: boolean 40 | name: switch 41 | - entity: button 42 | translation_key: filter_reset 43 | category: diagnostic 44 | dps: 45 | - id: 11 46 | type: boolean 47 | name: button 48 | - entity: sensor 49 | name: Total runtime 50 | category: diagnostic 51 | class: duration 52 | dps: 53 | - id: 17 54 | name: sensor 55 | type: integer 56 | unit: min 57 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/smartmi_e1_purifier.yaml: -------------------------------------------------------------------------------- 1 | name: Air Purifier 2 | products: 3 | - id: pwrmggdhwkz1lnvh 4 | manufacturer: Smartmi 5 | model: E1 6 | entities: 7 | - entity: fan 8 | translation_only_key: fan_with_presets 9 | icon: "mdi:air-purifier" 10 | dps: 11 | - id: 1 12 | name: switch 13 | type: boolean 14 | - id: 3 15 | name: preset_mode 16 | type: string 17 | mapping: 18 | - dps_val: sleep 19 | value: sleep 20 | - dps_val: auto 21 | value: normal 22 | - dps_val: manual 23 | value: strong 24 | - entity: light 25 | translation_key: indicator 26 | category: config 27 | dps: 28 | - id: 8 29 | name: switch 30 | type: boolean 31 | - entity: sensor 32 | name: Filter usage 33 | category: diagnostic 34 | class: duration 35 | icon: "mdi:shield-bug" 36 | dps: 37 | - id: 101 38 | name: sensor 39 | type: integer 40 | unit: h 41 | - entity: binary_sensor 42 | class: problem 43 | category: diagnostic 44 | dps: 45 | - id: 22 46 | type: bitfield 47 | name: sensor 48 | mapping: 49 | - dps_val: 0 50 | value: false 51 | - value: true 52 | - id: 22 53 | type: bitfield 54 | name: fault_code 55 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/somgom_double_switch.yaml: -------------------------------------------------------------------------------- 1 | name: Somgoms double switch 2 | entities: 3 | - entity: switch 4 | translation_key: switch_x 5 | translation_placeholders: 6 | x: "1" 7 | dps: 8 | - id: 1 9 | name: switch 10 | type: boolean 11 | - entity: switch 12 | translation_key: switch_x 13 | translation_placeholders: 14 | x: "2" 15 | dps: 16 | - id: 2 17 | name: switch 18 | type: boolean 19 | - entity: number 20 | class: duration 21 | translation_key: timer_x 22 | translation_placeholders: 23 | x: "1" 24 | category: config 25 | dps: 26 | - id: 7 27 | name: value 28 | type: integer 29 | range: 30 | min: 0 31 | max: 86400 32 | mapping: 33 | - scale: 60 34 | unit: min 35 | - entity: number 36 | class: duration 37 | translation_key: timer_x 38 | translation_placeholders: 39 | x: "2" 40 | category: config 41 | dps: 42 | - id: 8 43 | name: value 44 | type: integer 45 | range: 46 | min: 0 47 | max: 86400 48 | mapping: 49 | - scale: 60 50 | unit: min 51 | - entity: light 52 | translation_key: backlight 53 | category: config 54 | dps: 55 | - id: 16 56 | name: switch 57 | type: boolean 58 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/kogan_kawfhtp_heater.yaml: -------------------------------------------------------------------------------- 1 | name: Panel heater 2 | products: 3 | - id: jyota3jcxuelyf9t 4 | manufacturer: Kogan 5 | model_id: NPH-2000G-WIFI 6 | model: Glass panel heater 7 | entities: 8 | - entity: climate 9 | translation_only_key: heater 10 | dps: 11 | - id: 1 12 | type: boolean 13 | mapping: 14 | - dps_val: false 15 | value: "off" 16 | - dps_val: true 17 | value: "heat" 18 | name: hvac_mode 19 | - id: 3 20 | type: integer 21 | range: 22 | min: 5 23 | max: 40 24 | name: temperature 25 | unit: C 26 | - id: 4 27 | type: integer 28 | name: current_temperature 29 | - id: 7 30 | type: string 31 | mapping: 32 | - dps_val: Low 33 | value: eco 34 | - dps_val: High 35 | value: boost 36 | name: preset_mode 37 | - entity: lock 38 | translation_key: child_lock 39 | category: config 40 | dps: 41 | - id: 2 42 | type: boolean 43 | name: lock 44 | - entity: number 45 | translation_key: timer 46 | class: duration 47 | category: config 48 | dps: 49 | - id: 5 50 | type: integer 51 | name: value 52 | unit: min 53 | range: 54 | min: 0 55 | max: 1440 56 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/smart_mist3_fan.yaml: -------------------------------------------------------------------------------- 1 | name: Mist Fan 2 | products: 3 | - id: xlnzyrme4ddyzqhw 4 | manufacturer: Smart 5 | model: Mist3 6 | model_id: TX-1602MF 7 | entities: 8 | - entity: fan 9 | translation_key: fan_with_presets 10 | dps: 11 | - id: 1 12 | name: switch 13 | type: boolean 14 | - id: 2 15 | name: preset_mode 16 | type: string 17 | mapping: 18 | - dps_val: normal 19 | value: normal 20 | - dps_val: natural 21 | value: natural 22 | - dps_val: sleep 23 | value: sleep 24 | - id: 3 25 | name: speed 26 | type: integer 27 | range: 28 | min: 1 29 | max: 3 30 | - id: 7 31 | name: oscillate 32 | type: string 33 | mapping: 34 | - dps_val: "off" 35 | value: false 36 | - dps_val: "on" 37 | value: true 38 | - entity: fan 39 | name: Mist 40 | icon: "mdi:air-humidifier" 41 | dps: 42 | - id: 10 43 | name: switch 44 | type: boolean 45 | - id: 101 46 | name: preset_mode 47 | type: string 48 | mapping: 49 | - dps_val: "L" 50 | value: "Low" 51 | - dps_val: "M" 52 | value: "Medium" 53 | - dps_val: "H" 54 | value: "High" 55 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/asc_wifi_circuit_breaker.yaml: -------------------------------------------------------------------------------- 1 | name: Circuit breaker 2 | products: 3 | - id: yrzel5nutomegk6z 4 | manufacturer: ASC 5 | entities: 6 | - entity: switch 7 | icon: "mdi:fuse" 8 | dps: 9 | - id: 1 10 | name: switch 11 | type: boolean 12 | - entity: number 13 | translation_key: timer 14 | class: duration 15 | category: config 16 | dps: 17 | - id: 7 18 | type: integer 19 | name: value 20 | range: 21 | min: 0 22 | max: 86400 23 | mapping: 24 | - scale: 60 25 | step: 60 26 | unit: min 27 | - entity: sensor 28 | class: current 29 | category: diagnostic 30 | dps: 31 | - id: 21 32 | type: integer 33 | name: sensor 34 | unit: A 35 | mapping: 36 | - scale: 1000 37 | optional: true 38 | - entity: sensor 39 | class: voltage 40 | category: diagnostic 41 | dps: 42 | - id: 22 43 | type: integer 44 | name: sensor 45 | unit: V 46 | mapping: 47 | - scale: 10 48 | optional: true 49 | - entity: sensor 50 | class: power 51 | category: diagnostic 52 | dps: 53 | - id: 23 54 | type: integer 55 | name: sensor 56 | unit: W 57 | optional: true 58 | mapping: 59 | - scale: 10 60 | -------------------------------------------------------------------------------- /util/match_against.py: -------------------------------------------------------------------------------- 1 | """Find matching devices for the supplied dp list""" 2 | 3 | import json 4 | import sys 5 | 6 | from common_funcs import FakeDevice, load_config 7 | 8 | from custom_components.tuya_local.helpers.device_config import _typematch 9 | 10 | 11 | def main() -> int: 12 | dps = json.loads(" ".join(sys.argv[2:])) 13 | device = FakeDevice(dps) 14 | config = load_config(sys.argv[1]) 15 | if config is None: 16 | print(f"No config could be loaded for {sys.argv[1]}") 17 | return 1 18 | for entity in config.all_entities(): 19 | print(f"{entity.config_id}:") 20 | for dp in entity.dps(): 21 | if dp.id not in dps.keys(): 22 | print(f" {dp.name} missing from data") 23 | if not dp.optional: 24 | print(f">> dp {dp.id} is REQUIRED!!!!") 25 | elif not _typematch(dp.type, dps.get(dp.id)): 26 | print( 27 | f">> {dp.name} type MISMATCH, expected {dp.type.__name__}, got {dps.get(dp.id)}!!!" 28 | ) 29 | else: 30 | values = dp.values(device) 31 | if values: 32 | values = f" from {values}" 33 | else: 34 | values = "" 35 | print(f" {dp.name}: {dp.get_value(device)}{values}") 36 | 37 | 38 | if __name__ == "__main__": 39 | sys.exit(main()) 40 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/caldo_up_t_wifi.yaml: -------------------------------------------------------------------------------- 1 | name: Fan heater 2 | products: 3 | - id: dqy0z9997a18rkaw 4 | manufacturer: Olimpia Splendid 5 | model: Caldo Up T 6 | entities: 7 | - entity: climate 8 | translation_only_key: heater 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: hvac_mode 13 | mapping: 14 | - dps_val: true 15 | value: heat 16 | - dps_val: false 17 | value: "off" 18 | - id: 2 19 | type: integer 20 | name: temperature 21 | unit: C 22 | range: 23 | min: 18 24 | max: 45 25 | - id: 3 26 | type: integer 27 | name: current_temperature 28 | - id: 5 29 | type: string 30 | name: preset_mode 31 | mapping: 32 | - dps_val: "level_1" 33 | value: none 34 | - dps_val: "level_2" 35 | value: comfort 36 | - dps_val: "level_3" 37 | value: boost 38 | - id: 8 39 | type: boolean 40 | name: swing_mode 41 | mapping: 42 | - dps_val: false 43 | value: "off" 44 | - dps_val: true 45 | value: "on" 46 | - entity: switch 47 | name: Window detection 48 | icon: "mdi:window-open-variant" 49 | category: config 50 | dps: 51 | - id: 101 52 | type: boolean 53 | name: switch 54 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/kogan_kahtp_heater.yaml: -------------------------------------------------------------------------------- 1 | name: Kogan panel heater 2 | legacy_type: kogan_heater 3 | entities: 4 | - entity: climate 5 | translation_only_key: heater 6 | dps: 7 | - id: 2 8 | type: integer 9 | range: 10 | min: 15 11 | max: 35 12 | name: temperature 13 | unit: C 14 | - id: 3 15 | type: integer 16 | name: current_temperature 17 | - id: 4 18 | type: string 19 | mapping: 20 | - dps_val: "Low" 21 | value: eco 22 | - dps_val: "High" 23 | value: boost 24 | name: preset_mode 25 | - id: 7 26 | type: boolean 27 | mapping: 28 | - dps_val: false 29 | value: "off" 30 | - dps_val: true 31 | value: "heat" 32 | name: hvac_mode 33 | - id: 8 34 | type: integer 35 | name: timer 36 | - entity: lock 37 | translation_key: child_lock 38 | category: config 39 | dps: 40 | - id: 6 41 | type: boolean 42 | name: lock 43 | - entity: number 44 | translation_key: timer 45 | class: duration 46 | category: config 47 | dps: 48 | - id: 8 49 | name: value 50 | type: integer 51 | unit: min 52 | range: 53 | min: 0 54 | max: 1440 55 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/giatsu_vaw2_waterheater.yaml: -------------------------------------------------------------------------------- 1 | name: Water heater 2 | products: 3 | - id: rmzdb9fyj9jo1bza 4 | manufacturer: Giatsu 5 | model: GIA-ATS-O-300VAWT 6 | entities: 7 | - entity: water_heater 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: operation_mode 12 | mapping: 13 | - dps_val: false 14 | value: "off" 15 | - dps_val: true 16 | constraint: mode 17 | conditions: 18 | - dps_val: heat 19 | value: Heating 20 | - dps_val: heatfan 21 | value: "Heating + Ventilation" 22 | - id: 2 23 | type: integer 24 | name: temperature 25 | range: 26 | min: 10 27 | max: 70 28 | unit: C 29 | - id: 4 30 | type: string 31 | name: mode 32 | hidden: true 33 | - entity: sensor 34 | class: temperature 35 | dps: 36 | - id: 3 37 | type: integer 38 | name: sensor 39 | unit: C 40 | class: measurement 41 | - entity: binary_sensor 42 | class: problem 43 | category: diagnostic 44 | dps: 45 | - id: 9 46 | type: bitfield 47 | name: sensor 48 | mapping: 49 | - dps_val: 0 50 | value: false 51 | - value: true 52 | - id: 9 53 | type: bitfield 54 | name: fault_code 55 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/silvercrest_coffee_maker.yaml: -------------------------------------------------------------------------------- 1 | name: Coffee maker 2 | products: 3 | - id: iegq4tjqeuiew5cl 4 | manufacturer: Silvercrest 5 | model: SKMS 900 A1 6 | entities: 7 | - entity: switch 8 | icon: "mdi:coffee-maker" 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: switch 13 | - entity: select 14 | name: Aroma 15 | icon: "mdi:coffee" 16 | category: config 17 | dps: 18 | - id: 101 19 | type: string 20 | name: option 21 | mapping: 22 | - dps_val: normal 23 | value: Normal 24 | - dps_val: strong 25 | value: Strong 26 | - dps_val: extra_strong 27 | value: Extra Strong 28 | - entity: sensor 29 | name: Work state 30 | icon: "mdi:briefcase" 31 | category: diagnostic 32 | dps: 33 | - id: 4 34 | type: string 35 | name: sensor 36 | - entity: sensor 37 | translation_key: time_remaining 38 | class: duration 39 | category: diagnostic 40 | dps: 41 | - id: 12 42 | type: integer 43 | name: sensor 44 | unit: min 45 | - entity: binary_sensor 46 | translation_key: tank_empty 47 | category: diagnostic 48 | dps: 49 | - id: 105 50 | type: bitfield 51 | name: sensor 52 | mapping: 53 | - dps_val: 0 54 | value: false 55 | - value: true 56 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/airquality6in1.yaml: -------------------------------------------------------------------------------- 1 | name: Air quality monitor 2 | products: 3 | - id: ugjbnqj2mffaexp5 4 | name: Air Housekeeper 6-in-1 5 | entities: 6 | - entity: sensor 7 | class: pm25 8 | dps: 9 | - id: 2 10 | type: integer 11 | name: sensor 12 | unit: µg/m³ 13 | class: measurement 14 | - entity: sensor 15 | class: temperature 16 | dps: 17 | - id: 18 18 | type: integer 19 | name: sensor 20 | unit: C 21 | class: measurement 22 | mapping: 23 | - scale: 10 24 | - entity: sensor 25 | class: humidity 26 | dps: 27 | - id: 19 28 | type: integer 29 | name: sensor 30 | unit: "%" 31 | class: measurement 32 | mapping: 33 | - scale: 10 34 | - entity: sensor 35 | name: Formaldehyde 36 | class: volatile_organic_compounds 37 | dps: 38 | - id: 20 39 | type: integer 40 | name: sensor 41 | unit: ugm3 42 | class: measurement 43 | - entity: sensor 44 | class: volatile_organic_compounds 45 | dps: 46 | - id: 21 47 | type: integer 48 | name: sensor 49 | unit: ugm3 50 | class: measurement 51 | - entity: sensor 52 | class: carbon_dioxide 53 | dps: 54 | - id: 22 55 | type: integer 56 | name: sensor 57 | unit: ppm 58 | class: measurement 59 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/luko_dehumidifier.yaml: -------------------------------------------------------------------------------- 1 | name: Dehumidifier 2 | products: 3 | - id: 4w2fzgr62c1oyjsx 4 | manufacturer: Luko 5 | entities: 6 | - entity: humidifier 7 | class: dehumidifier 8 | dps: 9 | - id: 1 10 | name: switch 11 | type: boolean 12 | - id: 8 13 | name: current_humidity 14 | type: integer 15 | - id: 2 16 | name: mode 17 | type: string 18 | mapping: 19 | - dps_val: "dehumidity" 20 | value: normal 21 | - id: 46 22 | name: humidity 23 | type: integer 24 | range: 25 | min: 40 26 | max: 80 27 | mapping: 28 | - step: 5 29 | - entity: fan 30 | dps: 31 | - id: 1 32 | name: switch 33 | type: boolean 34 | - id: 12 35 | name: speed 36 | type: string 37 | mapping: 38 | - dps_val: "1speed" 39 | value: 20 40 | - dps_val: "2speed" 41 | value: 40 42 | - dps_val: "3speed" 43 | value: 60 44 | - dps_val: "4speed" 45 | value: 80 46 | - dps_val: "5speed" 47 | value: 100 48 | - entity: sensor 49 | class: temperature 50 | dps: 51 | - id: 9 52 | name: sensor 53 | type: integer 54 | unit: "C" 55 | class: measurement 56 | mapping: 57 | - scale: 10 58 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/moes_bht002_thermostat_c.yaml: -------------------------------------------------------------------------------- 1 | name: BHT-002 thermostat C 2 | entities: 3 | - entity: climate 4 | dps: 5 | - id: 1 6 | type: boolean 7 | name: hvac_mode 8 | mapping: 9 | - dps_val: false 10 | value: "off" 11 | - dps_val: true 12 | constraint: mode 13 | conditions: 14 | - dps_val: "0" 15 | value: auto 16 | - dps_val: "1" 17 | value: heat 18 | - id: 2 19 | type: integer 20 | name: temperature 21 | unit: C 22 | range: 23 | min: 10 24 | max: 70 25 | mapping: 26 | - scale: 2 27 | - id: 3 28 | type: integer 29 | name: current_temperature 30 | mapping: 31 | - scale: 2 32 | - id: 4 33 | type: string 34 | name: mode 35 | hidden: true 36 | - id: 5 37 | type: boolean 38 | name: preset_mode 39 | mapping: 40 | - dps_val: true 41 | value: eco 42 | - dps_val: false 43 | value: comfort 44 | - id: 104 45 | type: boolean 46 | name: unknown_104 47 | - entity: lock 48 | translation_key: child_lock 49 | category: config 50 | dps: 51 | - id: 6 52 | type: boolean 53 | name: lock 54 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/arlec_19speed_fan.yaml: -------------------------------------------------------------------------------- 1 | name: Fan 2 | products: 3 | - id: 0waab4clioc3qaks 4 | manufacturer: Arlec 5 | name: "19-speed industrial wall fan" 6 | entities: 7 | - entity: fan 8 | translation_only_key: fan_with_presets 9 | dps: 10 | - id: 1 11 | name: switch 12 | type: boolean 13 | - id: 2 14 | name: preset_mode 15 | type: string 16 | mapping: 17 | - dps_val: normal 18 | value: normal 19 | - dps_val: sleep 20 | value: sleep 21 | - dps_val: natural 22 | value: nature 23 | - id: 3 24 | name: speed 25 | type: integer 26 | range: 27 | min: 1 28 | max: 19 29 | - id: 5 30 | name: oscillate 31 | type: boolean 32 | - entity: number 33 | translation_key: timer 34 | class: duration 35 | category: config 36 | dps: 37 | - id: 22 38 | type: integer 39 | name: value 40 | unit: h 41 | range: 42 | min: 0 43 | max: 24 44 | - entity: binary_sensor 45 | class: problem 46 | category: diagnostic 47 | dps: 48 | - id: 24 49 | type: bitfield 50 | name: sensor 51 | mapping: 52 | - dps_val: 0 53 | value: false 54 | - value: true 55 | - id: 24 56 | name: fault_code 57 | type: bitfield 58 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/graywind_shades.yaml: -------------------------------------------------------------------------------- 1 | name: Window shade 2 | products: 3 | - id: hldq12vsaqalcfer 4 | manufacturer: Graywind 5 | name: Hardwired blackout 6 | entities: 7 | - entity: cover 8 | class: shade 9 | dps: 10 | - id: 1 11 | name: control 12 | type: string 13 | mapping: 14 | - dps_val: open 15 | value: open 16 | - dps_val: close 17 | value: close 18 | - dps_val: stop 19 | value: stop 20 | - id: 2 21 | name: position 22 | type: integer 23 | range: 24 | min: 0 25 | max: 100 26 | - entity: select 27 | name: Motor direction 28 | category: config 29 | icon: "mdi:sign-direction" 30 | dps: 31 | - id: 5 32 | name: option 33 | type: string 34 | mapping: 35 | - dps_val: forward 36 | value: Forward 37 | - dps_val: back 38 | value: Back 39 | - entity: binary_sensor 40 | class: problem 41 | category: diagnostic 42 | dps: 43 | - id: 12 44 | type: bitfield 45 | optional: true 46 | name: sensor 47 | mapping: 48 | - dps_val: null 49 | value: false 50 | - dps_val: 0 51 | value: false 52 | - value: true 53 | - id: 12 54 | type: bitfield 55 | optional: true 56 | name: fault_code 57 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/nybro_heater.yaml: -------------------------------------------------------------------------------- 1 | name: Heater 2 | products: 3 | - id: ahzyjjcfbe1ehrbt 4 | manufacturer: NYBRO 5 | entities: 6 | - entity: climate 7 | dps: 8 | - id: 1 9 | type: boolean 10 | name: hvac_mode 11 | mapping: 12 | - dps_val: false 13 | value: "off" 14 | - dps_val: true 15 | value: "heat" 16 | - id: 2 17 | name: temperature 18 | type: integer 19 | range: 20 | min: 5 21 | max: 35 22 | - id: 3 23 | name: current_temperature 24 | type: integer 25 | - id: 4 26 | type: string 27 | name: preset_mode 28 | mapping: 29 | - dps_val: low 30 | value: eco 31 | - dps_val: high 32 | value: boost 33 | - dps_val: af 34 | value: away 35 | - id: 101 36 | type: boolean 37 | name: hvac_action 38 | mapping: 39 | - dps_val: false 40 | value: idle 41 | - dps_val: true 42 | value: heating 43 | - entity: binary_sensor 44 | class: problem 45 | category: diagnostic 46 | dps: 47 | - id: 12 48 | type: bitfield 49 | name: sensor 50 | mapping: 51 | - dps_val: 0 52 | value: false 53 | - value: true 54 | - id: 12 55 | type: bitfield 56 | name: fault_code 57 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/andersson_gsh_heater.yaml: -------------------------------------------------------------------------------- 1 | name: Heater 2 | legacy_type: gsh_heater 3 | products: 4 | # - id: UNKNOWN 5 | # name: Andersson GSH 6 | - id: qAmsenZuNF74vRvj 7 | manufacturer: Devola 8 | model: Intelligent 9 | entities: 10 | - entity: climate 11 | translation_only_key: heater 12 | dps: 13 | - id: 1 14 | name: hvac_mode 15 | type: boolean 16 | mapping: 17 | - dps_val: true 18 | value: "heat" 19 | - dps_val: false 20 | value: "off" 21 | - id: 2 22 | name: temperature 23 | type: integer 24 | unit: C 25 | range: 26 | min: 5 27 | max: 35 28 | - id: 3 29 | name: current_temperature 30 | type: integer 31 | - id: 4 32 | name: preset_mode 33 | type: string 34 | mapping: 35 | - dps_val: low 36 | value: eco 37 | - dps_val: high 38 | value: boost 39 | - dps_val: af 40 | value: away 41 | - entity: binary_sensor 42 | class: problem 43 | category: diagnostic 44 | dps: 45 | - id: 12 46 | type: bitfield 47 | name: sensor 48 | mapping: 49 | - dps_val: 0 50 | value: false 51 | - value: true 52 | - id: 12 53 | type: bitfield 54 | name: fault_code 55 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/windmill_airconditioner.yaml: -------------------------------------------------------------------------------- 1 | name: Air Conditioner 2 | products: 3 | - id: u8iolvwcrnginqzr 4 | manufacturer: Windmill 5 | entities: 6 | - entity: climate 7 | dps: 8 | - id: 1 9 | name: hvac_mode 10 | type: boolean 11 | mapping: 12 | - dps_val: false 13 | value: "off" 14 | - dps_val: true 15 | constraint: mode 16 | conditions: 17 | - dps_val: wind 18 | value: fan_only 19 | - dps_val: cool 20 | value: cool 21 | - dps_val: eco 22 | value: auto 23 | - id: 4 24 | name: mode 25 | type: string 26 | hidden: true 27 | - id: 5 28 | name: fan_mode 29 | type: string 30 | mapping: 31 | - dps_val: low 32 | value: low 33 | - dps_val: mid 34 | value: medium 35 | - dps_val: high 36 | value: high 37 | - dps_val: auto 38 | value: auto 39 | - id: 22 40 | name: unknown_22 41 | type: integer 42 | - id: 23 43 | name: current_temperature 44 | type: integer 45 | - id: 24 46 | name: temperature 47 | type: integer 48 | range: 49 | min: 60 50 | max: 86 51 | unit: F 52 | - id: 102 53 | name: unknown_102 54 | type: integer 55 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/create_fan_light.yaml: -------------------------------------------------------------------------------- 1 | name: Ceiling fan with light 2 | products: 3 | - id: p8z27dfdwc4riyp9 4 | manufacturer: Create 5 | model: XW-FAN-215-D 6 | entities: 7 | - entity: fan 8 | dps: 9 | - id: 60 10 | type: boolean 11 | name: switch 12 | - id: 62 13 | type: integer 14 | optional: true 15 | name: speed 16 | range: 17 | min: 1 18 | max: 6 19 | - id: 63 20 | type: string 21 | optional: true 22 | name: direction 23 | - entity: light 24 | dps: 25 | - id: 20 26 | type: boolean 27 | name: switch 28 | - id: 21 29 | name: work_mode 30 | type: string 31 | optional: true 32 | - id: 23 33 | name: color_temp 34 | type: integer 35 | optional: true 36 | range: 37 | min: 0 38 | max: 1000 39 | mapping: 40 | - target_range: 41 | min: 2700 42 | max: 6500 43 | step: 500 44 | - id: 25 45 | name: scene_data 46 | type: string 47 | optional: true 48 | - entity: number 49 | translation_key: timer 50 | class: duration 51 | category: config 52 | dps: 53 | - id: 64 54 | type: integer 55 | optional: true 56 | name: value 57 | unit: min 58 | range: 59 | min: 0 60 | max: 540 61 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/electriq_cd12pw_dehumidifier.yaml: -------------------------------------------------------------------------------- 1 | name: "Electriq CD12PW dehumidifier" 2 | entities: 3 | - entity: humidifier 4 | class: dehumidifier 5 | dps: 6 | - id: 1 7 | name: switch 8 | type: boolean 9 | mapping: 10 | - dps_val: false 11 | icon: "mdi:air-humidifier-off" 12 | icon_priority: 1 13 | - dps_val: true 14 | icon: "mdi:air-humidifier" 15 | icon_priority: 3 16 | - id: 2 17 | name: mode 18 | type: string 19 | mapping: 20 | - dps_val: "auto" 21 | value: auto 22 | - dps_val: "fan" 23 | value: purify 24 | icon: "mdi:air-purifier" 25 | icon_priority: 2 26 | - id: 3 27 | type: integer 28 | name: current_humidity 29 | - id: 4 30 | type: integer 31 | name: humidity 32 | range: 33 | min: 35 34 | max: 80 35 | mapping: 36 | - step: 5 37 | - id: 103 38 | type: integer 39 | name: current_temperature 40 | - entity: light 41 | translation_key: display 42 | category: config 43 | dps: 44 | - id: 101 45 | type: boolean 46 | name: switch 47 | - entity: sensor 48 | class: temperature 49 | dps: 50 | - id: 103 51 | type: integer 52 | name: sensor 53 | unit: C 54 | class: measurement 55 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/hosome_purifier.yaml: -------------------------------------------------------------------------------- 1 | name: Air purifier 2 | products: 3 | - id: sferhht3hjkc942e 4 | manufacturer: Hosome 5 | entities: 6 | - entity: fan 7 | translation_only_key: fan_with_presets 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 3 13 | name: preset_mode 14 | type: string 15 | mapping: 16 | - dps_val: Auto 17 | value: smart 18 | - dps_val: Manual 19 | value: normal 20 | - dps_val: Sleep 21 | value: sleep 22 | - id: 4 23 | type: string 24 | name: speed 25 | mapping: 26 | - dps_val: "1" 27 | value: 33 28 | - dps_val: "2" 29 | value: 67 30 | - dps_val: "3" 31 | value: 100 32 | - id: 22 33 | type: string 34 | name: unknown_22 35 | - entity: sensor 36 | class: pm25 37 | dps: 38 | - id: 2 39 | type: integer 40 | name: sensor 41 | class: measurement 42 | unit: ugm3 43 | - entity: sensor 44 | name: Filter 45 | category: diagnostic 46 | icon: "mdi:air-filter" 47 | dps: 48 | - id: 5 49 | type: integer 50 | name: sensor 51 | unit: "%" 52 | - entity: lock 53 | translation_key: child_lock 54 | category: config 55 | dps: 56 | - id: 7 57 | type: boolean 58 | name: lock 59 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/welltobe_cat_feeder.yaml: -------------------------------------------------------------------------------- 1 | name: Pet feeder 2 | products: 3 | - id: qqzpxhisd6zs8zyq 4 | manufacturer: WellToBe 5 | model: WB S36D 6 | entities: 7 | - entity: number 8 | icon: "mdi:paw" 9 | name: Manual feed 10 | dps: 11 | - id: 3 12 | name: value 13 | optional: true 14 | type: integer 15 | unit: portions 16 | range: 17 | min: 1 18 | max: 6 19 | - entity: switch 20 | name: Slow feed 21 | icon: "mdi:speedometer-slow" 22 | dps: 23 | - id: 6 24 | type: boolean 25 | name: switch 26 | - entity: binary_sensor 27 | class: problem 28 | category: diagnostic 29 | dps: 30 | - id: 14 31 | type: bitfield 32 | name: sensor 33 | mapping: 34 | - dps_val: 0 35 | value: false 36 | - value: true 37 | - id: 14 38 | type: bitfield 39 | name: fault_code 40 | - entity: select 41 | name: Clock type 42 | icon: "mdi:clock" 43 | dps: 44 | - id: 102 45 | type: boolean 46 | name: option 47 | mapping: 48 | - dps_val: false 49 | value: "12 hour" 50 | - dps_val: true 51 | value: "24 hour" 52 | - entity: sensor 53 | icon: "mdi:battery" 54 | name: Battery 55 | category: diagnostic 56 | dps: 57 | - id: 103 58 | name: sensor 59 | type: string 60 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/lifubide_x600_purifier.yaml: -------------------------------------------------------------------------------- 1 | name: Air purifier 2 | products: 3 | - id: t40kx2rdqjzjss4a 4 | manufacturer: Lifubide 5 | model: X600 6 | entities: 7 | - entity: fan 8 | translation_only_key: fan_with_presets 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: switch 13 | - id: 3 14 | type: string 15 | name: preset_mode 16 | mapping: 17 | - dps_val: auto 18 | value: smart 19 | - dps_val: sleep 20 | value: sleep 21 | - dps_val: manual 22 | value: normal 23 | - entity: sensor 24 | class: pm25 25 | dps: 26 | - id: 2 27 | type: integer 28 | name: sensor 29 | unit: ugm3 30 | class: measurement 31 | - entity: lock 32 | translation_key: child_lock 33 | category: config 34 | dps: 35 | - id: 7 36 | type: boolean 37 | name: lock 38 | - entity: light 39 | translation_key: indicator 40 | category: config 41 | dps: 42 | - id: 8 43 | type: boolean 44 | name: switch 45 | - entity: binary_sensor 46 | class: problem 47 | category: diagnostic 48 | dps: 49 | - id: 22 50 | type: bitfield 51 | name: sensor 52 | mapping: 53 | - dps_val: 0 54 | value: false 55 | - value: true 56 | - id: 22 57 | type: bitfield 58 | name: fault_code 59 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/yidi_fan_light_switch.yaml: -------------------------------------------------------------------------------- 1 | name: Wall switch 2 | products: 3 | - id: 66urzkokqdufersv 4 | manufacturer: NHZS 5 | name: Fan and light switch 6 | entities: 7 | - entity: fan 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - id: 4 13 | type: integer 14 | name: speed 15 | range: 16 | min: 1 17 | max: 100 18 | - entity: light 19 | dps: 20 | - id: 5 21 | type: boolean 22 | name: switch 23 | - entity: number 24 | name: Fan timer 25 | category: config 26 | class: duration 27 | translation_key: timer 28 | dps: 29 | - id: 2 30 | type: integer 31 | name: value 32 | unit: min 33 | range: 34 | min: 0 35 | max: 86400 36 | mapping: 37 | - scale: 60 38 | step: 60 39 | - entity: select 40 | translation_key: initial_state 41 | category: config 42 | dps: 43 | - id: 11 44 | type: string 45 | name: option 46 | mapping: 47 | - dps_val: "off" 48 | value: "off" 49 | - dps_val: "on" 50 | value: "on" 51 | - dps_val: memory 52 | value: memory 53 | optional: true 54 | - entity: light 55 | translation_key: backlight 56 | category: config 57 | dps: 58 | - id: 13 59 | type: boolean 60 | name: switch 61 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/nedis_airquality.yaml: -------------------------------------------------------------------------------- 1 | name: Air quality monitor 2 | products: 3 | - id: ipbqjatfsxghe3dc 4 | manufacturer: Nedis 5 | model: WIFISA10CWT 6 | - id: hryy1di7ozhgpj6p 7 | model: RSH-AirBox01 8 | entities: 9 | - entity: sensor 10 | name: Formaldehyde 11 | class: volatile_organic_compounds 12 | dps: 13 | - id: 2 14 | type: integer 15 | name: sensor 16 | unit: ugm3 17 | class: measurement 18 | mapping: 19 | - scale: 0.1 20 | - entity: sensor 21 | class: temperature 22 | dps: 23 | - id: 18 24 | type: integer 25 | name: sensor 26 | unit: C 27 | class: measurement 28 | mapping: 29 | - scale: 10 30 | - entity: sensor 31 | class: humidity 32 | dps: 33 | - id: 19 34 | type: integer 35 | name: sensor 36 | unit: "%" 37 | class: measurement 38 | mapping: 39 | - scale: 10 40 | - entity: sensor 41 | name: Volatile organic compounds 42 | class: volatile_organic_compounds_parts 43 | dps: 44 | - id: 21 45 | type: integer 46 | name: sensor 47 | unit: ppm 48 | class: measurement 49 | mapping: 50 | - scale: 10 51 | - entity: sensor 52 | class: carbon_dioxide 53 | dps: 54 | - id: 22 55 | type: integer 56 | name: sensor 57 | unit: ppm 58 | class: measurement 59 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/hydrotherm_dynamic_x8_water_heater.yaml: -------------------------------------------------------------------------------- 1 | name: Hydrotherm DYNAMIC/X8 2 | entities: 3 | - entity: water_heater 4 | dps: 5 | - id: 1 6 | type: boolean 7 | name: operation_mode 8 | mapping: 9 | - dps_val: false 10 | value: "off" 11 | - dps_val: true 12 | constraint: work_mode 13 | conditions: 14 | - dps_val: ECO 15 | value: eco 16 | - dps_val: STANDARD 17 | value: heat_pump 18 | - dps_val: HYBRID 19 | value: high_demand 20 | - dps_val: HYBRID1 21 | value: performance 22 | - dps_val: ELEMENT 23 | value: electric 24 | - id: 2 25 | type: integer 26 | name: temperature 27 | unit: C 28 | range: 29 | min: 15 30 | max: 75 31 | readonly: true 32 | - id: 3 33 | type: integer 34 | name: current_temperature 35 | - id: 4 36 | type: string 37 | name: work_mode 38 | hidden: true 39 | - entity: binary_sensor 40 | class: problem 41 | category: diagnostic 42 | dps: 43 | - id: 21 44 | type: bitfield 45 | name: sensor 46 | mapping: 47 | - dps_val: 0 48 | value: false 49 | - value: true 50 | - id: 21 51 | type: bitfield 52 | name: fault_code 53 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/netmostat_n1_thermostat.yaml: -------------------------------------------------------------------------------- 1 | name: Netmostat N-1 thermostat 2 | entities: 3 | - entity: climate 4 | dps: 5 | - id: 1 6 | type: boolean 7 | name: hvac_mode 8 | mapping: 9 | - dps_val: true 10 | value: heat 11 | - dps_val: false 12 | value: "off" 13 | - id: 2 14 | type: integer 15 | name: temperature 16 | unit: C 17 | range: 18 | min: 50 19 | max: 350 20 | mapping: 21 | - step: 5 22 | scale: 10 23 | - id: 3 24 | type: integer 25 | name: current_temperature 26 | mapping: 27 | - scale: 10 28 | - id: 4 29 | type: string 30 | name: preset_mode 31 | mapping: 32 | - dps_val: smart 33 | value: comfort 34 | - dps_val: antifreezing 35 | value: away 36 | - entity: lock 37 | translation_key: child_lock 38 | category: config 39 | dps: 40 | - id: 7 41 | type: boolean 42 | name: lock 43 | - entity: select 44 | translation_key: timer 45 | category: config 46 | dps: 47 | - id: 19 48 | type: string 49 | name: option 50 | optional: true 51 | mapping: 52 | - dps_val: "0h" 53 | value: cancel 54 | - dps_val: "1h" 55 | value: "1h" 56 | - dps_val: "2h" 57 | value: "2h" 58 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/thermex_if50v_waterheater.yaml: -------------------------------------------------------------------------------- 1 | name: Water heater 2 | products: 3 | - id: sz9gfbdn5my6GCfR 4 | manufacturer: Thermex 5 | model: IF 50 V pro 6 | entities: 7 | - entity: water_heater 8 | dps: 9 | - id: 101 10 | type: boolean 11 | name: operation_mode 12 | mapping: 13 | - dps_val: false 14 | value: "off" 15 | - dps_val: true 16 | constraint: work_mode 17 | conditions: 18 | - dps_val: "3" 19 | value: eco 20 | - dps_val: "2" 21 | value: electric 22 | default: true 23 | - dps_val: "4" 24 | value: away 25 | - dps_val: "1" 26 | value: performance 27 | - id: 104 28 | type: integer 29 | name: temperature 30 | unit: C 31 | range: 32 | min: 15 33 | max: 75 34 | - id: 102 35 | type: integer 36 | name: current_temperature 37 | - id: 105 38 | type: string 39 | name: work_mode 40 | hidden: true 41 | - entity: binary_sensor 42 | class: problem 43 | category: diagnostic 44 | dps: 45 | - id: 106 46 | type: bitfield 47 | name: sensor 48 | mapping: 49 | - dps_val: 0 50 | value: false 51 | - value: true 52 | - id: 106 53 | type: bitfield 54 | name: fault_code 55 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/costway_portable_ac.yaml: -------------------------------------------------------------------------------- 1 | name: Portable air conditioner 2 | products: 3 | - id: 86sjxqebxymrjt3z 4 | manufacturer: Costway 5 | entities: 6 | - entity: climate 7 | dps: 8 | - id: 1 9 | type: boolean 10 | name: hvac_mode 11 | mapping: 12 | - dps_val: false 13 | value: "off" 14 | - dps_val: true 15 | constraint: mode 16 | conditions: 17 | - dps_val: cold 18 | value: cool 19 | - dps_val: wind 20 | value: fan_only 21 | - dps_val: wet 22 | value: dry 23 | - id: 2 24 | type: integer 25 | name: temperature 26 | range: 27 | min: 16 28 | max: 30 29 | unit: C 30 | - id: 3 31 | type: integer 32 | name: current_temperature 33 | - id: 4 34 | type: string 35 | name: mode 36 | hidden: true 37 | - id: 5 38 | type: string 39 | name: fan_mode 40 | mapping: 41 | - dps_val: low 42 | value: low 43 | - dps_val: high 44 | value: high 45 | - id: 20 46 | type: integer 47 | name: unknown_20 48 | - id: 103 49 | type: boolean 50 | name: unknown_103 51 | - id: 107 52 | type: integer 53 | name: unknown_106 54 | - id: 109 55 | type: integer 56 | name: unknown_107 57 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/ems_waterheater.yaml: -------------------------------------------------------------------------------- 1 | name: Water heater 2 | products: 3 | - id: nqlqesmkrje7vdhm 4 | manufacturer: EMS 5 | model: Thermal heat pump 6 | model_id: TH200DT 7 | entities: 8 | - entity: water_heater 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: operation_mode 13 | mapping: 14 | - dps_val: false 15 | value: "off" 16 | - dps_val: true 17 | constraint: mode 18 | conditions: 19 | - dps_val: auto 20 | value: heat_pump 21 | - dps_val: mix 22 | value: high_demand 23 | - dps_val: electric 24 | value: electric 25 | - id: 2 26 | type: integer 27 | name: temperature 28 | range: 29 | min: 10 30 | max: 70 31 | unit: C 32 | - id: 4 33 | type: string 34 | name: mode 35 | hidden: true 36 | - entity: sensor 37 | class: temperature 38 | dps: 39 | - id: 3 40 | type: integer 41 | name: sensor 42 | unit: C 43 | class: measurement 44 | - entity: binary_sensor 45 | class: problem 46 | category: diagnostic 47 | dps: 48 | - id: 9 49 | type: bitfield 50 | name: sensor 51 | mapping: 52 | - dps_val: 0 53 | value: false 54 | - value: true 55 | - id: 9 56 | type: bitfield 57 | name: fault_code 58 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/cct_lightbulb.yaml: -------------------------------------------------------------------------------- 1 | name: CCT lightbulb 2 | products: 3 | - id: dqs8oqdeccnqjfkx 4 | model: A60 5 | - id: znfxaaxc89zz6m5a 6 | model: A65 7 | - id: c59bbbt5xsm6fkkk 8 | manufacturer: Laser 9 | model: 10W smart white bulb E27 10 | - id: t6kkutyhtbbohacx 11 | manufacturer: Connect 12 | model: 10W smart white bulb E27 13 | - id: owzzoxsdudnxgije 14 | manufacturer: Genio 15 | name: CCT downlight 16 | entities: 17 | - entity: light 18 | dps: 19 | - id: 20 20 | type: boolean 21 | name: switch 22 | - id: 21 23 | name: work_mode 24 | type: string 25 | - id: 22 26 | name: brightness 27 | type: integer 28 | range: 29 | min: 10 30 | max: 1000 31 | - id: 23 32 | name: color_temp 33 | type: integer 34 | range: 35 | min: 0 36 | max: 1000 37 | mapping: 38 | - target_range: 39 | min: 2700 40 | max: 6500 41 | - id: 25 42 | name: scene 43 | type: hex 44 | optional: true 45 | - entity: number 46 | translation_key: timer 47 | class: duration 48 | category: config 49 | dps: 50 | - id: 26 51 | type: integer 52 | name: value 53 | unit: min 54 | range: 55 | min: 0 56 | max: 86400 57 | mapping: 58 | - scale: 60 59 | step: 60 60 | optional: true 61 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/orion_indoor_siren.yaml: -------------------------------------------------------------------------------- 1 | name: Indoor Siren 2 | products: 3 | - id: yytgthb3nxt1zp0e 4 | manufacturer: Orion 5 | model: SWS07HA 6 | entities: 7 | - entity: siren 8 | dps: 9 | - id: 1 10 | name: tone 11 | type: string 12 | mapping: 13 | - dps_val: alarm_sound 14 | value: sound 15 | default: true 16 | - dps_val: normal 17 | value: "off" 18 | - id: 5 19 | name: volume_level 20 | type: string 21 | mapping: 22 | - dps_val: low 23 | value: 0.33 24 | - dps_val: middle 25 | value: 0.67 26 | - dps_val: high 27 | value: 1.0 28 | - id: 7 29 | name: duration 30 | type: integer 31 | range: 32 | min: 0 33 | max: 4 34 | unit: min 35 | - entity: alarm_control_panel 36 | dps: 37 | - id: 4 38 | type: boolean 39 | name: alarm_state 40 | mapping: 41 | - dps_val: true 42 | value: armed_away 43 | - dps_val: false 44 | value: disarmed 45 | - entity: select 46 | name: Mode 47 | dps: 48 | - id: 19 49 | type: string 50 | name: option 51 | mapping: 52 | - dps_val: "SOUND" 53 | value: "Sound" 54 | - dps_val: "Sound_Light" 55 | value: "Sound+light" 56 | - dps_val: "LINGHT" 57 | value: "Light" 58 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/aquatech_x6_water_heater.yaml: -------------------------------------------------------------------------------- 1 | name: Aquatech RAPID/X6 2 | entities: 3 | - entity: water_heater 4 | dps: 5 | - id: 1 6 | type: boolean 7 | name: operation_mode 8 | mapping: 9 | - dps_val: false 10 | value: "off" 11 | - dps_val: true 12 | constraint: work_mode 13 | conditions: 14 | - dps_val: ECO 15 | value: eco 16 | - dps_val: Stand 17 | value: heat_pump 18 | - dps_val: HYB 19 | value: high_demand 20 | - dps_val: HYB1 21 | value: performance 22 | - dps_val: ELE 23 | value: electric 24 | - id: 2 25 | type: string 26 | name: work_mode 27 | hidden: true 28 | - id: 4 29 | type: integer 30 | name: temperature 31 | unit: C 32 | range: 33 | min: 15 34 | max: 75 35 | readonly: true 36 | - id: 7 37 | type: boolean 38 | name: defrosting 39 | - id: 16 40 | type: integer 41 | name: current_temperature 42 | - entity: binary_sensor 43 | class: problem 44 | category: diagnostic 45 | dps: 46 | - id: 15 47 | type: bitfield 48 | name: sensor 49 | mapping: 50 | - dps_val: 0 51 | value: false 52 | - value: true 53 | - id: 15 54 | type: bitfield 55 | name: fault_code 56 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/goldair_platinum_tower_fan.yaml: -------------------------------------------------------------------------------- 1 | name: Tower fan 2 | products: 3 | - id: hgsp7xfajllkqujw 4 | manufacturer: Goldair 5 | model: Platinum Tower Fan 6 | entities: 7 | - entity: fan 8 | translation_only_key: fan_with_presets 9 | dps: 10 | - id: 1 11 | type: boolean 12 | name: switch 13 | - id: 2 14 | type: string 15 | name: preset_mode 16 | mapping: 17 | - dps_val: 1 18 | value: normal 19 | - dps_val: 2 20 | value: nature 21 | - dps_val: 3 22 | value: sleep 23 | - dps_val: 4 24 | value: baby 25 | - id: 3 26 | type: integer 27 | name: speed 28 | range: 29 | min: 1 30 | max: 3 31 | - id: 4 32 | type: string 33 | name: oscillate 34 | mapping: 35 | - dps_val: "on" 36 | value: true 37 | - dps_val: "off" 38 | value: false 39 | - id: 6 40 | type: integer 41 | name: timer 42 | - entity: number 43 | translation_key: timer 44 | class: duration 45 | category: config 46 | dps: 47 | - id: 6 48 | type: integer 49 | name: value 50 | unit: h 51 | range: 52 | min: 0 53 | max: 9 54 | - entity: sensor 55 | class: temperature 56 | dps: 57 | - id: 19 58 | type: integer 59 | name: sensor 60 | class: measurement 61 | unit: C 62 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/powerstrip_4outlet_usbs.yaml: -------------------------------------------------------------------------------- 1 | name: 4 outlet + USB powerstrip 2 | entities: 3 | - entity: switch 4 | translation_key: outlet_x 5 | translation_placeholders: 6 | x: "1" 7 | class: outlet 8 | dps: 9 | - id: 1 10 | type: boolean 11 | name: switch 12 | - entity: switch 13 | translation_key: outlet_x 14 | translation_placeholders: 15 | x: "2" 16 | class: outlet 17 | dps: 18 | - id: 2 19 | type: boolean 20 | name: switch 21 | - entity: switch 22 | translation_key: outlet_x 23 | translation_placeholders: 24 | x: "3" 25 | class: outlet 26 | dps: 27 | - id: 3 28 | type: boolean 29 | name: switch 30 | - entity: switch 31 | translation_key: outlet_x 32 | translation_placeholders: 33 | x: "4" 34 | class: outlet 35 | dps: 36 | - id: 4 37 | type: boolean 38 | name: switch 39 | - entity: switch 40 | name: USB switch 41 | class: switch 42 | dps: 43 | - id: 5 44 | type: boolean 45 | name: switch 46 | - entity: select 47 | translation_key: initial_state 48 | category: config 49 | dps: 50 | - id: 7 51 | type: string 52 | name: option 53 | mapping: 54 | - dps_val: "0" 55 | value: "off" 56 | - dps_val: "1" 57 | value: "on" 58 | - dps_val: "2" 59 | value: memory 60 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/kkmoon_airquality_monitor.yaml: -------------------------------------------------------------------------------- 1 | name: Air quality 2 | products: 3 | - id: ezovdhzaxsovyzf0 4 | manufacturer: KKMoon 5 | name: 7in1 air quality meter 6 | entities: 7 | - entity: sensor 8 | translation_key: air_quality 9 | dps: 10 | - id: 21 11 | type: string 12 | name: sensor 13 | - entity: sensor 14 | class: pm25 15 | dps: 16 | - id: 2 17 | type: integer 18 | name: sensor 19 | unit: µg/m³ 20 | class: measurement 21 | - entity: sensor 22 | name: Formaldehyde 23 | class: volatile_organic_compounds 24 | dps: 25 | - id: 27 26 | type: integer 27 | name: sensor 28 | unit: µg/m³ 29 | class: measurement 30 | - entity: sensor 31 | class: temperature 32 | dps: 33 | - id: 12 34 | type: integer 35 | name: sensor 36 | unit: C 37 | class: measurement 38 | mapping: 39 | - scale: 10 40 | - entity: sensor 41 | class: humidity 42 | dps: 43 | - id: 13 44 | type: integer 45 | name: sensor 46 | unit: "%" 47 | class: measurement 48 | - entity: sensor 49 | class: volatile_organic_compounds 50 | dps: 51 | - id: 14 52 | type: integer 53 | name: sensor 54 | unit: µg/m³ 55 | class: measurement 56 | - entity: sensor 57 | class: carbon_dioxide 58 | dps: 59 | - id: 15 60 | type: integer 61 | name: sensor 62 | unit: ppm 63 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/moes_dimmer.yaml: -------------------------------------------------------------------------------- 1 | name: Moes dimmer 2 | entities: 3 | - entity: light 4 | dps: 5 | - id: 1 6 | type: boolean 7 | name: switch 8 | - id: 2 9 | name: brightness 10 | type: integer 11 | range: 12 | min: 10 13 | max: 1000 14 | - id: 13 15 | name: work_mode 16 | type: string 17 | - entity: number 18 | name: Minimum brightness 19 | category: config 20 | icon: "mdi:brightness-percent" 21 | dps: 22 | - id: 3 23 | type: integer 24 | name: value 25 | unit: "%" 26 | range: 27 | min: 10 28 | max: 1000 29 | mapping: 30 | - scale: 10 31 | - entity: select 32 | name: Light type 33 | icon: "mdi:lightbulb-question" 34 | category: config 35 | dps: 36 | - id: 4 37 | type: string 38 | name: option 39 | mapping: 40 | - dps_val: led 41 | value: LED 42 | - dps_val: incandescent 43 | value: Incandescent 44 | - dps_val: halogen 45 | value: Halogen 46 | - entity: select 47 | name: Backlight mode 48 | icon: "mdi:circle-outline" 49 | category: config 50 | dps: 51 | - id: 21 52 | type: string 53 | name: option 54 | mapping: 55 | - dps_val: none 56 | value: "Off" 57 | - dps_val: relay 58 | value: Status 59 | - dps_val: pos 60 | value: Locator 61 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/nedis_htpl20f_heater.yaml: -------------------------------------------------------------------------------- 1 | name: Nedis smart convection heater 2 | entities: 3 | - entity: climate 4 | translation_only_key: heater 5 | dps: 6 | - id: 1 7 | type: boolean 8 | name: hvac_mode 9 | mapping: 10 | - dps_val: true 11 | value: heat 12 | - dps_val: false 13 | value: "off" 14 | - id: 2 15 | type: integer 16 | name: temperature 17 | unit: C 18 | range: 19 | min: 15 20 | max: 35 21 | - id: 3 22 | type: integer 23 | name: current_temperature 24 | - id: 4 25 | type: string 26 | name: preset_mode 27 | mapping: 28 | - dps_val: "1" 29 | value: eco 30 | - dps_val: "2" 31 | value: comfort 32 | - dps_val: "3" 33 | value: away 34 | - id: 11 35 | type: string 36 | name: unknown_11 37 | - id: 101 38 | type: boolean 39 | name: unknown_101 40 | - entity: lock 41 | translation_key: child_lock 42 | category: config 43 | dps: 44 | - id: 7 45 | type: boolean 46 | name: lock 47 | - entity: number 48 | translation_key: timer 49 | class: duration 50 | category: config 51 | dps: 52 | - id: 13 53 | type: integer 54 | name: value 55 | unit: min 56 | range: 57 | min: 0 58 | max: 1440 59 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/simple_switch_timerv2.yaml: -------------------------------------------------------------------------------- 1 | name: Simple switch with timer 2 | products: 3 | - id: eetmtcempdyxgpx5 4 | manufacturer: Nexxt 5 | model: 220v smartplug 6 | - id: 45gg9a0jfyzj1z1d 7 | name: Mini smart switch 8 | - id: qlrnevw57ezct7ta 9 | name: Wall switch 10 | - id: flcvzjtnkhsreazp 11 | manufacturer: GIRIER 12 | name: USB adaptor 13 | - id: lbqau5negh2zizit 14 | manufacturer: Kruidvat 15 | name: Outdoor smartplug 16 | entities: 17 | - entity: switch 18 | dps: 19 | - id: 1 20 | name: switch 21 | type: boolean 22 | - entity: number 23 | category: config 24 | class: duration 25 | translation_key: timer 26 | dps: 27 | - id: 9 28 | name: value 29 | type: integer 30 | unit: min 31 | range: 32 | min: 0 33 | max: 86400 34 | mapping: 35 | - scale: 60 36 | step: 60 37 | - entity: select 38 | translation_key: initial_state 39 | category: config 40 | dps: 41 | - id: 38 42 | type: string 43 | name: option 44 | optional: true 45 | mapping: 46 | - dps_val: "on" 47 | value: "on" 48 | - dps_val: "off" 49 | value: "off" 50 | - dps_val: memory 51 | value: memory 52 | - id: 38 53 | type: string 54 | name: available 55 | optional: true 56 | mapping: 57 | - dps_val: null 58 | value: false 59 | - value: true 60 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/goldair_geco_heater.yaml: -------------------------------------------------------------------------------- 1 | name: Goldair GECO heater 2 | legacy_type: geco_heater 3 | entities: 4 | - entity: climate 5 | translation_only_key: heater 6 | dps: 7 | - id: 1 8 | type: boolean 9 | mapping: 10 | - dps_val: false 11 | value: "off" 12 | - dps_val: true 13 | value: "heat" 14 | name: hvac_mode 15 | - id: 3 16 | type: integer 17 | range: 18 | min: 15 19 | max: 35 20 | name: temperature 21 | unit: C 22 | - id: 4 23 | type: integer 24 | name: current_temperature 25 | - id: 5 26 | type: integer 27 | name: timer 28 | - entity: lock 29 | translation_key: child_lock 30 | category: config 31 | dps: 32 | - id: 2 33 | type: boolean 34 | name: lock 35 | - entity: number 36 | translation_key: timer 37 | class: duration 38 | category: config 39 | dps: 40 | - id: 5 41 | type: integer 42 | name: value 43 | unit: h 44 | range: 45 | min: 0 46 | max: 24 47 | - entity: binary_sensor 48 | class: problem 49 | category: diagnostic 50 | dps: 51 | - id: 6 52 | name: sensor 53 | type: bitfield 54 | mapping: 55 | - dps_val: 0 56 | value: false 57 | - value: true 58 | - id: 6 59 | type: bitfield 60 | name: fault_code 61 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/loratap_zigbee_curtain.yaml: -------------------------------------------------------------------------------- 1 | name: Curtain 2 | products: 3 | - id: 8kzqqzu4 4 | manufacturer: Loratap 5 | model: SC500ZB-V2 6 | - id: v7ooovn9oamttmre 7 | manufacturer: Loratap 8 | entities: 9 | - entity: cover 10 | class: shutter 11 | dps: 12 | - id: 1 13 | name: control 14 | type: string 15 | mapping: 16 | - dps_val: "open" 17 | value: open 18 | - dps_val: "close" 19 | value: close 20 | - dps_val: "stop" 21 | value: stop 22 | - id: 2 23 | name: position 24 | type: integer 25 | unit: "%" 26 | range: 27 | min: 0 28 | max: 100 29 | mapping: 30 | - step: 10 31 | - id: 14 32 | name: light_mode 33 | type: string 34 | optional: true 35 | - entity: switch 36 | category: config 37 | name: Reverse Motor Direction 38 | icon: "mdi:arrow-u-down-left" 39 | dps: 40 | - id: 8 41 | type: string 42 | name: switch 43 | mapping: 44 | - dps_val: "forward" 45 | value: false 46 | - dps_val: "back" 47 | value: true 48 | - entity: select 49 | name: Calibration 50 | category: config 51 | icon: "mdi:toggle-switch" 52 | dps: 53 | - id: 3 54 | name: option 55 | type: string 56 | mapping: 57 | - dps_val: "start" 58 | value: "On" 59 | - dps_val: "end" 60 | value: "Off" 61 | -------------------------------------------------------------------------------- /custom_components/tuya_local/devices/woods_milan_airconditioner.yaml: -------------------------------------------------------------------------------- 1 | name: Air conditioner 2 | products: 3 | - id: i5rv3ykmtfcagw1t 4 | manufacturer: Woods 5 | model: Milan 7K 6 | entities: 7 | - entity: climate 8 | dps: 9 | - id: 1 10 | name: hvac_mode 11 | type: boolean 12 | mapping: 13 | - dps_val: false 14 | value: "off" 15 | - dps_val: true 16 | constraint: mode 17 | conditions: 18 | - dps_val: auto 19 | value: heat_cool 20 | - dps_val: cold 21 | value: cool 22 | - dps_val: wind 23 | value: fan_only 24 | - dps_val: wet 25 | value: dry 26 | - dps_val: hot 27 | value: heat 28 | - id: 2 29 | name: temperature 30 | type: integer 31 | range: 32 | min: 15 33 | max: 31 34 | unit: C 35 | - id: 3 36 | name: current_temperature 37 | type: integer 38 | - id: 4 39 | name: mode 40 | type: string 41 | hidden: true 42 | - id: 5 43 | name: fan_mode 44 | type: string 45 | mapping: 46 | - dps_val: "0" 47 | value: low 48 | - dps_val: "1" 49 | value: high 50 | - id: 104 51 | name: swing_mode 52 | type: boolean 53 | mapping: 54 | - dps_val: true 55 | value: "on" 56 | - dps_val: false 57 | value: "off" 58 | --------------------------------------------------------------------------------