Jason Rumney ea9df4e50f ETOP HT: Error should be a sensor, not a number. 3 years ago
..
README.md c1fc369a7c Improve the light color_mode documentation. 3 years ago
__init__.py ab399ed78a Add device configuration files for supported devices. 5 years ago
agl_ultramagic_lock.yaml 4ceb72b852 Add partial support for AGL Ultramagic smart lock. 3 years ago
alecoair_d12_dehumidifier.yaml bb5348ed85 AlecoAir D12 ECO 3 years ago
alecoair_d14_dehumidifier.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
alecoair_d16_dehumidifier.yaml 09df9144de Support for AlecoAir D16 PURIFY dehumidifier 3 years ago
andersson_gsh_heater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
anko_fan.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
arlec_fan.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
arlec_fan_light.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
arlec_pb88uha_s2_switch.yaml 13dfb6aff2 Arlec PB88uha: follow HA naming conventions. 3 years ago
aspen_asp200_fan.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
atomi_string_lights.yaml d2b512ea17 Atomi lights: allow brightness to go down to zero. 3 years ago
aubess_1gang_switch.yaml 087ee1fea8 Add Aubess switch with energy monitoring 3 years ago
aubess_2gang_switch.yaml 087ee1fea8 Add Aubess switch with energy monitoring 3 years ago
avatto_curtain_switch.yaml ae58f88ac0 Add a button entity, use it for Avatto Curtain Switch. 3 years ago
avatto_roller_blinds.yaml 3eed5aad9c Add support for Deta motion lights. 3 years ago
avatto_wt100_thermostat.yaml 7066e35d59 Avatto thermostat: fix indentation in yaml config 3 years ago
awow_th213_thermostat.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
awow_th213v2_thermostat.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
beca_bac002_thermostat_c.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
beca_bhp6000_thermostat_c.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
beca_bhp6000_thermostat_f.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
beca_bhp6000_thermostat_mapped.yaml 1dbc37bfbd Add a third config for Beca BHP6000 thermostat quirks. 3 years ago
beca_bht002_thermostat_c.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
beca_bht6000_thermostat_c.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
becool_heatpump.yaml 651a9fbcad Be Cool heatpump: Adjust mode mapping according to observations. 3 years ago
benexmart_blind_motor.yaml d8ad3dafa6 Update benexmart_blind_motor.yaml 3 years ago
beok_tgr81_thermostat_c.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
beok_tol47_thermostat.yaml 83de0f4d0c Avatto thermostat: sync with Beok TOL47 3 years ago
beok_tr9b_thermostat.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
betterlife_bl1500_heater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
bresser_weather_station.yaml bb802fca44 Update bresser_weather_station.yaml 3 years ago
bwt_heatpump.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
carson_cb.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
catit_pet_feeder.yaml 6458c9db63 Convert some reset switches to buttons: 3 years ago
catit_pixi_smart_fountain.yaml 6458c9db63 Convert some reset switches to buttons: 3 years ago
compteur_energy_meter.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
daizuki_heatpump.yaml c3c14f740a Daizuki heatpump: make dp 101 and 125 optional. 3 years ago
deta_fan.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
devola_patio_heater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
digoo_dgsp01_dual_nightlight_switch.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
digoo_dgsp202.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
dongguan_garage_door_opener.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
dual_power_monitor_smartplug.yaml d270da9947 Add Dual smartplug with power monitoring 3 years ago
eanons_humidifier.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
eberg_cooly_c35hd.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
eberg_qubo_q40hd_heatpump.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
ecostrad_accentiq_heater.yaml 27f4cc6a75 Ecostrad heater: timer is in hours, not minutes. 4 years ago
ecostrad_iqceramic_radiator.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
eeese_carl_dehumidifier.yaml d08ed7b2f7 Add support for Eeese Carl dehumidifier 3 years ago
eeese_otto_dehumidifier.yaml 9067557be3 Add support for Eeese Otto dehumidifier. 3 years ago
eesee_adam_dehumidifier.yaml 9067557be3 Add support for Eeese Otto dehumidifier. 3 years ago
electriq_12wminv_heatpump.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
electriq_airflex15w_heatpump.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
electriq_cd12pro_dehumidifier.yaml d3bfc30069 Electriq CD12Pro: add missing quotes to icon 3 years ago
electriq_cd12pw_dehumidifier.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
electriq_cd12pwv2_dehumidifier.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
electriq_cd20pro_dehumidifier.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
electriq_cd25pro_dehumidifier.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
electriq_desd9lw_dehumidifier.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
electriq_ecosilent14hpw_aircon.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
energy_monitoring_powerstrip.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
es01_powerstrip.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
essentials_purifier.yaml 6458c9db63 Convert some reset switches to buttons: 3 years ago
etop_ch7100_thermostat.yaml 9f02b3bfeb Etop CH7100: Merge Auto and main thermostats 3 years ago
etop_ht_thermostat.yaml ea9df4e50f ETOP HT: Error should be a sensor, not a number. 3 years ago
eurom_600_heater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
eurom_600_heater_v2.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
eurom_601_heater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
eurom_saniwallheat2000_heater.yaml 3e2c9ce50e added Eurom Sani-Wall-Heat 2000 Wifi heater 3 years ago
eurom_walldesignheat2000_heater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
fairland_iphcr15_heatpump.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
fersk_vind_2_climate.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
garage_door_opener.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
gardenpac_heatpump.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
ge_jasco_ultra_pro_toggle_dimmer_v2.yaml df5c4cbe4e Support for GE Jasco Ultra Pro Dimmer, Toggle, and TH16 Temp sensor 3 years ago
ge_jasco_ultra_pro_toggle_switch.yaml df5c4cbe4e Support for GE Jasco Ultra Pro Dimmer, Toggle, and TH16 Temp sensor 3 years ago
goldair_dehumidifier.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
goldair_fan.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
goldair_geco_heater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
goldair_gpcv_heater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
goldair_gpph_heater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
greenwind_dehumidifier.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
grid_connect_double_switch.yaml 103397bfd9 Standardize naming of outlets to simplify translations. 4 years ago
grid_connect_usb_double_power_point.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
grid_connect_usb_power_point.yaml f82f13f2fe Add support for Grid Connect USB charger with power socket 3 years ago
hellnar_heatpump.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
himox_h05_purifier.yaml 6458c9db63 Convert some reset switches to buttons: 3 years ago
himox_h06_purifier.yaml 6458c9db63 Convert some reset switches to buttons: 3 years ago
hjz_radiator.yaml 5281a5e86d Add support for HJZ oil column radiator 3 years ago
honeywell_dehumidifier.yaml 0d18bcc9a8 Add Honeywell TP dehumidifier 3 years ago
hosome_purifier.yaml a344b00d87 Hosome purifier: add child lock, remove pm2.5 scaling 3 years ago
hydrotherm_dynamic_x8_water_heater.yaml 246fcc15db Add tests for water heater 3 years ago
hysen_hy08acf_thermostat.yaml 74a38b79b2 Hysen hy08acf: use heat_cool for the on position. 3 years ago
hysen_hy08we2_thermostat.yaml d9456c0d49 Hysen thermostat: fix hvac_action logic 3 years ago
hyundai_sahara_dehumidifier.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
inkbird_itc306a_thermostat.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
inkbird_itc308_thermostat.yaml 3e9f042d91 Inkbird ITC-308: add an extra idle state. 3 years ago
inkbird_sousvide_cooker.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
inow_heater_element.yaml 5b758922fe Add support for INOW heating elements 3 years ago
inventor_atmospherexl_dehumidifier.yaml 01f4eeffc0 Inventor dehumidifier: split some errors 3 years ago
inventor_evaionpro_dehumidifier.yaml cd4878aa5e Inventor Eva Pro: tank full is one of the fault codes 3 years ago
ips_pro_heatpump.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
ir_remote_sensors.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
jiahong_et72w_thermostat.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
jjpro_jpd01_dehumidifier.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
jjpro_jpd02_dehumidifier.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
kogan_dehumidifier.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
kogan_garage_opener.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
kogan_glass_1_7l_kettle.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
kogan_kahtp_heater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
kogan_kashmfp20ba_heater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
kogan_kasthfp2kwa_towerheater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
kogan_kawfhtp_heater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
kogan_kawfpac09ya_airconditioner.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
kyvol_e30_vacuum.yaml 6458c9db63 Convert some reset switches to buttons: 3 years ago
ledkia_fan_light.yaml 181a065456 Ledkia light: remove conditional behaviour based on light_type. 3 years ago
lefant_m213_vacuum.yaml 10bd189d52 Lefant M213 vacuum: mark some more attributes as optional 3 years ago
lexy_f501_fan.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
light_string.yaml 0e2ae3fb9f Light string: Fix Scene mapping. Map scene and music as original names 3 years ago
logicom_powerstrip.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
m027_curtain.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
madimack_elite_v3_heatpump.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
madimack_heatpump.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
me80_thermostat.yaml 2601907326 ME80: expose auto/manual in hvac_mode 3 years ago
minco_mh1823d_thermostat.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
mirabella_genio_usb.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
moes_bht002_thermostat_c.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
moes_rgb_socket.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
moes_temp_humidity.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
motion_sensor_light.yaml 3eed5aad9c Add support for Deta motion lights. 3 years ago
nashone_mts700wb_thermostat.yaml 6458c9db63 Convert some reset switches to buttons: 3 years ago
nedis_htpl20f_heater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
orion_outdoor_siren.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
orion_smart_lock.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
owon_pct513_thermostat.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
parkside_plgs2012a1_smart_charger.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
pc321ty_energy_meter.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
pj1103_clamp_meter.yaml 4aad1a82cb Refinement of PJ-1103 power clamp meter based on further info 3 years ago
poiema_one_purifier.yaml 6458c9db63 Convert some reset switches to buttons: 3 years ago
poolex_qline_heatpump.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
poolex_silverline_heatpump.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
poolex_vertigo_heatpump.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
purline_m100_heater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
qoto_03_sprinkler.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
qs_c01_curtain.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
remora_heatpump.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
renpho_rp_ap001s.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
rgbcw_lightbulb.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
rotenso_ronir35wi_heatpump.yaml 585d0cdf7d Rotenso: rename swing to swing_mode to match climate expectation. 3 years ago
saswell_c16_thermostat.yaml 6522bd61d1 Saswell C16: update tests, remove obsolete attributes. 3 years ago
saswell_t29utk_thermostat.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
sd123_hpr01_presence.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
sendo_airconditioner_c.yaml 980645def2 Sendo air conditioner - remove duplicate config attribute 3 years ago
simple_blinds.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
simple_dual_switch_timer.yaml 3eed5aad9c Add support for Deta motion lights. 3 years ago
simple_dual_switch_timer_v2.yaml 03d7d401aa Add another variant of simple dual switch with timers. 3 years ago
simple_quad_switch.yaml c5d4aaeb62 Add support for 1/2/3/4 gang Somgom wall switches. 3 years ago
simple_rgbcw_lightbulb.yaml 8d4e286e75 Add support for simpler RGBCW lightbulb. 3 years ago
simple_switch.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
simple_switch_timer.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
simple_switch_timerv2.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
simple_triple_switch.yaml 0acb2cc7ea Simple triple switch: fix name 3 years ago
single_switch_with_backlight.yaml 815f351ac4 Switch with backlight: add icons, step for timer. 3 years ago
smartmcb_smt006_energymeter.yaml 6458c9db63 Convert some reset switches to buttons: 3 years ago
smartplug_encoded.yaml 9b46e5962f Smartplug Encoded: identified unknown values. 3 years ago
smartplugv1.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
smartplugv2.yaml 233ebf9be4 Add optional attributes to smartplugv2. 3 years ago
smartplugv2_energy.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
smartplugv2_energyv2.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
smartplugv2_energyv3.yaml 3fd0a3e15b Add support for Aubess smart switches. 3 years ago
smartplugv3.yaml 05642bcf72 Add another generic smartplug variant to better match GNCC 16A one. 3 years ago
somgom_double_switch.yaml 2ffc49ff86 Somgom switches: remove power_on_state selector 3 years ago
somgom_single_switch.yaml 2ffc49ff86 Somgom switches: remove power_on_state selector 3 years ago
space_dog_music_lamp.yaml 59e524fec4 Add support for Space Dog music lamp. 3 years ago
stadlerform_roger_purifier.yaml 4423135b2e Stadler Roger: change fan from presets to speeds. 3 years ago
starlight_heatpump.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
stirling_fs140dc_fan.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
t5e_wf_thermostat.yaml 6458c9db63 Convert some reset switches to buttons: 3 years ago
tadiran_wind_heatpump.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
tellur_usb_power_strip.yaml 8673765ce3 Tellur powerstrip: add docs, fix config. 3 years ago
tesla_air_purifier_mini.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
tesla_air_purifier_pro.yaml 031fc5c559 Update tesla_air_purifier_pro.yaml 3 years ago
th16_temp_humidity_sensor.yaml df5c4cbe4e Support for GE Jasco Ultra Pro Dimmer, Toggle, and TH16 Temp sensor 3 years ago
tmwf02_fan.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
treatlife_ds02_fan.yaml ae0510bc3c Add support for DS02-F fan switches (Treatlife) 3 years ago
tyte_d1_thermostat.yaml e2a9d79b66 Add support for RYRA TYTE-D1 thermostat 3 years ago
vork_vk6067aw_purifier.yaml 6458c9db63 Convert some reset switches to buttons: 3 years ago
weau_pool_heatpump.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
weau_pool_heatpump_v2.yaml 370ddcfcb6 climate: overide turn_off and turn_on 3 years ago
wetair_wawh1210lw_humidifier.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
wetair_wch750_heater.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
wilfa_haze_hu400bc_humidifier.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
wistar_roller_blind.yaml eed1de0f18 Remove border state restrictions on blind control 3 years ago
wistar_roller_blind_nopos.yaml caa118fa82 Add a variant of Wistar blinds with no current_position reporting 3 years ago
woox_r4028_powerstrip.yaml e46fc804f7 Rename entities in accordance with HA guidelines. 3 years ago
zemismart_curtain.yaml fe9fb56632 Add support for zemismart curtains. 3 years ago

README.md

Device Configuration Files

This directory contains device configuration files, describing the workings of supported devices. The files are in YAML format, and describe the mapping of Tuya DPs (Data Points) to HomeAssistant attributes.

Each Tuya device may correspond to one primary entity and any number of secondary entities in Home Assistant.

The Top Level

The top level of the device configuration defines the following:

name

The device should be named descriptively with a name the user would recognize, the brand and model of the device is a good choice. If a whole family of devices is supported, a generalization of the model type can be used. The name should also indicate to the user what type of device it is.

products

Optional, for future use.

A list of products that this config applies to. Each product in the list must have an id specified, which corresponds to the productId or productKey (depending on where you are getting it from) in Tuya info. This is available from the Tuya developer web portal listing for your device, or when using UDP discovery (via tinytuya). In future it is intended that UDP discovery will be used to more precisely match devices to configs, so it is recommended to report these if you can find them when requesting a new device. Each listing can also have an optional name, which is intended to override the top level name when full support for this field is added. Probably other info will be added in future to provide better reporting of device manufacturer and model etc.

primary_entity

This contains the configuration for one Home Assistant entity which is considered the main entity for the device. For example, if the device is a heater, this would be a climate entity.

The configuration for entities is detailed in its own section below.

secondary_entities

Optional.

This contains a list of additional Home Assistant entities providing additional functionality beyond the capabilities of the primary entity. Examples include lighting control for display panels as a Home Assistant light entity, child locks as a Home Assistant lock entity, or additional toggles as Home Assistant switch entities.

The configuration for secondary entities is the same as primary entities, and is detailed in the section below.

Entity configuration

entity

The Home Assistant entity type being configured. Currently supported types are climate, switch, light, lock. Functionality for these entities is limited to that which has been required for the devices until now and may need to be extended for new devices. In particular, the light and lock entities have only been used for simple secondary entities, so only basic functionality is implemented.

class

Optional.

For some entity types, a device class can be set, for example switch entities can have a class of outlet. This may slightly alter the UI behaviour. For most entities, it will alter the default icon, and for binary sensors also the state that off and on values translate to in the UI.

category

Optional.

This specifies the entity category of the entity. Entities can be categorized as config or diagnostic to restrict where they appear automatically in Home Assistant.

dps

This is a list of the definitions for the Tuya DPs associated with attributes of this entity. There should be one list entry for each supported DPs reported by the device.

The configuration of DPs entries is detailed in its own section below.

name

Optional.

The name associated with this entity can be set here. If no name is set, it will inherit the name at the top level. This is mostly useful for overriding the name of secondary entities to give more information about the purpose of the entity, as the generic type with the top level name may not be sufficient to describe the function.

mode

Optional. For number entities, default="auto", for others, None

For number entities, this can be used to force slider or box as the input method. The default auto uses a slider if the range is small enough, or a box otherwise.

DPs configuration

id

Every DP must have a numeric ID matching the DP ID in the Tuya protocol.

type

The type of data returned by the Tuya API. Can be one of the following:

  • string can contain arbitrary text.
  • boolean can contain the values True or False.
  • integer can contain only numbers. Integers can have range set on them, be scaled and steped
  • bitfield is a special case of integer, where the bits that make up the value each has individal meaning.
  • base64 is a special case of string, where binary data is base64 encoded. Platforms that use this type will need special handling to make sense of the data.
  • hex is a special case of string, where binary data is hex encoded. Platforms that use this type will need special handling to make sense of the data.
  • json is a special case of string, where multiple data points are encoded in json format in the string. Platforms that use this type will need special handling to make sense of the data.
  • float can contain floating point numbers. No known devices use this, but it is supported if needed.

name

The name given to the attribute in Home Assistant. Certain names are used by the Home Assistant entities for specific purposes. If a name is not recognized as a standard attribute by the entitiy implementation, the attribute will be returned as a readonly custom attribute on the entity. If you need non-standard attributes to be able to be set, you will need to use a secondary entity for that.

readonly

Optional, default false.

A boolean setting to mark attributes as readonly. If not specified, the default is false. If set to true, the attributes will be reported to Home Assistant, but no functionality for setting them will be exposed.

optional

Optional, default false.

A boolean setting to mark attributes as optional. This allows a device to be matched even if it is not sending the dp at the time when adding a new device. It can also be used to match a range of devices that have variations in the extra attributes that are sent.

mapping

Optional. This can be used to define a list of additional rules that modify the DP to Home Assistant attribute mapping to something other than a one to one copy.

The rules can range from simple value substitution to complex relationships involving other attributes. It can also be used to change the icon of the entity based on the attribute value. Mapping rules are defined in their own section below.

hidden

Optional, default false. This can be used to define DPs that do not directly expose Home Assistant attributes. When set to true, no attribute will be sent. A name should still be specified and the attribute can be referenced as a constraint from mapping rules on other attributes to implement complex mappings.

An example of use is a climate device, where the Tuya device keeps separate temperature settings for different Normal and Eco preset modes. The Normal temperature setting is exposed through the standard temperature Home Assistant attribute on the climate device, but the eco_temperature setting on a different DP is set to hidden. Mapping Rules are used on the temperature attribute to redirect to eco_temperature when preset_mode is set to Eco.

range

Optional, may be required in some contexts, may have defaults in others.

For integer attributes that are not readonly, a range can be set with min and max values that will limit the values that the user can enter in the Home Assistant UI. This can also be set in a mapping or conditions block.

unit

Optional, default="C" for temperature dps on climate devices.

For temperature dps, some devices will use Fahrenhiet. This needs to be indicated back to HomeAssistant by defining unit as "F". For sensor entities, see the HomeAssistant developer documentation for the full list of possible units (C and F are automatically translated to their Unicode equivalents, other units are currently ASCII so can be easily entered directly).

class

Optional.

For sensors, this sets the state class of the sensor (measurement, total or total_increasing)

format

Optional.

For base64 and hex types, this specifies how to decode the binary data (after hex or base64 decoding). This is a container field, the contents of which should be a list consisting of name, bytes and range fields. range is as described above. bytes is the number of bytes for the field, which can be 1, 2, or 4. name is a name for the field, which will have special handling depending on the device type.

Mapping Rules

Mapping rules can change the behavior of attributes beyond simple copying of DP values to attribute values. Rules can be defined without a dps_val to apply to all values, or a list of rules that apply to particular dp values can be defined to change only particular cases. Rules can even depend on the values of other elements.

dps_val

Optional, if not provided, the rule is a default that will apply to all values not covered by their own dps_val rule.

dps_val defines the DP value that each rule in the list applies to. This can be used to map specific values from the Tuya protocol into attribute values that have specific meaning in Home Assistant. For example, climate entities in Home Assistant define modes "off", "heat", "cool", "heat_cool", "auto" and "dry". But in the Tuya protocol, a simple heater just has a boolean off/on switch. It can also be used to change the icon when a specific mode is operational. For example if a heater device has a fan-only mode, you could change the icon to "mdi:fan" instead of "mdi:radiator" when in that mode.

value

Optional.

This can be used to set the attribute value seen by Home Assistant to something different than the DP value from the Tuya protocol. Normally it will be used with dps_val to map from one value to another. It could also be used at top level to override all values, but I can't imagine a useful purpose for that.

scale

Optional, default=1.

This can be used in an integer dp mapping to scale the values. For example some climate devices represent the temperature as an integer in tenths of degrees, and require a scale of 10 to convert them to degrees expected by Home Assistant. The scale can also be the other way, for a fan with speeds 1, 2 and 3 as DP values, this can be converted to a percentage with a scale of 0.03.

###invert

Optional, default=False.

This can be used in an integer dp mapping to invert the range. For example, some cover devices have an opposite idea of which end of the percentage scale open and closed are from what Home Assistant assumes. To use this mapping option, a range must also be specified for the dp.

step

Optional, default=1.

This can be used in an integer dp mapping to make values jump by a specific step. It can also be set in a conditions block so that the steps change only under certain conditions. An example is where a value has a range of 0-100, but only allows settings that are divisible by 10, so a step of 10 would be set.

icon

Optional.

This can be used to override the icon. Most useful with a dps_val which indicates a change from normal operating mode, such as "fan-only", "defrosting", "tank-full" or some error state.

icon_priority

Optional. Default 10. Lower numbers mean higher priorities.

When a number of rules on different attributes define icon changes, you may need to control which have priority over the others. For example, if the device is off, probably it is more important to indicate that than whether it is in fan-only or heat mode. So in the off/on DP, you might give a priority of 1 to the off icon, 3 to the on icon, and in the mode DP you could give a priority of 2 to the fan icon, to make it override the normal on icon, but not the off icon. If you don't specify any priorities, the icons will all get the same priority, so if any overlap exists in the rules, it won't always be predictable which icon will be displayed.

value_redirect

Optional.

When value_redirect is set, the value of the attribute and any attempt to set it will be redirected to the named attribute instead of the current one.

An example of how this can be useful is where a Tuya heater has a dp for the target temperature in normal mode, and a different dp for the target temperature is "eco" mode. Depending on the preset_mode, you need to use one or the other. But Home Assistant just has one temperature attribute for setting target temperature, so the mapping needs to be done before passing to Home Assistant.

value_mirror

Optional.

When value_mirror is set, the value of the attribute will be redirected to the current value of the named attribute. Unlike value_redirect, this does not redirect attempts to set the dp to the redirected dp, but when used in a map, this can make the mapping dynamic.

An example of how this can be useful is where a thermostat can be configured to control either a heating or cooling device, but it is not expected to change this setting during operation. Once set up, the hvac_mode dp can have a mapping that mirrors the value of the configuration dp.

invalid

Optional, default false.

Invalid set to true allows an attribute to temporarily be set read-only in some conditions. Rather than passing requests to set the attribute through to the Tuya protocol, attempts to set it will throw an error while it meets the conditions to be invalid. It does not make sense to set this at mapping level, as it would cause a situation where you can set a value then not be able to unset it. Instead, this should be used with conditions, below, to make the behaviour dependent on another DP, such as disabling fan speed control when the preset is in sleep mode (since sleep mode should force low).

default

Optional, default false.

Default set to true allows an attribute to be set as the default value. This is used by some entities when an argument is not provided to a service call but the attribute is required to be set to function correctly. An example is the siren entity which uses the tone attribute to turn on and off the siren, but when turn_on is called without any argument, it needs to pick a defaulttone to use to turn on the siren.

constraint

Optional, always paired with conditions.

If a rule depends on an attribute other than the current one, then constraint can be used to specify the element that conditions applies to.

conditions

Optional, always paired with constraint.

Conditions defines a list of rules that are applied based on the constraint attribute. The contents are the same as Mapping Rules, but dps_val applies to the attribute specified by constraint. All others act on the current attribute as they would in the mapping. Although conditions are specified within a mapping, they can also contain a mapping of their own to override that mapping. These nested mappings are limited to simple dps_val to value substitutions, as more complex rules would quickly become too complex to manage.

Entity types

Entities have specific mappings of dp names to functions. Any unrecognized dp name is added to the entity as a read-only extra attribute, so can be observed and queried from HA, but if you need to be able to change it, you should split it into its own entity of an appropriate type (number, select, switch for example).

If the type of dp does not match the expected type, a mapping should be provided to convert. Note that "on" and "off" require quotes in yaml, otherwise it they are interpretted as true/false.

Many entity types support a class attribute which may change the UI behaviour, icons etc. See the HA documentation for the entity type to see what is valid (these may expand over time)

binary_sensor

  • sensor (required, boolean) the dp to attach to the sensor.

button

  • button (required, boolean) the dp to attach to the button. Any read value will be ignored, but the dp is expected to be present for device detection unless set to optional. A value of true will be sent for a button press, map this to the desired dps_val if a different value is required.

climate

  • aux_heat (optional, boolean) a dp to control the aux heat switch if the device has one.
  • current_temperature (optional, number) a dp that reports the current temperature.
  • current_humidity (optional, number) a dp that reports the current humidity (%).
  • fan_mode (optional, mapping of strings) a dp to control the fan mode if available. Any value is allowed, but HA has some standard modes: "on", "off", auto, low, medium, high, top, middle, focus, diffuse
  • humidity (optional, number) a dp to control the target humidity if available. (%)
  • hvac_mode (optional, mapping of strings) a dp to control the mode of the device. Possible values are: "off", cool, heat, heat_cool, auto, dry, fan_only
  • hvac_action (optional, string) a dp thar reports the current action of the device. Possible values are: "off", idle, cooling, heating, drying, fan
  • preset_mode (optional, mapping of strings) a dp to control preset modes of the device. Any value is allowed, but HA has some standard presets: none, eco, away, boost, comfort, home, sleep, activity
  • swing_mode (optional, mapping of strings) a dp to control swing modes of the device. Possible values are: "off", vertical, horizontal
  • temperature (optional, number) a dp to set the target temperature of the device. A unit may be specified as part of the attribute if a temperature_unit dp is not available, if not the default unit configured in HA will be used.
  • target_temp_high (optional, number) a dp to set the upper temperature range of the device. This dp should be paired with target_temp_low, and is mutually exclusive with temperature
  • target_temp_low (optional, number) a dp to set the lower temperature range of the device.
  • temperature_unit (optional, string) a dp that specifies the unit the device is configured for. Values should be mapped to "C" or "F" (case sensitive) - often the device will use a boolean or lower case for this
  • min_temperature (optional, number) a dp that specifies the minimum temperature that can be set. Some devices provide this, otherwise a fixed range on the temperature dp can be used.
  • max_temperature (optional, number) a dp that specifies the maximum temperature that can be set.

cover

Either position or open should be specified.

  • position (optional, number 0-100): a dp to control the percentage that the cover is open. 0 means completely close, 100 means completely open.
  • control (optional, mapping of strings): a dp to control the cover. Mainly useful if position cannot be used. Valid values are open, close, stop
  • action (optional, string): a dp that reports the current state of the cover. Special values are opening, closing
  • open (optional, boolean): a dp that reports if the cover is open. Only used if position is not available.

fan

  • switch (optional, boolean): a dp to control the power state of the fan
  • preset_mode (optional, mapping of strings): a dp to control different modes of the fan. Values "off", low, medium, high used to be handled specially by HA as deprecated speed aliases. If these are the only "presets", consider mapping them as speed values instead, as voice assistants will respond to phrases like "turn the fan up/down" for speed.
  • speed (optional, number 0-100): a dp to control the speed of the fan (%). scale and step can be used to convert smaller ranges to percentages, or a mapping for discrete values.
  • oscillate (optional, boolean): a dp to control whether the fan will oscillate or not.
  • direction (optional, string): a dp to control the spin direction of the fan. Valid values are forward, reverse.

humidifier

Humidifer can also cover dehumidifiers (use class to specify which).

  • switch (optional, boolean): a dp to control the power state of the fan
  • mode (optional, mapping of strings): a dp to control preset modes of the device
  • humidity (optional, number): a dp to control the target humidity of the device

light

  • switch (optional, boolean): a dp to control the on/off state of the light
  • brightness (optional, number 0-255): a dp to control the dimmer if available.
  • color_temp (optional, number): a dp to control the color temperature if available. will be mapped so the minimum corresponds to 153 mireds (6500K), and max to 500 (2000K).
  • rgbhsv (optional, hex): a dp to control the color of the light, using encoded RGB and HSV values. The format field names recognized for decoding this field are r, g, b, h, s, v.
  • color_mode (optional, mapping of strings): a dp to control which mode to use if the light supports multiple modes. Special values: white, color_temp, rgbw, hs, xy, rgb, rgbww, others will be treated as effects, Note: only white, color_temp and rgbw are currently supported, others listed above are reserved and may be implemented in future when the need arises. If no color_mode dp is available, a single supported color mode will be calculated based on which of the above dps are available.
  • effect (optional, mapping of strings): a dp to control effects / presets supported by the light. Note: If the light mixes in color modes in the same dp, color_mode should be used instead. If the light contains both a separate dp for effects/scenes/presets and a mix of color_modes and effects (commonly scene and music) in the color_mode dp, then a separate select entity should be used for the dedicated dp to ensure the effects from color_mode are selectable.

lock

  • lock (optional, boolean): a dp to control the lock state: true = locked, false = unlocked
  • unlock_fingerprint (optional, integer): a dp to identify the fingerprint used to unlock the lock.
  • unlock_password (optional, integer): a dp to identify the password used to unlock the lock.
  • unlock_temp_pwd (optional, integer): a dp to identify the temporary password used to unlock the lock.
  • unlock_dynamic_pwd (optional, integer): a dp to identify the dynamic password used to unlock the lock.
  • unlock_card (optional, integer): a dp to identify the card used to unlock the lock.
  • unlock_app (optional, integer): a dp to identify the app used to unlock the lock.
  • request_unlock (optional, integer): a dp to signal that a request has been made to unlock, the value should indicate the time remaining for approval.
  • approve_unlock (optional, boolean): a dp to unlock the lock in response to a request.
  • jammed (optional, boolean): a dp to signal that the lock is jammed.

number

  • value (required, number): a dp to control the number that is set.
  • unit (optional, string): a dp that reports the units returned by the number. This may be useful for devices that switch between C and F, otherwise a fixed unit attribute on the value dp can be used.
  • minimum (optional, number): a dp that reports the minimum the number can be set to. This may be used as an alternative to a range setting on the value dp if the range is dynamic
  • maximum (optional, number): a dp that reports the maximum the number can be set to. This may be used as an alternative to a range setting on the value dp if the range is dynamic

select

  • option (required, mapping of strings): a dp to control the option that is selected.

sensor

  • sensor (required, number or string): a dp that returns the current value of the sensor.
  • unit (optional, string): a dp that returns the unit returned by the sensor. This may be useful for devices that switch between C and F, otherwise a fixed unit attribute on the sensor dp can be used.

switch

  • switch (required, boolean): a dp to control the switch state.
  • current_power_w (optional, number): a dp that returns the current power consumption in watts. This is a legacy attribute, for the HA Energy dashboard it is advisable to also provide a sensor entity linked to the same dp as well.

vacuum

  • status (required, mapping of strings): a dp to report and control the status of the vacuum.
  • command (optional, mapping of strings): a dp to control the statuss of the vacuum. If supplied, the status dp is only used to report the state. Special values: return_to_base, clean_spot, others are sent as general commands
  • locate (optional, boolean): a dp to trigger a locator beep on the vacuum.
  • power (optional, boolean): a dp to switch full system power on and off
  • activate (optional, boolean): a dp to start and pause the vacuum
  • battery (optional, number 0-100): a dp that reports the current battery level (%)
  • direction_control (optional, mapping of strings): a dp that is used for directional commands These are additional commands that are not part of status. They can be sent as general commands from HA.
  • error (optional, bitfield): a dp that reports error status. As this is mapped to a single "fault" state, you could consider separate binary_sensors to report on individual errors

siren

  • tone (required, mapping of strings): a dp to report and control the siren tone. As this is used to turn on and off the siren, it is required. If this does not fit your siren, the underlying implementation will need to be modified. The value "off" will be used for turning off the siren, and will be filtered from the list of available tones.
  • volume (optional, float in range 0.0-1.0): a dp to control the volume of the siren (probably needs a scale and step applied, since Tuya devices will probably use an integer, or strings with fixed values).
  • duration (optional, integer): a dp to control how long the siren will sound for.