Jelajahi Sumber

ci: remove broken device tests

Although the intention was to keep them for reference when migrating
tests to the modern pytest framework, their continued presence is
confusing to contributors who sometimes spend unnecessary effort
to write new device specific tests.

In any case, updated tests will be created in the existing general
test_*.py files to test specific features using Mocks, not by
loading configs and simulating whole device functionality, which
has caused a lot of redundancy in the tests that were implemented
in the past.
Jason Rumney 2 bulan lalu
induk
melakukan
1abf44ffcd
89 mengubah file dengan 0 tambahan dan 13148 penghapusan
  1. 0 1730
      tests/const.py
  2. 0 0
      tests/devices/__init__.py
  3. 0 178
      tests/devices/base_device_tests.py
  4. 0 70
      tests/devices/test_ailrinni_fplock.py
  5. 0 128
      tests/devices/test_anko_fan.py
  6. 0 120
      tests/devices/test_arlec_fan.py
  7. 0 153
      tests/devices/test_arlec_fan_light.py
  8. 0 182
      tests/devices/test_aspen_adv200_fan.py
  9. 0 147
      tests/devices/test_avatto_blinds.py
  10. 0 68
      tests/devices/test_avatto_curtain_switch.py
  11. 0 74
      tests/devices/test_bcom_intercom_camera.py
  12. 0 219
      tests/devices/test_beca_bac002_thermostat.py
  13. 0 163
      tests/devices/test_beca_bhp6000_thermostat.py
  14. 0 207
      tests/devices/test_beok_tr9b_thermostat.py
  15. 0 152
      tests/devices/test_betterlife_bl1500_heater.py
  16. 0 50
      tests/devices/test_ble_smartplant.py
  17. 0 86
      tests/devices/test_ble_water_valve.py
  18. 0 98
      tests/devices/test_blitzwolf_bsh2_humidifier.py
  19. 0 164
      tests/devices/test_digoo_dgsp01_dual_nightlight_switch.py
  20. 0 83
      tests/devices/test_digoo_dgsp202.py
  21. 0 91
      tests/devices/test_duux_blizzard.py
  22. 0 213
      tests/devices/test_eanons_humidifier.py
  23. 0 248
      tests/devices/test_eberg_cooly_c35hd.py
  24. 0 288
      tests/devices/test_eberg_qubo_q40hd_heatpump.py
  25. 0 65
      tests/devices/test_elko_cfmtb_thermostat.py
  26. 0 117
      tests/devices/test_energy_monitoring_powerstrip.py
  27. 0 113
      tests/devices/test_essentials_purifier.py
  28. 0 76
      tests/devices/test_eurom_600_heater.py
  29. 0 76
      tests/devices/test_eurom_600v2_heater.py
  30. 0 116
      tests/devices/test_eurom_601_heater.py
  31. 0 85
      tests/devices/test_garage_door_opener.py
  32. 0 148
      tests/devices/test_goldair_fan.py
  33. 0 102
      tests/devices/test_goldair_geco_heater.py
  34. 0 319
      tests/devices/test_goldair_gpph_heater.py
  35. 0 136
      tests/devices/test_goldair_portable_airconditioner.py
  36. 0 159
      tests/devices/test_grid_connect_double_power_point.py
  37. 0 65
      tests/devices/test_gx_aroma_diffuser.py
  38. 0 104
      tests/devices/test_himox_h05_purifier.py
  39. 0 119
      tests/devices/test_himox_h06_purifier.py
  40. 0 182
      tests/devices/test_hydrotherm_dynamicx8.py
  41. 0 119
      tests/devices/test_immax_neo_light_vento.py
  42. 0 222
      tests/devices/test_inkbird_itc308_thermostat.py
  43. 0 176
      tests/devices/test_inkbird_sousvide.py
  44. 0 44
      tests/devices/test_ir_remote_sensors.py
  45. 0 108
      tests/devices/test_kogan_garage_door_opener.py
  46. 0 125
      tests/devices/test_kogan_glass_1_7l_kettle.py
  47. 0 139
      tests/devices/test_kogan_kawfpac09ya_airconditioner.py
  48. 0 300
      tests/devices/test_kyvol_e30_vacuum.py
  49. 0 44
      tests/devices/test_ledvance_light.py
  50. 0 236
      tests/devices/test_lefant_m213_vacuum.py
  51. 0 162
      tests/devices/test_lexy_f501_fan.py
  52. 0 64
      tests/devices/test_logicom_powerstrip.py
  53. 0 141
      tests/devices/test_m027_curtain.py
  54. 0 117
      tests/devices/test_moebot.py
  55. 0 106
      tests/devices/test_moes_bht002_thermostat.py
  56. 0 214
      tests/devices/test_moes_rgb_socket.py
  57. 0 151
      tests/devices/test_motion_sensor_light.py
  58. 0 53
      tests/devices/test_mustool_mt15mt29_airbox.py
  59. 0 150
      tests/devices/test_nashone_mts700wb_thermostat.py
  60. 0 127
      tests/devices/test_nedis_htpl20f_heater.py
  61. 0 182
      tests/devices/test_orion_outdoor_siren.py
  62. 0 146
      tests/devices/test_orion_smartlock.py
  63. 0 184
      tests/devices/test_parkside_plgs2012a1_smart_charger.py
  64. 0 140
      tests/devices/test_poiema_one_purifier.py
  65. 0 112
      tests/devices/test_poolex_qline_heatpump.py
  66. 0 110
      tests/devices/test_qoto_03_sprinkler.py
  67. 0 115
      tests/devices/test_qs_c01_curtain.py
  68. 0 143
      tests/devices/test_renpho_rp_ap001s.py
  69. 0 192
      tests/devices/test_rgbcw_lightbulb.py
  70. 0 167
      tests/devices/test_sd123_hpr01_presence.py
  71. 0 106
      tests/devices/test_simple_blinds.py
  72. 0 22
      tests/devices/test_simple_switch_with_timer.py
  73. 0 36
      tests/devices/test_simple_switch_with_timerv2.py
  74. 0 24
      tests/devices/test_smartplug_encoded.py
  75. 0 75
      tests/devices/test_smartplugv2.py
  76. 0 190
      tests/devices/test_smartplugv2_energy.py
  77. 0 163
      tests/devices/test_starlight_heatpump.py
  78. 0 154
      tests/devices/test_stirling_fs140dc_fan.py
  79. 0 183
      tests/devices/test_thermex_if50v.py
  80. 0 49
      tests/devices/test_tmwf02_fan.py
  81. 0 88
      tests/devices/test_tompd63lw_breaker.py
  82. 0 46
      tests/devices/test_treatlife_ds02f.py
  83. 0 146
      tests/devices/test_vork_vk6067aw_purifier.py
  84. 0 122
      tests/devices/test_weau_pool_heatpumpv2.py
  85. 0 134
      tests/devices/test_wetair_wawh1210lw_humidifier.py
  86. 0 221
      tests/devices/test_wetair_wch750_heater.py
  87. 0 56
      tests/devices/test_woox_r4028_powerstrip.py
  88. 0 62
      tests/devices/test_zemismart_am25_blind.py
  89. 0 88
      tests/devices/test_zx_g30_alarm.py

+ 0 - 1730
tests/const.py

@@ -12,1735 +12,5 @@ GPPH_HEATER_PAYLOAD = {
     "105": "auto",
     "106": 20,
 }
-
-GPCV_HEATER_PAYLOAD = {
-    "1": True,
-    "2": True,
-    "3": 30,
-    "4": 25,
-    "5": 0,
-    "6": 0,
-    "7": "Low",
-}
-
 EUROM_600_HEATER_PAYLOAD = {"1": True, "2": 15, "5": 18, "6": 0}
-EUROM_600v2_HEATER_PAYLOAD = {"1": True, "2": 15, "5": 18, "7": 0}
-
-EUROM_601_HEATER_PAYLOAD = {"1": True, "2": 21, "3": 20, "6": False, "13": 0}
-
-EUROM_WALLDESIGNHEAT2000_HEATER_PAYLOAD = {
-    "1": True,
-    "2": 21,
-    "3": 19,
-    "4": "off",
-    "7": False,
-}
-
-EUROM_SANIWALLHEAT2000_HEATER_PAYLOAD = {
-    "1": True,
-    "2": 21,
-    "3": 19,
-    "4": "off",
-    "7": False,
-}
-
-GECO_HEATER_PAYLOAD = {"1": True, "2": True, "3": 30, "4": 25, "5": 0, "6": 0}
-
-JJPRO_JPD01_PAYLOAD = {
-    "1": True,
-    "2": "0",
-    "4": 50,
-    "5": True,
-    "6": "1",
-    "11": 0,
-    "12": 0,
-    "101": False,
-    "102": False,
-    "103": 20,
-    "104": 62,
-    "105": False,
-}
-
 KOGAN_HEATER_PAYLOAD = {"2": 30, "3": 25, "4": "Low", "6": True, "7": True, "8": 0}
-
-KOGAN_KAWFHTP_HEATER_PAYLOAD = {
-    "1": True,
-    "2": True,
-    "3": 30,
-    "4": 25,
-    "5": 0,
-    "7": "Low",
-}
-
-KOGAN_KASHMFP20BA_HEATER_PAYLOAD = {
-    "1": True,
-    "2": "high",
-    "3": 27,
-    "4": 26,
-    "5": "orange",
-    "6": "white",
-}
-
-DEHUMIDIFIER_PAYLOAD = {
-    "1": False,
-    "2": "0",
-    "4": 30,
-    "5": False,
-    "6": "1",
-    "7": False,
-    "11": 0,
-    "12": "0",
-    "101": False,
-    "102": False,
-    "103": 20,
-    "104": 78,
-    "105": False,
-}
-
-FAN_PAYLOAD = {"1": False, "2": "12", "3": "normal", "8": True, "11": "0", "101": False}
-
-KOGAN_SOCKET_PAYLOAD = {
-    "1": True,
-    "2": 0,
-    "4": 200,
-    "5": 460,
-    "6": 2300,
-}
-
-KOGAN_SOCKET_PAYLOAD2 = {
-    "1": True,
-    "9": 0,
-    "18": 200,
-    "19": 460,
-    "20": 2300,
-}
-
-SMARTSWITCH_ENERGY_PAYLOAD = {
-    "1": True,
-    "9": 0,
-    "17": 100,
-    "18": 2368,
-    "19": 4866,
-    "20": 2148,
-    "21": 1,
-    "22": 628,
-    "23": 30636,
-    "24": 17426,
-    "25": 2400,
-    "26": 0,
-    "38": "memory",
-    "41": "",
-    "42": "",
-    "46": False,
-}
-
-KOGAN_SOCKET_CLEAR_PAYLOAD = {
-    "2": None,
-    "4": None,
-    "5": None,
-    "6": None,
-    "9": None,
-    "18": None,
-    "19": None,
-    "20": None,
-}
-
-GSH_HEATER_PAYLOAD = {
-    "1": True,
-    "2": 22,
-    "3": 24,
-    "4": "low",
-    "12": 0,
-}
-
-GARDENPAC_HEATPUMP_PAYLOAD = {
-    "1": True,
-    "102": 28,
-    "103": True,
-    "104": 100,
-    "105": "warm",
-    "106": 30,
-    "107": 18,
-    "108": 45,
-    "115": 0,
-    "116": 0,
-    "117": True,
-}
-
-IPS_HEATPUMP_PAYLOAD = {
-    "1": True,
-    "2": "silence",
-    "102": 10,
-    "103": True,
-    "104": 100,
-    "105": "warm",
-    "106": 30,
-    "107": 18,
-    "108": 40,
-    "115": 0,
-    "116": 0,
-}
-
-MADIMACK_HEATPUMP_PAYLOAD = {
-    "1": True,
-    "102": 9,
-    "103": True,
-    "104": 0,
-    "105": "warm",
-    "106": 30,
-    "107": 18,
-    "108": 45,
-    "115": 4,
-    "116": 0,
-    "117": True,
-    "118": False,
-    "120": 8,
-    "122": 11,
-    "124": 9,
-    "125": 0,
-    "126": 0,
-    "127": 17,
-    "128": 480,
-    "129": 0,
-    "130": False,
-    "134": False,
-    "135": False,
-    "136": False,
-    "139": False,
-    "140": "LowSpeed",
-}
-
-MADIMACK_ELITEV3_HEATPUMP_PAYLOAD = {
-    "1": True,
-    "2": "heating",
-    "4": 28,
-    "5": "power",
-    "6": "c",
-    "15": 0,
-    "20": 50,
-    "21": 40,
-    "22": 18,
-    "23": 45,
-    "24": 40,
-    "25": 33,
-    "26": 18,
-    "101": 0,
-    "102": 21,
-    "103": 23,
-    "104": 18,
-    "105": 18,
-    "106": 480,
-    "107": False,
-}
-
-PURLINE_M100_HEATER_PAYLOAD = {
-    "1": True,
-    "2": 23,
-    "3": 23,
-    "5": "off",
-    "10": True,
-    "11": 0,
-    "12": 0,
-    "101": False,
-    "102": False,
-}
-
-REMORA_HEATPUMP_PAYLOAD = {"1": True, "2": 30, "3": 28, "4": "heat", "9": 0}
-BWT_HEATPUMP_PAYLOAD = {"1": True, "2": 30, "3": 28, "4": "auto", "9": 0}
-
-EANONS_HUMIDIFIER_PAYLOAD = {
-    "2": "middle",
-    "3": "cancel",
-    "4": 0,
-    "9": 0,
-    "10": True,
-    "12": "humidity",
-    "15": 65,
-    "16": 65,
-    "22": True,
-}
-
-INKBIRD_ITC306A_THERMOSTAT_PAYLOAD = {
-    "12": 0,
-    "101": "C",
-    "102": 0,
-    "103": "on",
-    "104": 257,
-    "106": 252,
-    "108": 6,
-    "109": 1000,
-    "110": 0,
-    "111": False,
-    "112": False,
-    "113": False,
-    "114": 260,
-    "115": True,
-    "116": 783,
-    "117": False,
-    "118": False,
-    "119": False,
-    "120": False,
-}
-
-INKBIRD_ITC308_THERMOSTAT_PAYLOAD = {
-    "12": 0,
-    "101": "C",
-    "102": 0,
-    "104": 136,
-    "106": 15,
-    "108": 3,
-    "109": 370,
-    "110": 10,
-    "111": False,
-    "112": False,
-    "113": False,
-    "115": "1",
-    "116": 565,
-    "117": 10,
-    "118": 5,
-}
-
-ANKO_FAN_PAYLOAD = {
-    "1": True,
-    "2": "normal",
-    "3": "1",
-    "4": "off",
-    "6": "0",
-}
-
-DETA_FAN_PAYLOAD = {
-    "1": True,
-    "3": "1",
-    "9": False,
-    "101": True,
-    "102": "0",
-    "103": "0",
-}
-
-ELECTRIQ_DEHUMIDIFIER_PAYLOAD = {
-    "1": True,
-    "2": "auto",
-    "3": 60,
-    "4": 45,
-    "7": False,
-    "10": False,
-    "102": "90",
-    "103": 20,
-    "104": False,
-}
-
-ELECTRIQ_CD20PRO_DEHUMIDIFIER_PAYLOAD = {
-    "1": True,
-    "2": "high",
-    "3": 39,
-    "4": 45,
-    "5": False,
-    "10": False,
-    "101": False,
-    "102": "0_90",
-    "103": 30,
-}
-
-ELECTRIQ_CD12PW_DEHUMIDIFIER_PAYLOAD = {
-    "1": True,
-    "2": "high",
-    "3": 39,
-    "4": 45,
-    "101": False,
-    "103": 30,
-}
-
-ELECTRIQ_CD12PWV2_DEHUMIDIFIER_PAYLOAD = {
-    "1": True,
-    "2": 45,
-    "5": "Smart",
-    "6": 39,
-    "19": 0,
-    "101": True,
-    "104": False,
-}
-
-ELECTRIQ_DESD9LW_DEHUMIDIFIER_PAYLOAD = {
-    "1": True,
-    "2": 50,
-    "4": "Low",
-    "5": "Dehumidity",
-    "6": 55,
-    "7": 18,
-    "10": False,
-    "12": False,
-    "15": False,
-    "101": 20,
-}
-
-POOLEX_SILVERLINE_HEATPUMP_PAYLOAD = {"1": True, "2": 30, "3": 28, "4": "Heat", "13": 0}
-POOLEX_VERTIGO_HEATPUMP_PAYLOAD = {"1": True, "2": 30, "3": 28, "4": "heat", "9": 0}
-POOLEX_QLINE_HEATPUMP_PAYLOAD = {"1": True, "2": "heating", "4": 30, "15": 0, "16": 28}
-
-ELECTRIQ_12WMINV_HEATPUMP_PAYLOAD = {
-    "1": True,
-    "2": 20,
-    "3": 18,
-    "4": "auto",
-    "5": "1",
-    "8": False,
-    "12": False,
-    "101": True,
-    "102": False,
-    "103": False,
-    "104": True,
-    "106": False,
-    "107": False,
-    "108": 0,
-    "109": 0,
-    "110": 0,
-}
-
-KOGAN_DEHUMIDIFIER_PAYLOAD = {
-    "1": True,
-    "2": "low",
-    "3": 70,
-    "8": False,
-    "11": 0,
-    "12": 0,
-    "13": 0,
-    "101": 50,
-}
-
-HELLNAR_HEATPUMP_PAYLOAD = {
-    "1": False,
-    "2": 260,
-    "3": 26,
-    "4": "cold",
-    "5": "low",
-    "18": 0,
-    "20": 0,
-    "105": "off",
-    "110": 131644,
-    "113": "0",
-    "114": "0",
-    "119": "0",
-    "120": "off",
-    "123": "0010",
-    "126": "0",
-    "127": "0",
-    "128": "0",
-    "129": "1",
-    "130": 26,
-    "131": False,
-    "132": False,
-    "133": "0",
-    "134": '{"t":1624086077,"s":false,"clr"true}',
-}
-
-TADIRAN_HEATPUMP_PAYLOAD = {
-    "1": True,
-    "2": 25,
-    "3": 250,
-    "4": "cooling",
-    "5": "low",
-    "101": 0,
-    "102": 260,
-    "103": 225,
-    "104": "low",
-    "105": "stop",
-    "106": -300,
-    "107": False,
-    "108": False,
-}
-
-BECA_BHP6000_PAYLOAD = {
-    "1": True,
-    "2": 77,
-    "3": 87,
-    "4": "3",
-    "5": "3",
-    "6": False,
-    "7": False,
-}
-
-BECA_BHT6000_PAYLOAD = {
-    "1": False,
-    "2": 40,
-    "3": 42,
-    "4": "0",
-    "5": False,
-    "6": False,
-    "102": 0,
-    "103": "1",
-    "104": True,
-}
-
-BECA_BHT002_PAYLOAD = {
-    "1": False,
-    "2": 40,
-    "3": 42,
-    "4": "0",
-    "5": False,
-    "6": False,
-    "102": 0,
-    "104": True,
-}
-
-MOES_BHT002_PAYLOAD = {
-    "1": False,
-    "2": 40,
-    "3": 42,
-    "4": "0",
-    "5": False,
-    "6": False,
-    "104": True,
-}
-
-BEOK_TR9B_PAYLOAD = {
-    "1": True,
-    "2": "manual",
-    "10": True,
-    "16": 590,
-    "19": 990,
-    "23": "f",
-    "24": 666,
-    "26": 410,
-    "31": "5_2",
-    "36": "close",
-    "40": False,
-    "45": 0,
-    "101": 1313,
-    "102": 10,
-}
-
-BECA_BAC002_PAYLOAD = {
-    "1": True,
-    "2": 39,
-    "3": 45,
-    "4": "1",
-    "5": False,
-    "6": False,
-    "102": "1",
-    "103": "2",
-}
-
-LEXY_F501_PAYLOAD = {
-    "1": True,
-    "2": "forestwindhigh",
-    "4": "off",
-    "6": 0,
-    "9": False,
-    "16": False,
-    "17": False,
-    "102": 8,
-}
-
-TH213_THERMOSTAT_PAYLOAD = {
-    "1": True,
-    "2": 18,
-    "3": 20,
-    "4": 1,
-    "6": False,
-    "12": 0,
-    "101": 16,
-    "102": 2,
-    "103": 0,
-    "104": 2,
-    "105": True,
-    "107": False,
-    "108": False,
-    "110": 0,
-}
-
-TH213V2_THERMOSTAT_PAYLOAD = {
-    "1": True,
-    "2": 16,
-    "3": 21,
-    "4": "3",
-    "6": False,
-    "12": 0,
-    "101": 23,
-    "102": "2",
-    "103": 1,
-    "104": 1,
-    "105": False,
-    "116": "1",
-}
-
-WETAIR_WCH750_HEATER_PAYLOAD = {
-    "1": False,
-    "2": 17,
-    "4": "mod_free",
-    "11": "heating",
-    "19": "0h",
-    "20": 0,
-    "21": 0,
-    "101": "level1",
-}
-
-WETAIR_WAWH1210_HUMIDIFIER_PAYLOAD = {
-    "1": True,
-    "5": True,
-    "8": True,
-    "13": 50,
-    "14": 57,
-    "22": 0,
-    "24": "AUTO",
-    "25": True,
-    "29": False,
-    "101": "Have_water",
-}
-
-SASWELL_T29UTK_THERMOSTAT_PAYLOAD = {
-    "1": True,
-    "2": 240,
-    "3": 241,
-    "4": "cold",
-    "5": "auto",
-    "19": "C",
-    "101": False,
-    "102": False,
-    "103": "cold",
-    "112": "3",
-    "113": 0,
-    "114": 24,
-    "115": 24,
-    "116": 75,
-    "117": 81,
-}
-
-SASWELL_C16_THERMOSTAT_PAYLOAD = {
-    "2": 220,
-    "3": "Smart",
-    "4": 0,
-    "5": 217,
-    "6": 350,
-    "7": False,
-    "8": 241,
-    "9": False,
-    "10": True,
-    "11": False,
-    "12": "7",
-    "14": "0",
-    "15": 0,
-    "17": 0,
-    "21": False,
-    "22": 1500,
-    "23": 12,
-    "24": "Standby",
-    "26": 50,
-}
-
-KOGAN_GLASS_1_7L_KETTLE_PAYLOAD = {
-    "1": False,
-    "5": 99,
-    #    "102": "90",
-}
-
-RENPHO_PURIFIER_PAYLOAD = {
-    "1": True,
-    "4": "low",
-    "7": False,
-    "8": False,
-    "19": "0",
-    "22": "0",
-    "101": False,
-    "102": 0,
-    "103": 0,
-    "104": 0,
-    "105": 0,
-}
-
-ARLEC_FAN_PAYLOAD = {
-    "1": True,
-    "3": 1,
-    "4": "forward",
-    "102": "normal",
-    "103": "off",
-}
-
-ARLEC_FAN_LIGHT_PAYLOAD = {
-    "1": True,
-    "3": "6",
-    "4": "forward",
-    "9": False,
-    "10": 100,
-    "11": 100,
-    "102": "normal",
-    "103": "off",
-}
-
-CARSON_CB_PAYLOAD = {
-    "1": True,
-    "2": 20,
-    "3": 23,
-    "4": "COOL",
-    "5": 1,
-    "19": "C",
-    "102": False,
-    "103": 0,
-    "104": False,
-    "105": 0,
-    "106": 0,
-    "110": 0,
-}
-
-KOGAN_KAWFPAC09YA_AIRCON_PAYLOAD = {
-    "1": True,
-    "2": 19,
-    "3": 18,
-    "4": "COOL",
-    "5": "1",
-    "19": "C",
-    "105": 0,
-    "106": 0,
-    "107": False,
-}
-
-GRIDCONNECT_2SOCKET_PAYLOAD = {
-    "1": True,
-    "2": True,
-    "9": 0,
-    "10": 0,
-    "17": 0,
-    "18": 500,
-    "19": 1200,
-    "20": 240,
-    "21": 0,
-    "22": 0,
-    "23": 0,
-    "24": 0,
-    "25": 0,
-    "38": "0",
-    "40": False,
-    "101": True,
-}
-
-EBERG_QUBO_Q40HD_PAYLOAD = {
-    "1": True,
-    "2": 22,
-    "3": 20,
-    "4": "hot",
-    "5": "middle",
-    "19": "c",
-    "22": 0,
-    "25": False,
-    "30": False,
-    "101": "heat_s",
-}
-
-EBERG_COOLY_C35HD_PAYLOAD = {
-    "1": True,
-    "4": 0,
-    "5": "4",
-    "6": 25,
-    "8": "1",
-    "10": False,
-    "13": 0,
-    "14": 0,
-    "15": 0,
-    "16": False,
-    "17": False,
-    "18": 78,
-    "19": False,
-}
-
-STIRLING_FS1_FAN_PAYLOAD = {
-    "1": True,
-    "2": "normal",
-    "3": 9,
-    "5": False,
-    "22": "cancel",
-}
-
-QOTO_SPRINKLER_PAYLOAD = {
-    "102": 100,
-    "103": 100,
-    "104": 10036,
-    "105": 10800,
-    "108": 0,
-}
-
-MINCO_MH1823D_THERMOSTAT_PAYLOAD = {
-    "1": True,
-    "2": "program",
-    "3": "stop",
-    "5": False,
-    "9": True,
-    "12": False,
-    "18": "out",
-    "19": "c",
-    "22": 18,
-    "23": 64,
-    "32": 1,
-    "33": 205,
-    "35": 0,
-    "37": 689,
-    "39": "7",
-    "45": 0,
-    "101": 200,
-    "102": 680,
-    "103": 0,
-    "104": 2,
-    "105": "no_power",
-    "106": 35,
-    "107": 95,
-}
-
-SIMPLE_GARAGE_DOOR_PAYLOAD = {
-    "1": True,
-    "101": False,
-}
-
-NEDIS_HTPL20F_PAYLOAD = {
-    "1": True,
-    "2": 25,
-    "3": 25,
-    "4": "1",
-    "7": False,
-    "11": "0",
-    "13": 0,
-    "101": False,
-}
-
-ASPEN_ASP200_FAN_PAYLOAD = {
-    "1": True,
-    "2": "in",
-    "3": 1,
-    "8": 0,
-    "18": 20,
-    "19": 25,
-    "101": True,
-    "102": 3,
-}
-
-TMWF02_FAN_PAYLOAD = {
-    "1": True,
-    "2": 0,
-    "3": "level_2",
-    "4": 40,
-}
-
-TIMED_SOCKET_PAYLOAD = {
-    "1": True,
-    "11": 0,
-}
-
-TIMED_SOCKETV2_PAYLOAD = {
-    "1": True,
-    "9": 0,
-}
-
-DIGOO_DGSP202_SOCKET_PAYLOAD = {
-    "1": True,
-    "2": True,
-    "9": 0,
-    "10": 0,
-    "18": 500,
-    "19": 1200,
-    "20": 240,
-}
-
-DIGOO_DGSP01_SOCKET_PAYLOAD = {
-    "1": True,
-    "27": True,
-    "28": "colour",
-    "29": 76,
-    "31": "1c0d00001b640b",
-    "32": "3855b40168ffff",
-    "33": "ffff500100ff00",
-    "34": "ffff8003ff000000ff000000ff000000000000000000",
-    "35": "ffff5001ff0000",
-    "36": "ffff0505ff000000ff00ffff00ff00ff0000ff000000",
-}
-
-WOOX_R4028_SOCKET_PAYLOAD = {
-    "1": True,
-    "2": True,
-    "3": True,
-    "7": True,
-    "101": 0,
-    "102": 0,
-    "103": 0,
-    "105": 0,
-}
-
-OWON_PCT513_THERMOSTAT_PAYLOAD = {
-    "2": "cool",
-    "16": 2150,
-    "17": 71,
-    "23": "c",
-    "24": 2950,
-    "29": 85,
-    "34": 52,
-    "45": 0,
-    "107": "0",
-    "108": 2150,
-    "109": 1650,
-    "110": 71,
-    "111": 62,
-    "115": "auto",
-    "116": "1",
-    "119": True,
-    "120": "permhold",
-    "123": 25,
-    "129": "coolfanon",
-}
-
-HYSEN_HY08WE2_THERMOSTAT_PAYLOAD = {
-    "1": True,
-    "2": 50,
-    "3": 170,
-    "4": "Manual",
-    "6": False,
-    "12": 0,
-    "101": False,
-    "102": False,
-    "103": 170,
-    "104": 4,
-    "105": 15,
-    "106": True,
-    "107": True,
-    "108": True,
-    "109": -10,
-    "110": 10,
-    "111": 2,
-    "112": 35,
-    "113": 5,
-    "114": 30,
-    "115": 5,
-    "116": "all",
-    "117": "keep",
-    "118": "2days",
-}
-
-POIEMA_ONE_PURIFIER_PAYLOAD = {
-    "1": True,
-    "2": 12,
-    "3": "manual",
-    "4": "mid",
-    "7": False,
-    "11": False,
-    "18": "cancel",
-    "19": 0,
-}
-
-ECOSTRAD_IQCERAMIC_RADIATOR_PAYLOAD = {
-    "1": True,
-    "2": "hot",
-    "16": 180,
-    "24": 90,
-    "27": 0,
-    "40": False,
-    "104": "15",
-    "107": "1",
-    "108": "0",
-    "109": "0",
-}
-
-NASHONE_MTS700WB_THERMOSTAT_PAYLOAD = {
-    "1": True,
-    "2": "hot",
-    "3": "manual",
-    "16": 20,
-    "17": 68,
-    "23": "c",
-    "24": 19,
-    "27": 0,
-    "29": 66,
-    "39": False,
-    "41": "cancel",
-    "42": 0,
-}
-
-LEFANT_M213_VACUUM_PAYLOAD = {
-    "1": True,
-    "2": False,
-    "3": "standby",
-    "4": "forward",
-    "5": "0",
-    "6": 91,
-    "13": False,
-    "16": 0,
-    "17": 0,
-    "18": 0,
-    "101": "nar",
-    "102": -23,
-    "103": 27,
-    "104": 0,
-    #   "106": "ChargeStage:DETSWITCGH",
-    #    "108": "BatVol:13159",
-}
-
-KYVOL_E30_VACUUM_PAYLOAD = {
-    "1": True,
-    "2": False,
-    "3": "standby",
-    "4": "stop",
-    "5": "Charging_Base",
-    "6": 2,
-    "7": 20,
-    "8": 60,
-    "9": 20,
-    "10": False,
-    "11": False,
-    "12": False,
-    "13": False,
-    "14": "3",
-    "16": 0,
-    "17": 0,
-    "18": 0,
-    "101": "2",
-    "102": "900234",
-    "104": "standby",
-    "107": 1,
-}
-
-HIMOX_H06_PURIFIER_PAYLOAD = {
-    "1": True,
-    "4": "low",
-    "5": 50,
-    "8": True,
-    "11": False,
-    "18": "cancel",
-    "19": 0,
-    "22": "medium",
-    "101": "calcle",
-}
-
-HIMOX_H05_PURIFIER_PAYLOAD = {
-    "1": True,
-    "2": 21,
-    "4": "auto",
-    "5": 92,
-    "7": False,
-    "11": False,
-    "18": "cancel",
-    "21": "good",
-}
-
-VORK_VK6067_PURIFIER_PAYLOAD = {
-    "1": True,
-    "4": "auto",
-    "5": 80,
-    "8": True,
-    "11": False,
-    "18": "cancel",
-    "19": 0,
-    "21": "good",
-    "22": 0,
-}
-
-KOGAN_GARAGE_DOOR_PAYLOAD = {
-    "101": "fopen",
-    "102": "opening",
-    "104": 100,
-    "105": True,
-}
-
-MOES_RGB_SOCKET_PAYLOAD = {
-    "1": True,
-    "2": "colour",
-    "3": 255,
-    "4": 14,
-    "5": "ff99000024ffff",
-    "6": "bd76000168ffff",
-    "7": "ffff320100ff00",
-    "8": "ffff3203ff000000ff000000ff",
-    "9": "ffff3201ff0000",
-    "10": "ffff3205ff000000ff00ffff00ff00ff0000ff",
-    "101": True,
-    "102": 0,
-    "104": 0,
-    "105": 0,
-    "106": 2332,
-}
-
-LOGICOM_STRIPPY_PAYLOAD = {
-    "1": False,
-    "2": False,
-    "3": False,
-    "4": False,
-    "5": False,
-    "9": 0,
-    "10": 0,
-    "11": 0,
-    "12": 0,
-    "13": 0,
-}
-
-PARKSIDE_PLGS2012A1_PAYLOAD = {
-    "1": True,
-    "2": "test",
-    "3": 1000,
-    "4": 1320,
-    "5": 80,
-    "6": 25,
-    "7": "standard",
-    "8": False,
-    "9": True,
-    "10": 5,
-    "11": 0,
-    "101": 2500,
-    "102": 11,
-    "103": False,
-    "104": False,
-}
-
-SD123_PRESENCE_PAYLOAD = {
-    "1": "none",
-    "101": "0_meters",
-    "102": "6_meters",
-    "103": "case_0",
-    "104": "case_1",
-    "105": "not_reset",
-    "106": "normal",
-    "107": 1200,
-    "108": 1000,
-    "109": 1,
-    "110": 1,
-    "111": 10,
-    "112": 2,
-    "113": 0,
-    "114": True,
-}
-
-SIMPLE_BLINDS_PAYLOAD = {
-    "1": "stop",
-    "2": 0,
-    "5": False,
-    "7": "opening",
-}
-
-STARLIGHT_HEATPUMP_PAYLOAD = {
-    "1": True,
-    "2": 260,
-    "3": 22,
-    "4": "hot",
-    "5": "auto",
-    "18": 0,
-    "20": 0,
-    "105": "off",
-    "110": 131644,
-    "113": "0",
-    "114": "0",
-    "119": "0",
-    "120": "off",
-    "123": "0018",
-    "126": "0",
-    "127": "0",
-    "128": "0",
-    "129": "1",
-    "130": 26,
-    "131": False,
-    "132": False,
-    "133": "0",
-    "134": '{"t":8601,"s":false,"clr":true}',
-}
-
-WILFA_HAZE_HUMIDIFIER_PAYLOAD = {
-    "1": True,
-    "5": False,
-    "8": False,
-    "10": 20,
-    "13": 70,
-    "14": 55,
-    "16": False,
-    "18": "c",
-    "19": "cancel",
-    "20": 0,
-    "22": 0,
-    "23": "level_3",
-    "24": "humidity",
-    "26": False,
-    "35": False,
-}
-
-WEAU_POOL_HEATPUMP_PAYLOAD = {
-    "1": True,
-    "2": 33,
-    "3": 195,
-    "4": "auto",
-    "6": 0,
-}
-
-WEAU_POOL_HEATPUMPV2_PAYLOAD = {
-    "1": True,
-    "2": "eheat",
-    "9": 15,
-    "10": 260,
-    "20": 0,
-    "101": 0,
-    "102": 40,
-    "103": 15,
-    "104": True,
-}
-
-SMARTPLUG_ENCODED_PAYLOAD = {
-    "1": True,
-    "11": 0,
-    "101": "QVA=",
-    "102": "QVA=",
-    "103": "QVA=",
-}
-
-DEVOLA_PATIO_HEATER_PAYLOAD = {
-    "1": True,
-    "2": 20,
-    "3": 15,
-    "4": "smart",
-    "5": "4",
-    "6": False,
-    "7": False,
-    "12": 0,
-    "14": "heating",
-    "19": "c",
-    "20": 68,
-    "21": 59,
-}
-
-QS_C01_CURTAIN_PAYLOAD = {
-    "1": "stop",
-    "2": 0,
-    "8": "forward",
-    "10": 20,
-}
-
-M027_CURTAIN_PAYLOAD = {
-    "1": "close",
-    "2": 0,
-    "4": "morning",
-    "7": "closing",
-    "10": 0,
-    "12": 0,
-    "101": False,
-}
-
-JIAHONG_ET72W_PAYLOAD = {
-    "101": True,
-    "102": 220,
-    "103": "Manual",
-    "104": 0,
-    "105": 205,
-    "106": 240,
-    "107": False,
-    "108": False,
-    "109": False,
-    "110": 2,
-    "111": "0",
-    "112": 0,
-    "113": 0,
-    "116": 500,
-    "117": 1234,
-    "118": True,
-    "121": 300,
-}
-
-BETTERLIFE_BL1500_PAYLOAD = {
-    "1": True,
-    "2": 20,
-    "4": "0",
-    "7": False,
-    "11": "0",
-    "12": 0,
-}
-
-EESEE_ADAM_PAYLOAD = {
-    "1": True,
-    "2": 50,
-    "4": "manual",
-    "5": "low",
-    "14": False,
-    "16": 72,
-    "17": "cancel",
-    "19": 0,
-}
-
-ALECOAIR_D14_PAYLOAD = {
-    "1": True,
-    "2": 50,
-    "4": "manual",
-    "5": "low",
-    "10": False,
-    "14": False,
-    "16": 72,
-    "17": "cancel",
-    "19": 0,
-}
-
-HYUNDAI_SAHARA_PAYLOAD = {
-    "1": True,
-    "2": 50,
-    "4": "high",
-    "6": 73,
-    "7": 25,
-    "14": False,
-    "16": False,
-    "19": 0,
-}
-
-RGBCW_LIGHTBULB_PAYLOAD = {
-    "20": True,
-    "21": "white",
-    "22": 1000,
-    "23": 500,
-    "24": "0000000003e8",
-    "25": "000e0d0000000000000000c80000",
-    "26": 0,
-}
-
-MOES_TEMP_HUMID_PAYLOAD = {
-    "1": True,
-    "2": False,
-    "3": True,
-    "4": "manual",
-    "6": 374,
-    "8": False,
-    "9": 0,
-    "11": False,
-    "12": 0,
-    "18": 0,
-    "20": 0,
-    "21": 0,
-    "22": 0,
-    "24": "",
-    "101": "",
-    "102": "",
-    "103": 0,
-    "104": 0,
-    "105": "off",
-    "106": "mix",
-}
-
-ORION_SMARTLOCK_PAYLOAD = {
-    "1": 0,
-    "2": 0,
-    "3": 0,
-    "4": 0,
-    "5": 0,
-    "8": 0,
-    "9": 0,
-    "10": False,
-    "12": 100,
-    "15": 0,
-    "16": False,
-}
-
-ELECTRIQ_AIRFLEX15W_PAYLOAD = {
-    "1": True,
-    "2": 16,
-    "3": 27,
-    "17": 90,
-    "20": 0,
-    "101": "1",
-    "103": False,
-    "104": "1",
-    "105": 0,
-    "106": False,
-    "109": False,
-    "112": 42,
-}
-
-PC321TY_POWERCLAMP_PAYLOAD = {
-    "101": 2284,
-    "102": 1073,
-    "103": 191,
-    "104": 78,
-    "106": 251,
-    "111": 2354,
-    "112": 748,
-    "113": 47,
-    "114": 100,
-    "116": 267,
-    "121": 2350,
-    "122": 753,
-    "123": 149,
-    "124": 84,
-    "126": 517,
-    "131": 1036,
-    "132": 2574,
-    "133": 188,
-    "135": 50,
-    "136": 390,
-}
-
-ENERGY_POWERSTRIP_PAYLOAD = {
-    "1": False,
-    "2": False,
-    "3": False,
-    "4": False,
-    "102": 0,
-    "103": 0,
-    "104": 2240,
-    "105": 1,
-    "106": 1709,
-    "107": 34620,
-    "108": 101000,
-    "109": 205,
-}
-
-COMPTEUR_SMARTMETER_PAYLOAD = {
-    "17": 12345,
-    "18": 2000,
-    "19": 4400,
-    "20": 2200,
-    "21": 0,
-    "22": 0,
-    "23": 0,
-    "24": 0,
-    "25": 0,
-    "26": 0,
-}
-
-BECOOL_HEATPUMP_PAYLOAD = {
-    "1": False,
-    "4": 0,
-    "5": "4",
-    "6": 24,
-    "8": "0",
-    "10": False,
-    "13": 0,
-    "14": 0,
-    "15": 0,
-    "16": True,
-    "17": False,
-    "19": False,
-}
-
-ESSENTIALS_PURIFIER_PAYLOAD = {
-    "1": True,
-    "2": 12,
-    "3": "auto",
-    "5": 50,
-    "7": False,
-    "9": False,
-    "11": False,
-    "18": "cancel",
-    "19": 0,
-    "21": "good",
-    "101": "Standard",
-}
-
-AVATTO_BLINDS_PAYLOAD = {
-    "1": "close",
-    "2": 0,
-    "3": 0,
-    "5": False,
-    "7": "closing",
-    "8": "cancel",
-    "9": 0,
-    "11": 0,
-}
-
-AVATTO_CURTAIN_PAYLOAD = {
-    "1": "stop",
-    "101": True,
-}
-
-ORION_SIREN_PAYLOAD = {
-    "1": "normal",
-    "5": "middle",
-    "6": True,
-    "7": 10,
-    "15": 0,
-    "20": True,
-}
-
-INKBIRD_SOUSVIDE_PAYLOAD = {
-    "101": False,
-    "102": "stop",
-    "103": 0,
-    "104": 297,
-    "105": 0,
-    "106": 0,
-    "107": 3,
-    "108": True,
-    "109": 0,
-    "110": 0,
-}
-
-HYDROTHERM_DYNAMICX8_PAYLOAD = {
-    "1": True,
-    "2": 65,
-    "3": 60,
-    "4": "STANDARD",
-    "21": 0,
-}
-
-TREATLIFE_DS02F_PAYLOAD = {
-    "1": True,
-    "2": 0,
-    "3": "level_2",
-}
-
-MOTION_LIGHT_PAYLOAD = {
-    "101": "mode_auto",
-    "102": False,
-    "103": 0,
-    "104": 249,
-    "105": 374,
-    "106": False,
-}
-
-BLITZWOLF_BWSH2_PAYLOAD = {
-    "1": True,
-    "3": "grade1",
-    "6": "close",
-    "19": "cancel",
-}
-
-BCOM_CAMERA_PAYLOAD = {
-    "101": True,
-    "103": False,
-    "104": False,
-    "106": "1",
-    "108": "0",
-    "109": "64GB",
-    "110": 1,
-    "111": False,
-    "115": "",
-    "117": 0,
-    "136": "",
-    "150": True,
-    "151": "1",
-    "162": False,
-    "231": "",
-    "232": False,
-}
-
-GX_AROMA_PAYLOAD = {
-    "1": True,
-    "2": "high",
-    "3": "cancel",
-    "4": 0,
-    "5": True,
-    "6": "colour",
-    "8": "b9fff500ab46ff",
-    "9": 0,
-}
-
-MOEBOT_PAYLOAD = {
-    "6": 41,
-    "101": "MOWING",
-    "102": 0,
-    "103": "MOWER_LEAN",
-    "104": True,
-    "105": 8,
-    "106": 1343,
-    "114": "AutoMode",
-}
-
-TOMPD63LW_SOCKET_PAYLOAD = {
-    "1": 139470,
-    "6": "CPQAFEkAAuk=",
-    "9": 0,
-    "11": False,
-    "12": False,
-    "13": 0,
-    "16": True,
-    "19": "FSE-F723C46A04FC6C",
-    # "101": 275,
-    # "102": 170,
-    # "103": 40,
-    # "104": 30,
-    # "105": False,
-    # "106": False,
-}
-
-GOLDAIR_GPDH340_PAYLOAD = {
-    "1": True,
-    "2": "2",
-    "4": 60,
-    "6": "2",
-    "11": 0,
-    "103": 20,
-    "104": 72,
-    "105": 40,
-    "106": False,
-    "107": True,
-    "108": False,
-    "109": False,
-}
-
-THERMEX_IF50V_PAYLOAD = {
-    "101": False,
-    "102": 37,
-    "104": 65,
-    "105": "2",
-    "106": 0,
-}
-
-ZXG30_ALARM_PAYLOAD = {
-    "1": "home",
-    "2": 0,
-    "3": 3,
-    "4": True,
-    "9": False,
-    "10": False,
-    "15": True,
-    "16": 100,
-    "17": True,
-    "20": False,
-    "21": False,
-    "22": 1,
-    "23": "2",
-    "24": "Normal",
-    "27": True,
-    "28": 10,
-    "29": True,
-    "32": "normal",
-    "34": False,
-    "35": False,
-    "36": "3",
-    "37": "0",
-    "39": "0",
-    "40": "1",
-}
-
-IR_REMOTE_SENSORS_PAYLOAD = {
-    "101": 200,
-    "102": 80,
-}
-
-LORATAP_CURTAINSWITCH_PAYLOAD = {
-    "1": "3",
-}
-
-BLE_WATERVALVE_PAYLOAD = {
-    "1": True,
-    "4": 0,
-    "7": 50,
-    "9": 3600,
-    "10": "cancel",
-    "12": "unknown",
-    "15": 60,
-}
-
-AM25_ROLLERBLIND_PAYLOAD = {
-    "1": "stop",
-    "2": 0,
-    "104": True,
-    "105": True,
-    "109": 4,
-}
-
-DUUX_BLIZZARD_PAYLOAD = {
-    "1": False,
-    "2": "fan",
-    "3": "high",
-    "4": 0,
-    "6": False,
-    "7": False,
-    "8": 22,
-    "9": 0,
-    "11": 72,
-    "12": True,
-    "13": False,
-    "14": False,
-    "15": 0,
-}
-
-BLE_SMARTPLANT_PAYLOAD = {
-    "3": 50,
-    "5": 25,
-    "9": "c",
-    "14": "Low",
-    "15": 20,
-}
-
-GOLDAIR_PORTABLE_AIR_CONDITIONER_PAYLOAD = {
-    "1": True,
-    "2": 22,
-    "3": 30,
-    "4": "cold",
-    "5": "low",
-    "11": False,
-    "15": "off",
-    "20": 0,
-    "103": False,
-    "104": 0,
-    "105": 0,
-    "107": 72,
-    "108": 80,
-    "109": 26,
-    "110": False,
-}
-
-LEDVANCE_PANEL_PAYLOAD = {
-    "20": True,
-    "22": 670,
-    "23": 200,
-    "24": "003903e803e8",
-    "26": 0,
-    "51": "AAcAOQPoA+gCngDI",
-}
-
-MUSTOOL_MT15MT29_AIRBOX_PAYLOAD = {
-    "1": "level_1",
-    "2": 26,
-    "3": 53,
-    "4": 814,
-    "5": 4,
-    "7": 3,
-    "8": 2,
-    "9": 3,
-    "22": 100,
-    "23": True,
-    "28": "middle",
-    "101": 20,
-    "102": 0,
-    "104": 1500,
-    "105": 10,
-    "106": True,
-    "107": 2,
-    "109": 0,
-    "110": 0,
-    "111": 0,
-    "112": "c",
-    "113": 200,
-    "114": 100,
-    "115": 61,
-    "116": True,
-    "117": True,
-    "118": True,
-    # last 3 must be true for the time entities to be enabled
-}
-
-AILRINNI_FINGERPRINTLOCK_PAYLOAD = {
-    "8": 86,
-    "31": "mute",
-    "64": "1712614183",
-}
-
-ELKO_CFMTB_THERMOSTAT_PAYLOAD = {
-    "101": "02.01.01.68",
-    "102": "02.02.15.6D",
-    "103": 1000,
-    "104": 1750,
-    "105": 2200,
-    "107": 2200,
-    "108": 0,
-    "109": 2200,
-    "110": 2200,
-    "111": 200,
-    "112": 200,
-    "113": 1800,
-    "114": 2400,
-    "115": False,
-    "116": False,
-    "117": False,
-    "118": 8,
-    "121": "Heat",
-    "122": "Unoccupied",
-    "123": "Close",
-    "128": 0,
-    "129": "10K",
-    "130": -300,
-    "131": False,
-    "132": 100,
-    "133": 0,
-    "134": 60,
-    "139": "NotConnected",
-    "140": "Manual",
-    "145": "EKO07262;B;16A",
-    "146": False,
-    "150": 0,
-    "151": 773999,
-    "152": True,
-}

+ 0 - 0
tests/devices/__init__.py


+ 0 - 178
tests/devices/base_device_tests.py

@@ -1,178 +0,0 @@
-from unittest import IsolatedAsyncioTestCase
-from unittest.mock import AsyncMock, Mock, PropertyMock, patch
-from uuid import uuid4
-
-from homeassistant.helpers.entity import EntityCategory
-
-from custom_components.tuya_local.alarm_control_panel import TuyaLocalAlarmControlPanel
-from custom_components.tuya_local.binary_sensor import TuyaLocalBinarySensor
-from custom_components.tuya_local.button import TuyaLocalButton
-from custom_components.tuya_local.camera import TuyaLocalCamera
-from custom_components.tuya_local.climate import TuyaLocalClimate
-from custom_components.tuya_local.cover import TuyaLocalCover
-from custom_components.tuya_local.datetime import TuyaLocalDateTime
-from custom_components.tuya_local.event import TuyaLocalEvent
-from custom_components.tuya_local.fan import TuyaLocalFan
-from custom_components.tuya_local.helpers.device_config import (
-    TuyaDeviceConfig,
-    possible_matches,
-)
-from custom_components.tuya_local.humidifier import TuyaLocalHumidifier
-from custom_components.tuya_local.infrared import TuyaLocalInfrared
-from custom_components.tuya_local.lawn_mower import TuyaLocalLawnMower
-from custom_components.tuya_local.light import TuyaLocalLight
-from custom_components.tuya_local.lock import TuyaLocalLock
-from custom_components.tuya_local.number import TuyaLocalNumber
-from custom_components.tuya_local.remote import TuyaLocalRemote
-from custom_components.tuya_local.select import TuyaLocalSelect
-from custom_components.tuya_local.sensor import TuyaLocalSensor
-from custom_components.tuya_local.siren import TuyaLocalSiren
-from custom_components.tuya_local.switch import TuyaLocalSwitch
-from custom_components.tuya_local.text import TuyaLocalText
-from custom_components.tuya_local.time import TuyaLocalTime
-from custom_components.tuya_local.vacuum import TuyaLocalVacuum
-from custom_components.tuya_local.valve import TuyaLocalValve
-from custom_components.tuya_local.water_heater import TuyaLocalWaterHeater
-
-DEVICE_TYPES = {
-    "alarm_control_panel": TuyaLocalAlarmControlPanel,
-    "binary_sensor": TuyaLocalBinarySensor,
-    "button": TuyaLocalButton,
-    "camera": TuyaLocalCamera,
-    "climate": TuyaLocalClimate,
-    "cover": TuyaLocalCover,
-    "datetime": TuyaLocalDateTime,
-    "event": TuyaLocalEvent,
-    "fan": TuyaLocalFan,
-    "humidifier": TuyaLocalHumidifier,
-    "infrared": TuyaLocalInfrared,
-    "lawn_mower": TuyaLocalLawnMower,
-    "light": TuyaLocalLight,
-    "lock": TuyaLocalLock,
-    "number": TuyaLocalNumber,
-    "remote": TuyaLocalRemote,
-    "switch": TuyaLocalSwitch,
-    "select": TuyaLocalSelect,
-    "sensor": TuyaLocalSensor,
-    "siren": TuyaLocalSiren,
-    "text": TuyaLocalText,
-    "time": TuyaLocalTime,
-    "vacuum": TuyaLocalVacuum,
-    "valve": TuyaLocalValve,
-    "water_heater": TuyaLocalWaterHeater,
-}
-
-
-class TuyaDeviceTestCase(IsolatedAsyncioTestCase):
-    __test__ = False
-
-    def setUpForConfig(self, config_file, payload):
-        """Perform setup tasks for every test."""
-        device_patcher = patch("custom_components.tuya_local.device.TuyaLocalDevice")
-        self.addCleanup(device_patcher.stop)
-        self.mock_device = device_patcher.start()
-        self.dps = payload.copy()
-        self.mock_device.get_property.side_effect = lambda dpid: self.dps.get(dpid)
-        cfg = TuyaDeviceConfig(config_file)
-        self.conf_type = cfg.legacy_type
-        type(self.mock_device).has_returned_state = PropertyMock(return_value=True)
-        type(self.mock_device).unique_id = PropertyMock(return_value=str(uuid4()))
-        self.mock_device.name = cfg.name
-
-        self.entities = {}
-        self.secondary_category = []
-        self.names = {}
-        for e in cfg.all_entities():
-            self.entities[e.config_id] = self.create_entity(e)
-            self.names[e.config_id] = e.name
-
-    def create_entity(self, config):
-        """Create an entity to match the config"""
-        dev_type = DEVICE_TYPES[config.entity]
-        if dev_type:
-            entity = dev_type(self.mock_device, config)
-            entity.platform = Mock()
-            entity.platform.name = dev_type
-            entity.platform.platform_translations = {}
-            return entity
-
-    def mark_secondary(self, entities):
-        self.secondary_category = self.secondary_category + entities
-
-    def test_config_matched(self):
-        for cfg in possible_matches(self.dps):
-            if cfg.legacy_type == self.conf_type:
-                quality = cfg.match_quality(self.dps)
-                self.assertEqual(
-                    quality,
-                    100.0,
-                    msg=f"{self.conf_type} is an imperfect match at {quality}%",
-                )
-                return
-        self.fail()
-
-    def test_should_poll(self):
-        for e in self.entities.values():
-            self.assertFalse(e.should_poll)
-
-    def test_available(self):
-        for e in self.entities.values():
-            self.assertTrue(e.available)
-
-    def test_entity_category(self):
-        for k, e in self.entities.items():
-            if k in self.secondary_category:
-                if type(e) in [TuyaLocalBinarySensor, TuyaLocalSensor]:
-                    self.assertEqual(
-                        e.entity_category,
-                        EntityCategory.DIAGNOSTIC,
-                        msg=f"{k} is {e.entity_category.value}, expected diagnostic",
-                    )
-                elif type(e) is TuyaLocalButton:
-                    self.assertIn(
-                        e.entity_category,
-                        [EntityCategory.CONFIG, EntityCategory.DIAGNOSTIC],
-                        msg=f"{k} is unsupported {e.entity_category.value}",
-                    )
-                else:
-                    self.assertEqual(
-                        e.entity_category,
-                        EntityCategory.CONFIG,
-                        msg=f"{k} is {e.entity_category.value}, expected config",
-                    )
-            else:
-                self.assertIsNone(
-                    e.entity_category,
-                    msg=f"{k} is {e.entity_category}, expected None",
-                )
-
-    # name has become more difficult to test with translation support, but it is working
-    # in practice.
-    # def test_name_returns_device_name(self):
-    #     for e in self.entities:
-    #         self.assertEqual(self.entities[e].name, self.names[e])
-
-    def test_unique_id_contains_device_unique_id(self):
-        entities = {}
-        for e in self.entities.values():
-            self.assertIn(self.mock_device.unique_id, e.unique_id)
-            if type(e) not in entities:
-                entities[type(e)] = []
-
-            entities[type(e)].append(e.unique_id)
-
-        for e in entities.values():
-            self.assertCountEqual(e, set(e))
-
-    def test_device_info_returns_device_info_from_device(self):
-        for e in self.entities.values():
-            self.assertEqual(e.device_info, self.mock_device.device_info)
-
-    async def test_update(self):
-        for e in self.entities.values():
-            result = AsyncMock()
-            self.mock_device.async_refresh.return_value = result()
-            self.mock_device.async_refresh.reset_mock()
-            await e.async_update()
-            self.mock_device.async_refresh.assert_called_once()
-            result.assert_awaited()

+ 0 - 70
tests/devices/test_ailrinni_fplock.py

@@ -1,70 +0,0 @@
-from base64 import b64encode
-
-from ..const import AILRINNI_FINGERPRINTLOCK_PAYLOAD
-from ..helpers import assert_device_properties_set
-from .base_device_tests import TuyaDeviceTestCase
-
-BATTERY_DP = "8"
-UNLOCK_FP_DP = "12"
-UNLOCK_PWD_DP = "13"  # noqa: S105
-UNLOCK_DYN_DP = "14"
-UNLOCK_BLE_DP = "19"
-ALERT_DP = "21"
-VOLUME_DP = "31"
-LOCK_STATE_DP = "47"
-TMPPW_CREATE_DP = "51"
-TMPPW_DELETE_DP = "52"
-TMPPW_MODIFY_DP = "53"
-UNLOCK_TMP_DP = "55"
-CODESET_DP = "60"
-CODE_UNLOCK_DP = "61"
-UNLOCK_APP_DP = "62"
-UNLOCK_VOICE_DP = "63"
-UNLOCK_OFFLINE_DP = "67"
-
-
-class TestAilrinniFingerprintLock(TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig(
-            "ailrinni_fingerprint_lock.yaml", AILRINNI_FINGERPRINTLOCK_PAYLOAD
-        )
-        self.subject = self.entities.get("lock")
-        self.mark_secondary(
-            [
-                "sensor_alert",
-                "number_lock_volume",
-                "text_remote_unlock_code",
-                "text_new_credential",
-                "text_delete_credential",
-                "text_modify_credential",
-                "text_new_temp_password",
-                "text_delete_temp_password",
-                "text_modify_temp_password",
-                "text_sync_credentials",
-                "text_offline_password_timestamp",
-                "sensor_used_offline_password",
-                "sensor_cleared_offline_passwords",
-            ]
-        )
-
-    async def test_lock(self):
-        """Test locking the lock."""
-        expected = b64encode(
-            b"\x00\x00\x01" + b"12345678" + b"\x00\x00",
-        ).decode("utf-8")
-        async with assert_device_properties_set(
-            self.subject._device,
-            {CODE_UNLOCK_DP: expected},
-        ):
-            await self.subject.async_lock(code="12345678")
-
-    async def test_unlock(self):
-        """Test unlocking the lock."""
-        expected = b64encode(
-            b"\x01\x00\x01" + b"12345678" + b"\x00\x00",
-        ).decode("utf-8")
-        async with assert_device_properties_set(
-            self.subject._device,
-            {CODE_UNLOCK_DP: expected},
-        ):
-            await self.subject.async_unlock(code="12345678")

+ 0 - 128
tests/devices/test_anko_fan.py

@@ -1,128 +0,0 @@
-from homeassistant.components.fan import FanEntityFeature
-from homeassistant.components.number import NumberDeviceClass
-from homeassistant.const import UnitOfTime
-
-from ..const import ANKO_FAN_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.number import BasicNumberTests
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-PRESET_DPS = "2"
-SPEED_DPS = "3"
-OSCILLATE_DPS = "4"
-TIMER_DPS = "6"
-
-
-class TestAnkoFan(SwitchableTests, BasicNumberTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("anko_fan.yaml", ANKO_FAN_PAYLOAD)
-        self.subject = self.entities["fan"]
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.setUpBasicNumber(
-            TIMER_DPS,
-            self.entities.get("number_timer"),
-            max=9,
-            device_class=NumberDeviceClass.DURATION,
-            unit=UnitOfTime.HOURS,
-        )
-        self.mark_secondary(["number_timer"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            FanEntityFeature.OSCILLATE
-            | FanEntityFeature.PRESET_MODE
-            | FanEntityFeature.SET_SPEED
-            | FanEntityFeature.TURN_ON
-            | FanEntityFeature.TURN_OFF,
-        )
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = "normal"
-        self.assertEqual(self.subject.preset_mode, "normal")
-
-        self.dps[PRESET_DPS] = "nature"
-        self.assertEqual(self.subject.preset_mode, "nature")
-
-        self.dps[PRESET_DPS] = "sleep"
-        self.assertEqual(self.subject.preset_mode, "sleep")
-
-        self.dps[PRESET_DPS] = None
-        self.assertIs(self.subject.preset_mode, None)
-
-    def test_preset_modes(self):
-        self.assertCountEqual(self.subject.preset_modes, ["normal", "nature", "sleep"])
-
-    async def test_set_preset_mode_to_normal(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "normal"},
-        ):
-            await self.subject.async_set_preset_mode("normal")
-
-    async def test_set_preset_mode_to_nature(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "nature"},
-        ):
-            await self.subject.async_set_preset_mode("nature")
-
-    async def test_set_preset_mode_to_sleep(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "sleep"},
-        ):
-            await self.subject.async_set_preset_mode("sleep")
-
-    def test_oscillating(self):
-        self.dps[OSCILLATE_DPS] = "off"
-        self.assertFalse(self.subject.oscillating)
-
-        self.dps[OSCILLATE_DPS] = "auto"
-        self.assertTrue(self.subject.oscillating)
-
-        self.dps[OSCILLATE_DPS] = None
-        self.assertFalse(self.subject.oscillating)
-
-    async def test_oscillate_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {OSCILLATE_DPS: "off"}
-        ):
-            await self.subject.async_oscillate(False)
-
-    async def test_oscillate_on(self):
-        async with assert_device_properties_set(
-            self.subject._device, {OSCILLATE_DPS: "auto"}
-        ):
-            await self.subject.async_oscillate(True)
-
-    def test_speed(self):
-        self.dps[PRESET_DPS] = "normal"
-        self.dps[SPEED_DPS] = "4"
-        self.assertEqual(self.subject.percentage, 50)
-
-    def test_speed_step(self):
-        self.assertEqual(self.subject.percentage_step, 12.5)
-        self.assertEqual(self.subject.speed_count, 8)
-
-    async def test_set_speed_in_normal_mode(self):
-        self.dps[PRESET_DPS] = "normal"
-        async with assert_device_properties_set(self.subject._device, {SPEED_DPS: "2"}):
-            await self.subject.async_set_percentage(25)
-
-    async def test_set_speed_in_normal_mode_snaps(self):
-        self.dps[PRESET_DPS] = "normal"
-        async with assert_device_properties_set(self.subject._device, {SPEED_DPS: "6"}):
-            await self.subject.async_set_percentage(80)
-
-    async def test_turn_on_with_params(self):
-        self.dps[SWITCH_DPS] = False
-        self.dps[SPEED_DPS] = "1"
-        self.dps[PRESET_DPS] = "normal"
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWITCH_DPS: True, SPEED_DPS: "6", PRESET_DPS: "nature"},
-        ):
-            await self.subject.async_turn_on(80, "nature")

+ 0 - 120
tests/devices/test_arlec_fan.py

@@ -1,120 +0,0 @@
-from homeassistant.components.fan import (
-    DIRECTION_FORWARD,
-    DIRECTION_REVERSE,
-    FanEntityFeature,
-)
-
-from ..const import ARLEC_FAN_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.select import BasicSelectTests
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-SPEED_DPS = "3"
-DIRECTION_DPS = "4"
-PRESET_DPS = "102"
-TIMER_DPS = "103"
-
-
-class TestArlecFan(SwitchableTests, BasicSelectTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("arlec_fan.yaml", ARLEC_FAN_PAYLOAD)
-        self.subject = self.entities["fan"]
-        self.timer = self.entities["select_timer"]
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.setUpBasicSelect(
-            TIMER_DPS,
-            self.entities["select_timer"],
-            {
-                "off": "cancel",
-                "2hour": "2h",
-                "4hour": "4h",
-                "8hour": "8h",
-            },
-        )
-        self.mark_secondary(["select_timer"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                FanEntityFeature.DIRECTION
-                | FanEntityFeature.PRESET_MODE
-                | FanEntityFeature.SET_SPEED
-                | FanEntityFeature.TURN_OFF
-                | FanEntityFeature.TURN_ON
-            ),
-        )
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = "normal"
-        self.assertEqual(self.subject.preset_mode, "normal")
-
-        self.dps[PRESET_DPS] = "breeze"
-        self.assertEqual(self.subject.preset_mode, "nature")
-
-        self.dps[PRESET_DPS] = "sleep"
-        self.assertEqual(self.subject.preset_mode, "sleep")
-
-        self.dps[PRESET_DPS] = None
-        self.assertIs(self.subject.preset_mode, None)
-
-    def test_preset_modes(self):
-        self.assertCountEqual(self.subject.preset_modes, ["normal", "nature", "sleep"])
-
-    async def test_set_preset_mode_to_normal(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "normal"},
-        ):
-            await self.subject.async_set_preset_mode("normal")
-
-    async def test_set_preset_mode_to_breeze(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "breeze"},
-        ):
-            await self.subject.async_set_preset_mode("nature")
-
-    async def test_set_preset_mode_to_sleep(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "sleep"},
-        ):
-            await self.subject.async_set_preset_mode("sleep")
-
-    def test_direction(self):
-        self.dps[DIRECTION_DPS] = "forward"
-        self.assertEqual(self.subject.current_direction, DIRECTION_FORWARD)
-        self.dps[DIRECTION_DPS] = "reverse"
-        self.assertEqual(self.subject.current_direction, DIRECTION_REVERSE)
-
-    async def test_set_direction_forward(self):
-        async with assert_device_properties_set(
-            self.subject._device, {DIRECTION_DPS: "forward"}
-        ):
-            await self.subject.async_set_direction(DIRECTION_FORWARD)
-
-    async def test_set_direction_reverse(self):
-        async with assert_device_properties_set(
-            self.subject._device, {DIRECTION_DPS: "reverse"}
-        ):
-            await self.subject.async_set_direction(DIRECTION_REVERSE)
-
-    def test_speed(self):
-        self.dps[SPEED_DPS] = "3"
-        self.assertEqual(self.subject.percentage, 50)
-
-    def test_speed_step(self):
-        self.assertAlmostEqual(self.subject.percentage_step, 16.67, 2)
-        self.assertEqual(self.subject.speed_count, 6)
-
-    async def test_set_speed(self):
-        async with assert_device_properties_set(self.subject._device, {SPEED_DPS: 2}):
-            await self.subject.async_set_percentage(33)
-
-    async def test_set_speed_in_normal_mode_snaps(self):
-        self.dps[PRESET_DPS] = "normal"
-        async with assert_device_properties_set(self.subject._device, {SPEED_DPS: 5}):
-            await self.subject.async_set_percentage(80)

+ 0 - 153
tests/devices/test_arlec_fan_light.py

@@ -1,153 +0,0 @@
-from homeassistant.components.fan import (
-    DIRECTION_FORWARD,
-    DIRECTION_REVERSE,
-    FanEntityFeature,
-)
-from homeassistant.components.light import ColorMode
-
-from ..const import ARLEC_FAN_LIGHT_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.select import BasicSelectTests
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-SPEED_DPS = "3"
-DIRECTION_DPS = "4"
-LIGHT_DPS = "9"
-BRIGHTNESS_DPS = "10"
-COLORTEMP_DPS = "11"
-PRESET_DPS = "102"
-TIMER_DPS = "103"
-
-
-class TestArlecFan(SwitchableTests, BasicSelectTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("arlec_fan_light.yaml", ARLEC_FAN_LIGHT_PAYLOAD)
-        self.subject = self.entities.get("fan")
-        self.light = self.entities.get("light")
-        self.timer = self.entities.get("select_timer")
-
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.setUpBasicSelect(
-            TIMER_DPS,
-            self.entities["select_timer"],
-            {
-                "off": "cancel",
-                "2hour": "2h",
-                "4hour": "4h",
-                "8hour": "8h",
-            },
-        )
-        self.mark_secondary(["select_timer"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                FanEntityFeature.DIRECTION
-                | FanEntityFeature.PRESET_MODE
-                | FanEntityFeature.SET_SPEED
-                | FanEntityFeature.TURN_ON
-                | FanEntityFeature.TURN_OFF
-            ),
-        )
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = "nature"
-        self.assertEqual(self.subject.preset_mode, "nature")
-
-        self.dps[PRESET_DPS] = "sleep"
-        self.assertEqual(self.subject.preset_mode, "sleep")
-
-        self.dps[PRESET_DPS] = None
-        self.assertIs(self.subject.preset_mode, None)
-
-    def test_preset_modes(self):
-        self.assertCountEqual(self.subject.preset_modes, ["nature", "sleep"])
-
-    async def test_set_preset_mode_to_nature(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "nature"},
-        ):
-            await self.subject.async_set_preset_mode("nature")
-
-    async def test_set_preset_mode_to_sleep(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "sleep"},
-        ):
-            await self.subject.async_set_preset_mode("sleep")
-
-    def test_direction(self):
-        self.dps[DIRECTION_DPS] = "forward"
-        self.assertEqual(self.subject.current_direction, DIRECTION_FORWARD)
-        self.dps[DIRECTION_DPS] = "reverse"
-        self.assertEqual(self.subject.current_direction, DIRECTION_REVERSE)
-
-    async def test_set_direction_forward(self):
-        async with assert_device_properties_set(
-            self.subject._device, {DIRECTION_DPS: "forward"}
-        ):
-            await self.subject.async_set_direction(DIRECTION_FORWARD)
-
-    async def test_set_direction_reverse(self):
-        async with assert_device_properties_set(
-            self.subject._device, {DIRECTION_DPS: "reverse"}
-        ):
-            await self.subject.async_set_direction(DIRECTION_REVERSE)
-
-    def test_speed(self):
-        self.dps[SPEED_DPS] = "3"
-        self.assertEqual(self.subject.percentage, 50)
-
-    def test_speed_step(self):
-        self.assertAlmostEqual(self.subject.percentage_step, 16.67, 2)
-        self.assertEqual(self.subject.speed_count, 6)
-
-    async def test_set_speed(self):
-        async with assert_device_properties_set(self.subject._device, {SPEED_DPS: 2}):
-            await self.subject.async_set_percentage(33)
-
-    async def test_set_speed_in_normal_mode_snaps(self):
-        self.dps[PRESET_DPS] = "normal"
-        async with assert_device_properties_set(self.subject._device, {SPEED_DPS: 5}):
-            await self.subject.async_set_percentage(80)
-
-    def test_light_is_on(self):
-        self.dps[LIGHT_DPS] = False
-        self.assertFalse(self.light.is_on)
-        self.dps[LIGHT_DPS] = True
-        self.assertTrue(self.light.is_on)
-
-    def test_light_supported_color_modes(self):
-        self.assertCountEqual(
-            self.light.supported_color_modes,
-            [ColorMode.COLOR_TEMP],
-        )
-
-    def test_light_color_mode(self):
-        self.assertEqual(self.light.color_mode, ColorMode.COLOR_TEMP)
-
-    def test_light_brightness(self):
-        self.dps[BRIGHTNESS_DPS] = 50
-        self.assertAlmostEqual(self.light.brightness, 129, 0)
-
-    def test_light_color_temp(self):
-        self.dps[COLORTEMP_DPS] = 70
-        self.assertEqual(self.light.color_temp_kelvin, 3840)
-
-    def test_light_color_temp_range(self):
-        self.assertEqual(self.light.min_color_temp_kelvin, 2700)
-        self.assertEqual(self.light.max_color_temp_kelvin, 6500)
-
-    async def test_light_async_turn_on(self):
-        async with assert_device_properties_set(
-            self.light._device,
-            {LIGHT_DPS: True, BRIGHTNESS_DPS: 44, COLORTEMP_DPS: 70},
-        ):
-            await self.light.async_turn_on(
-                brightness=112,
-                color_temp_kelvin=3840,
-            )

+ 0 - 182
tests/devices/test_aspen_adv200_fan.py

@@ -1,182 +0,0 @@
-from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
-from homeassistant.components.fan import (
-    DIRECTION_FORWARD,
-    DIRECTION_REVERSE,
-    FanEntityFeature,
-)
-from homeassistant.const import UnitOfTemperature
-
-from ..const import ASPEN_ASP200_FAN_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.climate import TargetTemperatureTests
-from ..mixins.light import DimmableLightTests
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-DIRECTION_DPS = "2"
-SPEED_DPS = "3"
-UNKNOWN8_DPS = "8"
-TEMPERATURE_DPS = "18"
-CURTEMP_DPS = "19"
-PRESET_DPS = "101"
-LIGHT_DPS = "102"
-
-
-class TestAspenASP200Fan(
-    DimmableLightTests, SwitchableTests, TargetTemperatureTests, TuyaDeviceTestCase
-):
-    def setUp(self):
-        self.setUpForConfig("aspen_asp200_fan.yaml", ASPEN_ASP200_FAN_PAYLOAD)
-        self.subject = self.entities.get("fan")
-        self.climate = self.entities.get("climate")
-        self.setUpDimmableLight(
-            LIGHT_DPS,
-            self.entities.get("light_display"),
-            offval=1,
-            tests=[
-                (1, 85),
-                (2, 170),
-                (3, 255),
-            ],
-            no_off=True,
-        )
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.climate,
-            min=40.0,
-            max=95.0,
-        )
-        self.mark_secondary(["light_display"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                FanEntityFeature.DIRECTION
-                | FanEntityFeature.PRESET_MODE
-                | FanEntityFeature.SET_SPEED
-                | FanEntityFeature.TURN_OFF
-                | FanEntityFeature.TURN_ON
-            ),
-        )
-        self.assertEqual(
-            self.climate.supported_features,
-            ClimateEntityFeature.TARGET_TEMPERATURE
-            | ClimateEntityFeature.TURN_OFF
-            | ClimateEntityFeature.TURN_ON,
-        )
-
-    def test_fan_direction(self):
-        self.dps[DIRECTION_DPS] = "in"
-        self.assertEqual(self.subject.current_direction, DIRECTION_FORWARD)
-        self.dps[DIRECTION_DPS] = "out"
-        self.assertEqual(self.subject.current_direction, DIRECTION_REVERSE)
-        self.dps[DIRECTION_DPS] = "exch"
-        self.assertEqual(self.subject.current_direction, "exchange")
-
-    async def test_fan_set_direction_forward(self):
-        async with assert_device_properties_set(
-            self.subject._device, {DIRECTION_DPS: "in"}
-        ):
-            await self.subject.async_set_direction(DIRECTION_FORWARD)
-
-    async def test_fan_set_direction_reverse(self):
-        async with assert_device_properties_set(
-            self.subject._device, {DIRECTION_DPS: "out"}
-        ):
-            await self.subject.async_set_direction(DIRECTION_REVERSE)
-
-    async def test_fan_set_direction_exchange(self):
-        async with assert_device_properties_set(
-            self.subject._device, {DIRECTION_DPS: "exch"}
-        ):
-            await self.subject.async_set_direction("exchange")
-
-    def test_fan_speed(self):
-        self.dps[SPEED_DPS] = "1"
-        self.assertAlmostEqual(self.subject.percentage, 33, 0)
-        self.dps[SPEED_DPS] = "2"
-        self.assertAlmostEqual(self.subject.percentage, 66, 0)
-        self.dps[SPEED_DPS] = "3"
-        self.assertEqual(self.subject.percentage, 100)
-
-    def test_fan_speed_step(self):
-        self.assertAlmostEqual(self.subject.percentage_step, 33.33, 2)
-        self.assertEqual(self.subject.speed_count, 3)
-
-    async def test_fan_set_speed(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SPEED_DPS: 1},
-        ):
-            await self.subject.async_set_percentage(33)
-
-    async def test_fan_set_speed_snaps(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SPEED_DPS: 2},
-        ):
-            await self.subject.async_set_percentage(80)
-
-    def test_fan_preset_modes(self):
-        self.assertCountEqual(self.subject.preset_modes, ["normal", "smart"])
-
-    def test_fan_preset_mode(self):
-        self.dps[PRESET_DPS] = False
-        self.assertEqual(self.subject.preset_mode, "normal")
-        self.dps[PRESET_DPS] = True
-        self.assertEqual(self.subject.preset_mode, "smart")
-
-    async def test_fan_set_preset_to_constant(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: False},
-        ):
-            await self.subject.async_set_preset_mode("normal")
-
-    async def test_fan_set_preset_to_auto(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: True},
-        ):
-            await self.subject.async_set_preset_mode("smart")
-
-    def test_climate_current_temperature(self):
-        self.dps[CURTEMP_DPS] = 24
-        self.assertEqual(self.climate.current_temperature, 24)
-
-    def test_climate_temperature_unit(self):
-        self.assertEqual(self.climate.temperature_unit, UnitOfTemperature.FAHRENHEIT)
-
-    def test_climate_hvac_mode(self):
-        self.dps[SWITCH_DPS] = False
-        self.assertEqual(self.climate.hvac_mode, HVACMode.OFF)
-        self.dps[SWITCH_DPS] = True
-        self.assertEqual(self.climate.hvac_mode, HVACMode.FAN_ONLY)
-
-    def test_climate_hvac_modes(self):
-        self.assertCountEqual(
-            self.climate.hvac_modes,
-            [HVACMode.FAN_ONLY, HVACMode.OFF],
-        )
-
-    async def test_climate_turn_on(self):
-        async with assert_device_properties_set(
-            self.climate._device,
-            {SWITCH_DPS: True},
-        ):
-            await self.climate.async_set_hvac_mode(HVACMode.FAN_ONLY)
-
-    async def test_climate_turn_off(self):
-        async with assert_device_properties_set(
-            self.climate._device,
-            {SWITCH_DPS: False},
-        ):
-            await self.climate.async_set_hvac_mode(HVACMode.OFF)
-
-    def test_extra_state_attributes(self):
-        self.dps[UNKNOWN8_DPS] = 8
-        self.assertDictEqual(self.subject.extra_state_attributes, {"unknown_8": 8})
-        self.assertEqual(self.climate.extra_state_attributes, {})

+ 0 - 147
tests/devices/test_avatto_blinds.py

@@ -1,147 +0,0 @@
-"""Tests for the Avatto roller blinds controller."""
-
-from homeassistant.components.cover import CoverDeviceClass, CoverEntityFeature
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.const import UnitOfTime
-
-from ..const import AVATTO_BLINDS_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.select import BasicSelectTests
-from ..mixins.sensor import MultiSensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-COMMAND_DP = "1"
-POSITION_DP = "2"
-CURRENTPOS_DP = "3"
-BACK_DP = "5"
-ACTION_DP = "7"
-TIMER_DP = "8"
-COUNTDOWN_DP = "9"
-TRAVELTIME_DP = "11"
-
-
-class TestAvattoBlinds(MultiSensorTests, BasicSelectTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("avatto_roller_blinds.yaml", AVATTO_BLINDS_PAYLOAD)
-        self.subject = self.entities["cover_blind"]
-        self.setUpMultiSensors(
-            [
-                {
-                    "dps": TRAVELTIME_DP,
-                    "name": "sensor_travel_time",
-                    "min": 0,
-                    "max": 120000,
-                    "unit": UnitOfTime.MILLISECONDS,
-                },
-                {
-                    "dps": COUNTDOWN_DP,
-                    "name": "sensor_time_remaining",
-                    "device_class": SensorDeviceClass.DURATION,
-                    "min": 0,
-                    "max": 86400,
-                    "unit": UnitOfTime.SECONDS,
-                },
-            ]
-        )
-        self.setUpBasicSelect(
-            TIMER_DP,
-            self.entities.get("select_timer"),
-            {
-                "cancel": "cancel",
-                "1": "1h",
-                "2": "2h",
-                "3": "3h",
-                "4": "4h",
-            },
-        )
-        self.mark_secondary(
-            [
-                "sensor_travel_time",
-                "sensor_time_remaining",
-                "select_timer",
-                "select_direction",
-                "binary_sensor_problem",
-            ]
-        )
-
-    def test_device_class_is_blind(self):
-        self.assertEqual(self.subject.device_class, CoverDeviceClass.BLIND)
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                CoverEntityFeature.OPEN
-                | CoverEntityFeature.CLOSE
-                | CoverEntityFeature.SET_POSITION
-                | CoverEntityFeature.STOP
-            ),
-        )
-
-    def test_current_cover_position(self):
-        self.dps[CURRENTPOS_DP] = 47
-        self.assertEqual(self.subject.current_cover_position, 53)
-
-    def test_is_opening(self):
-        self.dps[COMMAND_DP] = "stop"
-        self.dps[ACTION_DP] = "opening"
-        self.dps[CURRENTPOS_DP] = 0
-        self.assertFalse(self.subject.is_opening)
-        self.dps[CURRENTPOS_DP] = 50
-        self.assertTrue(self.subject.is_opening)
-        self.dps[ACTION_DP] = "closing"
-        self.assertFalse(self.subject.is_opening)
-        self.dps[ACTION_DP] = "opening"
-        self.dps[CURRENTPOS_DP] = None
-        self.assertFalse(self.subject.is_opening)
-
-    def test_is_closing(self):
-        self.dps[COMMAND_DP] = "stop"
-        self.dps[ACTION_DP] = "closing"
-        self.dps[CURRENTPOS_DP] = 100
-        self.assertFalse(self.subject.is_closing)
-        self.dps[CURRENTPOS_DP] = 50
-        self.assertTrue(self.subject.is_closing)
-        self.dps[ACTION_DP] = "opening"
-        self.assertFalse(self.subject.is_closing)
-        self.dps[ACTION_DP] = "closing"
-        self.dps[CURRENTPOS_DP] = None
-        self.assertFalse(self.subject.is_closing)
-
-    def test_is_closed(self):
-        self.dps[COMMAND_DP] = "stop"
-        self.dps[CURRENTPOS_DP] = 0
-        self.assertFalse(self.subject.is_closed)
-        self.dps[CURRENTPOS_DP] = 100
-        self.assertTrue(self.subject.is_closed)
-        self.dps[ACTION_DP] = "closing"
-        self.dps[CURRENTPOS_DP] = None
-        self.assertFalse(self.subject.is_closed)
-
-    async def test_open_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DP: "open"},
-        ):
-            await self.subject.async_open_cover()
-
-    async def test_close_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DP: "close"},
-        ):
-            await self.subject.async_close_cover()
-
-    async def test_stop_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DP: "stop"},
-        ):
-            await self.subject.async_stop_cover()
-
-    async def test_set_cover_position(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POSITION_DP: 23},
-        ):
-            await self.subject.async_set_cover_position(77)

+ 0 - 68
tests/devices/test_avatto_curtain_switch.py

@@ -1,68 +0,0 @@
-"""Tests for the Avatto roller blinds controller."""
-
-from homeassistant.components.cover import CoverDeviceClass, CoverEntityFeature
-
-from ..const import AVATTO_CURTAIN_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.light import BasicLightTests
-from .base_device_tests import TuyaDeviceTestCase
-
-COMMAND_DP = "1"
-BACKLIGHT_DP = "101"
-
-
-class TestAvattoCurtainSwitch(BasicLightTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig(
-            "avatto_curtain_switch.yaml",
-            AVATTO_CURTAIN_PAYLOAD,
-        )
-        self.subject = self.entities.get("cover_curtain")
-        self.setUpBasicLight(
-            BACKLIGHT_DP,
-            self.entities.get("light_backlight"),
-        )
-        self.mark_secondary(["light_backlight"])
-
-    def test_device_class_is_curtain(self):
-        self.assertEqual(self.subject.device_class, CoverDeviceClass.CURTAIN)
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                CoverEntityFeature.OPEN
-                | CoverEntityFeature.CLOSE
-                | CoverEntityFeature.STOP
-            ),
-        )
-
-    def test_is_opening(self):
-        self.assertIsNone(self.subject.is_opening)
-
-    def test_is_closing(self):
-        self.assertIsNone(self.subject.is_closing)
-
-    def test_is_closed(self):
-        self.assertIsNone(self.subject.is_closed)
-
-    async def test_open_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DP: "open"},
-        ):
-            await self.subject.async_open_cover()
-
-    async def test_close_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DP: "close"},
-        ):
-            await self.subject.async_close_cover()
-
-    async def test_stop_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DP: "stop"},
-        ):
-            await self.subject.async_stop_cover()

+ 0 - 74
tests/devices/test_bcom_intercom_camera.py

@@ -1,74 +0,0 @@
-"""Tests for the bcom intercom camera"""
-
-from ..const import BCOM_CAMERA_PAYLOAD
-from .base_device_tests import TuyaDeviceTestCase
-
-LIGHT_DPS = "101"
-FLIP_DPS = "103"
-WATERMARK_DPS = "104"
-MOTION_DPS = "106"
-NIGHT_DPS = "108"
-SDSIZE_DPS = "109"
-SDSTATUS_DPS = "110"
-SDFORMAT_DPS = "111"
-SNAPSHOT_DPS = "115"
-SDFMTSTATE_DPS = "117"
-DOORBELL_DPS = "154"
-RECORD_DPS = "150"
-RECMODE_DPS = "151"
-REBOOT_DPS = "162"
-CHANNEL_DPS = "231"
-LOCK_DPS = "232"
-
-
-class TestBcomIntercomCamera(TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("bcom_intercom_camera.yaml", BCOM_CAMERA_PAYLOAD)
-        self.subject = self.entities.get("camera")
-
-        self.mark_secondary(
-            [
-                "light_indicator",
-                "switch_flip_image",
-                "switch_watermark",
-                "select_motion_sensitivity",
-                "select_night_vision",
-                "sensor_sd_capacity",
-                "sensor_sd_status",
-                "button_sd_format",
-                "sensor_sd_format_state",
-                "select_recording_mode",
-                "button_restart",
-                "sensor_channel",
-            ]
-        )
-
-    def test_is_recording(self):
-        self.dps[RECORD_DPS] = True
-        self.assertTrue(self.subject.is_recording)
-        self.dps[RECORD_DPS] = False
-        self.assertFalse(self.subject.is_recording)
-
-    def test_motion_detection_enabled(self):
-        self.assertIsNone(self.subject.motion_detection_enabled)
-
-    def test_is_on(self):
-        self.assertIsNone(self.subject.is_on)
-
-    async def test_camera_image(self):
-        self.dps[DOORBELL_DPS] = ""
-        self.dps[SNAPSHOT_DPS] = "VGVzdA=="
-        image = await self.subject.async_camera_image()
-        self.assertEqual(image, b"Test")
-
-        self.dps[DOORBELL_DPS] = "a25vY2sga25vY2s="
-        image = await self.subject.async_camera_image()
-        self.assertEqual(image, b"knock knock")
-
-    async def test_turn_off(self):
-        with self.assertRaises(NotImplementedError):
-            await self.subject.async_turn_off()
-
-    async def test_turn_on(self):
-        with self.assertRaises(NotImplementedError):
-            await self.subject.async_turn_on()

+ 0 - 219
tests/devices/test_beca_bac002_thermostat.py

@@ -1,219 +0,0 @@
-from homeassistant.components.climate.const import (
-    FAN_AUTO,
-    FAN_HIGH,
-    FAN_LOW,
-    FAN_MEDIUM,
-    PRESET_COMFORT,
-    PRESET_ECO,
-    ClimateEntityFeature,
-    HVACMode,
-)
-from homeassistant.const import PRECISION_TENTHS, UnitOfTemperature
-
-from ..const import BECA_BAC002_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.climate import TargetTemperatureTests
-from ..mixins.lock import BasicLockTests
-from ..mixins.select import BasicSelectTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-TEMPERATURE_DPS = "2"
-CURRENTTEMP_DPS = "3"
-PROGRAM_DPS = "4"
-PRESET_DPS = "5"
-LOCK_DPS = "6"
-HVACMODE_DPS = "102"
-FAN_DPS = "103"
-
-
-class TestBecaBAC002Thermostat(
-    BasicLockTests,
-    BasicSelectTests,
-    TargetTemperatureTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("beca_bac002_thermostat_c.yaml", BECA_BAC002_PAYLOAD)
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=5.0,
-            max=35.0,
-            scale=2,
-        )
-        self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock"))
-        self.setUpBasicSelect(
-            PROGRAM_DPS,
-            self.entities.get("select_schedule"),
-            {
-                "0": "program",
-                "1": "manual",
-            },
-        )
-        self.mark_secondary(["lock_child_lock"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                ClimateEntityFeature.FAN_MODE
-                | ClimateEntityFeature.PRESET_MODE
-                | ClimateEntityFeature.TARGET_TEMPERATURE
-                | ClimateEntityFeature.TURN_OFF
-                | ClimateEntityFeature.TURN_ON
-            ),
-        )
-
-    def test_temperature_unit_returns_configured_temperature_unit(self):
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-
-    def test_precision(self):
-        self.assertEqual(self.subject.precision, PRECISION_TENTHS)
-
-    async def test_legacy_set_temperature_with_preset_mode(self):
-        async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: True}
-        ):
-            await self.subject.async_set_temperature(preset_mode=PRESET_ECO)
-
-    async def test_legacy_set_temperature_with_both_properties(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                TEMPERATURE_DPS: 58,
-                PRESET_DPS: False,
-            },
-        ):
-            await self.subject.async_set_temperature(
-                temperature=29, preset_mode=PRESET_COMFORT
-            )
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 70
-        self.assertEqual(self.subject.current_temperature, 35.0)
-
-    def test_hvac_mode(self):
-        self.dps[SWITCH_DPS] = True
-        self.dps[HVACMODE_DPS] = "0"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.COOL)
-        self.dps[HVACMODE_DPS] = "1"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-        self.dps[HVACMODE_DPS] = "2"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.FAN_ONLY)
-        self.dps[SWITCH_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(
-            self.subject.hvac_modes,
-            [
-                HVACMode.COOL,
-                HVACMode.FAN_ONLY,
-                HVACMode.HEAT,
-                HVACMode.OFF,
-            ],
-        )
-
-    async def test_set_hvac_mode_to_cool(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWITCH_DPS: True, HVACMODE_DPS: "0"},
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.COOL)
-
-    async def test_set_hvac_mode_to_heat(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWITCH_DPS: True, HVACMODE_DPS: "1"},
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT)
-
-    async def test_set_hvac_mode_to_fan(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWITCH_DPS: True, HVACMODE_DPS: "2"},
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.FAN_ONLY)
-
-    async def test_set_hvac_mode_to_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {SWITCH_DPS: False}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    def test_preset_modes(self):
-        self.assertCountEqual(self.subject.preset_modes, [PRESET_COMFORT, PRESET_ECO])
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = False
-        self.assertEqual(self.subject.preset_mode, PRESET_COMFORT)
-        self.dps[PRESET_DPS] = True
-        self.assertEqual(self.subject.preset_mode, PRESET_ECO)
-
-    async def test_set_preset_to_comfort(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: False},
-        ):
-            await self.subject.async_set_preset_mode(PRESET_COMFORT)
-
-    async def test_set_preset_to_eco(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: True},
-        ):
-            await self.subject.async_set_preset_mode(PRESET_ECO)
-
-    def test_fan_mode(self):
-        self.dps[FAN_DPS] = "0"
-        self.assertEqual(self.subject.fan_mode, FAN_AUTO)
-        self.dps[FAN_DPS] = "1"
-        self.assertEqual(self.subject.fan_mode, FAN_HIGH)
-        self.dps[FAN_DPS] = "2"
-        self.assertEqual(self.subject.fan_mode, FAN_MEDIUM)
-        self.dps[FAN_DPS] = "3"
-        self.assertEqual(self.subject.fan_mode, FAN_LOW)
-
-    def test_fan_modes(self):
-        self.assertCountEqual(
-            self.subject.fan_modes,
-            [
-                FAN_AUTO,
-                FAN_LOW,
-                FAN_MEDIUM,
-                FAN_HIGH,
-            ],
-        )
-
-    async def test_set_fan_mode_to_auto(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: "0"},
-        ):
-            await self.subject.async_set_fan_mode(FAN_AUTO)
-
-    async def test_set_fan_mode_to_high(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: "1"},
-        ):
-            await self.subject.async_set_fan_mode(FAN_HIGH)
-
-    async def test_set_fan_mode_to_medium(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: "2"},
-        ):
-            await self.subject.async_set_fan_mode(FAN_MEDIUM)
-
-    async def test_set_fan_mode_to_low(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: "3"},
-        ):
-            await self.subject.async_set_fan_mode(FAN_LOW)
-
-    def test_extra_state_attribures(self):
-        self.assertEqual(self.subject.extra_state_attributes, {})

+ 0 - 163
tests/devices/test_beca_bhp6000_thermostat.py

@@ -1,163 +0,0 @@
-from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
-from homeassistant.const import UnitOfTemperature
-
-from ..const import BECA_BHP6000_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.climate import TargetTemperatureTests
-from ..mixins.light import BasicLightTests
-from ..mixins.lock import BasicLockTests
-from .base_device_tests import TuyaDeviceTestCase
-
-LIGHT_DPS = "1"
-TEMPERATURE_DPS = "2"
-CURRENTTEMP_DPS = "3"
-PRESET_DPS = "4"
-HVACMODE_DPS = "5"
-FAN_DPS = "6"
-LOCK_DPS = "7"
-
-
-class TestBecaBHP6000Thermostat(
-    BasicLightTests,
-    BasicLockTests,
-    TargetTemperatureTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig(
-            "beca_bhp6000_thermostat_f.yaml",
-            BECA_BHP6000_PAYLOAD,
-        )
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=40.0,
-            max=95.0,
-        )
-        self.setUpBasicLight(LIGHT_DPS, self.entities.get("light_display"))
-        self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock"))
-        self.mark_secondary(["light_display", "lock_child_lock"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                ClimateEntityFeature.FAN_MODE
-                | ClimateEntityFeature.PRESET_MODE
-                | ClimateEntityFeature.TARGET_TEMPERATURE
-                | ClimateEntityFeature.TURN_OFF
-            ),
-        )
-
-    def test_temperature_unit_returns_configured_temperature_unit(self):
-        self.assertEqual(
-            self.subject.temperature_unit,
-            UnitOfTemperature.FAHRENHEIT,
-        )
-
-    async def test_legacy_set_temperature_with_preset_mode(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: 1},
-        ):
-            await self.subject.async_set_temperature(preset_mode="program")
-
-    async def test_legacy_set_temperature_with_both_properties(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                TEMPERATURE_DPS: 78,
-                PRESET_DPS: 4,
-            },
-        ):
-            await self.subject.async_set_temperature(
-                temperature=78,
-                preset_mode="away",
-            )
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 70
-        self.assertEqual(self.subject.current_temperature, 70)
-
-    def test_hvac_mode(self):
-        self.dps[HVACMODE_DPS] = "1"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.COOL)
-
-        self.dps[HVACMODE_DPS] = "2"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-        self.dps[HVACMODE_DPS] = "3"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-        self.dps[HVACMODE_DPS] = "4"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT_COOL)
-
-        self.dps[HVACMODE_DPS] = "5"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.AUTO)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(
-            self.subject.hvac_modes,
-            [
-                HVACMode.OFF,
-                HVACMode.HEAT,
-                HVACMode.HEAT_COOL,
-                HVACMode.COOL,
-                HVACMode.AUTO,
-            ],
-        )
-
-    def test_fan_mode(self):
-        self.dps[FAN_DPS] = False
-        self.assertEqual(self.subject.fan_mode, "auto")
-        self.dps[FAN_DPS] = True
-        self.assertEqual(self.subject.fan_mode, "on")
-
-    def test_fan_modes(self):
-        self.assertCountEqual(
-            self.subject.fan_modes,
-            [
-                "auto",
-                "on",
-            ],
-        )
-
-    async def test_set_fan_mode_to_auto(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: False},
-        ):
-            await self.subject.async_set_fan_mode("auto")
-
-    async def test_set_fan_mode_to_on(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: True},
-        ):
-            await self.subject.async_set_fan_mode("on")
-
-    def test_extra_state_attributes(self):
-        self.assertEqual(self.subject.extra_state_attributes, {})
-
-
-class TestBecaBHP6000ThermostatC(TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig(
-            "beca_bhp6000_thermostat_c.yaml",
-            BECA_BHP6000_PAYLOAD,
-        )
-        self.subject = self.entities.get("climate")
-        self.mark_secondary(["light_display", "lock_child_lock"])
-
-    def test_temperature_unit_returns_configured_temperature_unit(self):
-        self.assertEqual(
-            self.subject.temperature_unit,
-            UnitOfTemperature.CELSIUS,
-        )
-
-    def test_minimum_target_temperature(self):
-        self.assertEqual(self.subject.min_temp, 5)
-
-    def test_maximum_target_temperature(self):
-        self.assertEqual(self.subject.max_temp, 35)

+ 0 - 207
tests/devices/test_beok_tr9b_thermostat.py

@@ -1,207 +0,0 @@
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
-from homeassistant.components.number.const import NumberDeviceClass
-from homeassistant.const import PRECISION_TENTHS, UnitOfTemperature
-
-from ..const import BEOK_TR9B_PAYLOAD
-from ..mixins.binary_sensor import MultiBinarySensorTests
-from ..mixins.climate import TargetTemperatureTests
-from ..mixins.lock import BasicLockTests
-from ..mixins.number import MultiNumberTests
-from ..mixins.select import MultiSelectTests
-from ..mixins.switch import BasicSwitchTests
-from .base_device_tests import TuyaDeviceTestCase
-
-POWER_DPS = "1"
-HVACMODE_DPS = "2"
-ANTIFROST_DPS = "10"
-TEMPERATURE_DPS = "16"
-MAXTEMP_DPS = "19"
-UNIT_DPS = "23"
-CURRENTTEMP_DPS = "24"
-MINTEMP_DPS = "26"
-SCHED_DPS = "31"
-VALVE_DPS = "36"
-LOCK_DPS = "40"
-ERROR_DPS = "45"
-UNKNOWN101_DPS = "101"
-UNKNOWN102_DPS = "102"
-
-
-class TestBeokTR9BThermostat(
-    MultiBinarySensorTests,
-    BasicLockTests,
-    MultiNumberTests,
-    MultiSelectTests,
-    BasicSwitchTests,
-    TargetTemperatureTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig(
-            "beok_tr9b_thermostat.yaml",
-            BEOK_TR9B_PAYLOAD,
-        )
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=41.0,
-            max=99.0,
-            scale=10,
-            step=10,
-        )
-        self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock"))
-        self.setUpMultiSelect(
-            [
-                {
-                    "dps": SCHED_DPS,
-                    "name": "select_schedule",
-                    "options": {
-                        "5_2": "Weekday+Weekend",
-                        "6_1": "Mon-Sat+Sun",
-                        "7": "Daily",
-                    },
-                },
-                {
-                    "dps": UNIT_DPS,
-                    "name": "select_temperature_unit",
-                    "options": {
-                        "c": "celsius",
-                        "f": "fahrenheit",
-                    },
-                },
-            ],
-        )
-        self.setUpBasicSwitch(
-            ANTIFROST_DPS,
-            self.entities.get("switch_anti_frost"),
-        )
-        self.setUpMultiBinarySensors(
-            [
-                {
-                    "dps": ERROR_DPS,
-                    "name": "binary_sensor_problem",
-                    "device_class": BinarySensorDeviceClass.PROBLEM,
-                    "testdata": (1, 0),
-                },
-            ],
-        )
-        self.setUpMultiNumber(
-            [
-                {
-                    "dps": MINTEMP_DPS,
-                    "name": "number_minimum_temperature",
-                    "device_class": NumberDeviceClass.TEMPERATURE,
-                    "min": 5.0,
-                    "max": 300.0,
-                    "step": 1.0,
-                    "scale": 10,
-                    "unit": UnitOfTemperature.CELSIUS,
-                },
-                {
-                    "dps": MAXTEMP_DPS,
-                    "name": "number_maximum_temperature",
-                    "device_class": NumberDeviceClass.TEMPERATURE,
-                    "min": 5.0,
-                    "max": 300.0,
-                    "step": 1.0,
-                    "scale": 10,
-                    "unit": UnitOfTemperature.CELSIUS,
-                },
-            ],
-        )
-        self.mark_secondary(
-            [
-                "binary_sensor_problem",
-                "lock_child_lock",
-                "number_minimum_temperature",
-                "number_maximum_temperature",
-                "select_schedule",
-                "select_temperature_unit",
-                "switch_anti_frost",
-            ],
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            ClimateEntityFeature.TARGET_TEMPERATURE
-            | ClimateEntityFeature.TURN_OFF
-            | ClimateEntityFeature.TURN_ON,
-        )
-
-    def test_temperature_unit(self):
-        self.dps[UNIT_DPS] = "c"
-        self.assertEqual(
-            self.subject.temperature_unit,
-            UnitOfTemperature.CELSIUS,
-        )
-        self.assertEqual(self.subject.target_temperature_step, 0.5)
-
-        self.dps[UNIT_DPS] = "f"
-        self.assertEqual(
-            self.subject.temperature_unit,
-            UnitOfTemperature.FAHRENHEIT,
-        )
-        self.assertEqual(self.subject.target_temperature_step, 1.0)
-
-    def test_precision(self):
-        self.assertEqual(self.subject.precision, PRECISION_TENTHS)
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 685
-        self.assertEqual(self.subject.current_temperature, 68.5)
-
-    def test_hvac_mode(self):
-        self.dps[POWER_DPS] = False
-        self.dps[HVACMODE_DPS] = "auto"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-        self.dps[POWER_DPS] = True
-        self.assertEqual(self.subject.hvac_mode, HVACMode.AUTO)
-
-        self.dps[HVACMODE_DPS] = "manual"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(
-            self.subject.hvac_modes,
-            [
-                HVACMode.HEAT,
-                HVACMode.AUTO,
-                HVACMode.OFF,
-            ],
-        )
-
-    # Override - since min and max are set by attributes, the range
-    # allowed when setting is wider than normal.  The thermostat seems
-    # to be configurable as at least a water heater (to 212F), as tuya
-    # doc says max 300.0 for one matching device, and 1000.0 for
-    # another (after scaling)
-    async def test_set_target_temperature_fails_outside_valid_range(self):
-        with self.assertRaisesRegex(
-            ValueError,
-            "temperature \\(4.5\\) must be between 5.0 and 300.0",
-        ):
-            await self.subject.async_set_target_temperature(4.5)
-        with self.assertRaisesRegex(
-            ValueError,
-            "temperature \\(1001\\) must be between 5.0 and 300.0",
-        ):
-            await self.subject.async_set_target_temperature(1001)
-
-    def test_extra_state_attributes(self):
-        self.dps[UNKNOWN101_DPS] = 101
-        self.dps[UNKNOWN102_DPS] = 102
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {"unknown_101": 101, "unknown_102": 102},
-        )
-
-    def test_multi_bsensor_extra_state_attributes(self):
-        self.dps[ERROR_DPS] = 8
-        self.assertDictEqual(
-            self.multiBSensor["binary_sensor_problem"].extra_state_attributes,
-            {"fault_code": 8},
-        )

+ 0 - 152
tests/devices/test_betterlife_bl1500_heater.py

@@ -1,152 +0,0 @@
-from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.const import UnitOfTemperature, UnitOfTime
-
-from ..const import BETTERLIFE_BL1500_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.climate import TargetTemperatureTests
-from ..mixins.lock import BasicLockTests
-from ..mixins.select import BasicSelectTests
-from ..mixins.sensor import BasicSensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-HVACMODE_DPS = "1"
-TEMPERATURE_DPS = "2"
-PRESET_DPS = "4"
-LOCK_DPS = "7"
-TIMER_DPS = "11"
-COUNTDOWN_DPS = "12"
-
-
-class TestBetterlifeBL1500Heater(
-    BasicLockTests,
-    BasicSelectTests,
-    BasicSensorTests,
-    TargetTemperatureTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("betterlife_bl1500_heater.yaml", BETTERLIFE_BL1500_PAYLOAD)
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=15.0,
-            max=30.0,
-        )
-        self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock"))
-        self.setUpBasicSelect(
-            TIMER_DPS,
-            self.entities.get("select_timer"),
-            {
-                "0": "cancel",
-                "1": "1h",
-                "2": "2h",
-                "3": "3h",
-                "4": "4h",
-                "5": "5h",
-                "6": "6h",
-                "7": "7h",
-                "8": "8h",
-                "9": "9h",
-                "10": "10h",
-                "11": "11h",
-                "12": "12h",
-            },
-        )
-        self.setUpBasicSensor(
-            COUNTDOWN_DPS,
-            self.entities.get("sensor_time_remaining"),
-            unit=UnitOfTime.MINUTES,
-            device_class=SensorDeviceClass.DURATION,
-        )
-        self.mark_secondary(
-            ["lock_child_lock", "select_timer", "sensor_time_remaining"]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                ClimateEntityFeature.TARGET_TEMPERATURE
-                | ClimateEntityFeature.PRESET_MODE
-                | ClimateEntityFeature.TURN_OFF
-                | ClimateEntityFeature.TURN_ON
-            ),
-        )
-
-    def test_temperature_unit_returns_celsius(self):
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-
-    async def test_legacy_set_temperature_with_preset_mode(self):
-        async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: "2"}
-        ):
-            await self.subject.async_set_temperature(preset_mode="eco")
-
-    async def test_legacy_set_temperature_with_both_properties(self):
-        async with assert_device_properties_set(
-            self.subject._device, {TEMPERATURE_DPS: 26, PRESET_DPS: "1"}
-        ):
-            await self.subject.async_set_temperature(
-                temperature=26, preset_mode="boost"
-            )
-
-    def test_hvac_mode(self):
-        self.dps[HVACMODE_DPS] = True
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-        self.dps[HVACMODE_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(self.subject.hvac_modes, [HVACMode.OFF, HVACMode.HEAT])
-
-    async def test_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: True}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT)
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: False}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = "0"
-        self.assertEqual(self.subject.preset_mode, "comfort")
-
-        self.dps[PRESET_DPS] = "1"
-        self.assertEqual(self.subject.preset_mode, "boost")
-
-        self.dps[PRESET_DPS] = "2"
-        self.assertEqual(self.subject.preset_mode, "eco")
-
-        self.dps[PRESET_DPS] = None
-        self.assertIs(self.subject.preset_mode, None)
-
-    def test_preset_modes(self):
-        self.assertCountEqual(self.subject.preset_modes, ["comfort", "boost", "eco"])
-
-    async def test_set_preset_mode_to_comfort(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "0"},
-        ):
-            await self.subject.async_set_preset_mode("comfort")
-
-    async def test_set_preset_mode_to_boost(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "1"},
-        ):
-            await self.subject.async_set_preset_mode("boost")
-
-    async def test_set_preset_mode_to_eco(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "2"},
-        ):
-            await self.subject.async_set_preset_mode("eco")

+ 0 - 50
tests/devices/test_ble_smartplant.py

@@ -1,50 +0,0 @@
-"""
-Test BLE smart plant sensor.
-Primarily for testing the refresh button used in this device, which is
-made by sending the temperature unit as the current setting so as to
-give the device a command to initiate a data transmission without actually
-changing anything.
-"""
-
-from ..const import BLE_SMARTPLANT_PAYLOAD
-from ..helpers import assert_device_properties_set
-from .base_device_tests import TuyaDeviceTestCase
-
-MOISTURE_DP = "3"
-TEMPERATURE_DP = "5"
-TEMPERATURE_UNIT_DP = "9"
-BATTERY_STATE_DP = "14"
-BATTERY_DP = "15"
-
-
-class TestBleSmartPlant(TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig(
-            "ble_smart_plant_moisture.yaml",
-            BLE_SMARTPLANT_PAYLOAD,
-        )
-        self.refresh_button = self.entities.get("button_refresh")
-        self.mark_secondary(
-            [
-                "sensor_battery",
-                "select_temperature_unit",
-                "button_refresh",
-            ]
-        )
-
-    async def test_refresh_logic(self):
-        self.dps[TEMPERATURE_UNIT_DP] = "c"
-
-        async with assert_device_properties_set(
-            self.refresh_button._device,
-            {TEMPERATURE_UNIT_DP: "c"},
-        ):
-            await self.refresh_button.async_press()
-
-        self.dps[TEMPERATURE_UNIT_DP] = "f"
-
-        async with assert_device_properties_set(
-            self.refresh_button._device,
-            {TEMPERATURE_UNIT_DP: "f"},
-        ):
-            await self.refresh_button.async_press()

+ 0 - 86
tests/devices/test_ble_water_valve.py

@@ -1,86 +0,0 @@
-"""Tests for the BLE water valve."""
-
-from homeassistant.components.valve import ValveDeviceClass, ValveEntityFeature
-
-from ..const import BLE_WATERVALVE_PAYLOAD
-from ..helpers import assert_device_properties_set
-from .base_device_tests import TuyaDeviceTestCase
-
-VALVE_DP = "1"
-PROBLEM_DP = "4"
-BATTERY_DP = "7"
-TOTALUSE_DP = "9"
-WEATHERDELAY_DP = "10"
-IRRIGTIME = "11"
-OPERATION_DP = "12"
-WEATHER_DP = "13"
-WEATHERSW_DP = "14"
-LASTUSE_DP = "15"
-SOAKSCHED_DP = "16"
-IRRIGSCHED_DP = "17"
-
-
-class TestBLEValve(TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("ble_water_valve.yaml", BLE_WATERVALVE_PAYLOAD)
-        self.subject = self.entities["valve_water"]
-        self.mark_secondary(
-            [
-                "switch",
-                "sensor_battery",
-                "binary_sensor_problem",
-                "sensor_operation",
-                "sensor_accumulated_use_time",
-                "sensor_last_use_time",
-                "select_weather_delay",
-                "number_irrigation_time",
-                "time_irrigation_time",
-                "switch_smart_weather_switch",
-            ]
-        )
-
-    def test_device_class_is_water(self):
-        self.assertEqual(self.subject.device_class, ValveDeviceClass.WATER)
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            ValveEntityFeature.OPEN | ValveEntityFeature.CLOSE,
-        )
-
-    def test_is_closed(self):
-        self.dps[VALVE_DP] = True
-        self.assertFalse(self.subject.is_closed)
-        self.dps[VALVE_DP] = False
-        self.assertTrue(self.subject.is_closed)
-
-    async def test_open_valve(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {VALVE_DP: True},
-        ):
-            await self.subject.async_open_valve()
-
-    async def test_close_valve(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {VALVE_DP: False},
-        ):
-            await self.subject.async_close_valve()
-
-    def test_extra_state_attributes(self):
-        self.dps[WEATHER_DP] = "Sunny"
-        self.dps[SOAKSCHED_DP] = "soaktest"
-        self.dps[IRRIGSCHED_DP] = "irrigationtest"
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {
-                "weather": "Sunny",
-                "soak_schedule": "soaktest",
-                "irrigation_schedule": "irrigationtest",
-            },
-        )
-
-    def test_available(self):
-        """Override to ignore dynamic availability."""
-        pass

+ 0 - 98
tests/devices/test_blitzwolf_bsh2_humidifier.py

@@ -1,98 +0,0 @@
-from homeassistant.components.fan import FanEntityFeature
-
-from ..const import BLITZWOLF_BWSH2_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.select import MultiSelectTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DP = "1"
-SPEED_DP = "3"
-LIGHT_DP = "6"
-TIMER_DP = "19"
-
-
-class TestBlitzwolfSH2Humidifier(MultiSelectTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig(
-            "blitzwolf_bwsh2_humidifier.yaml",
-            BLITZWOLF_BWSH2_PAYLOAD,
-        )
-        self.subject = self.entities.get("fan")
-        self.light = self.entities.get("light")
-        self.setUpMultiSelect(
-            [
-                {
-                    "name": "select_timer",
-                    "dps": TIMER_DP,
-                    "options": {
-                        "cancel": "cancel",
-                        "2h": "2h",
-                        "4h": "4h",
-                        "6h": "6h",
-                        "8h": "8h",
-                        "10h": "10h",
-                        "12h": "12h",
-                    },
-                },
-            ]
-        )
-        self.mark_secondary(["select_timer"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            FanEntityFeature.SET_SPEED
-            | FanEntityFeature.TURN_OFF
-            | FanEntityFeature.TURN_ON,
-        )
-
-    def test_speed(self):
-        self.dps[SPEED_DP] = "sleep"
-        self.assertEqual(self.subject.percentage, 10)
-        self.dps[SPEED_DP] = "grade1"
-        self.assertEqual(self.subject.percentage, 25)
-        self.dps[SPEED_DP] = "grade2"
-        self.assertEqual(self.subject.percentage, 40)
-        self.dps[SPEED_DP] = "grade3"
-        self.assertEqual(self.subject.percentage, 55)
-        self.dps[SPEED_DP] = "grade4"
-        self.assertEqual(self.subject.percentage, 70)
-        self.dps[SPEED_DP] = "grade5"
-        self.assertEqual(self.subject.percentage, 85)
-        self.dps[SPEED_DP] = "grade6"
-        self.assertEqual(self.subject.percentage, 100)
-
-    async def test_set_speed_snaps(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SPEED_DP: "grade3"},
-        ):
-            await self.subject.async_set_percentage(50)
-
-    def test_light_named_color(self):
-        self.dps[LIGHT_DP] = "colour"
-        self.assertEqual(self.light.hs_color, (0, 0))
-        self.dps[LIGHT_DP] = "red"
-        self.assertEqual(self.light.hs_color, (0, 100))
-
-    async def test_async_set_light_color(self):
-        self.dps[LIGHT_DP] = "red"
-        async with assert_device_properties_set(
-            self.light._device,
-            {LIGHT_DP: "green"},
-        ):
-            await self.light.async_turn_on(hs_color=(120, 100))
-
-    async def test_async_light_turn_off(self):
-        async with assert_device_properties_set(
-            self.light._device,
-            {LIGHT_DP: "close"},
-        ):
-            await self.light.async_turn_off()
-
-    async def test_async_light_turn_on(self):
-        async with assert_device_properties_set(
-            self.light._device,
-            {LIGHT_DP: "colour"},
-        ):
-            await self.light.async_turn_on()

+ 0 - 164
tests/devices/test_digoo_dgsp01_dual_nightlight_switch.py

@@ -1,164 +0,0 @@
-"""Tests for the switch entity."""
-
-from homeassistant.components.light import (
-    EFFECT_OFF,
-    ColorMode,
-    LightEntityFeature,
-)
-from homeassistant.components.switch import SwitchDeviceClass
-
-from ..const import DIGOO_DGSP01_SOCKET_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.switch import BasicSwitchTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-LIGHTSW_DPS = "27"
-COLORMODE_DPS = "28"
-BRIGHTNESS_DPS = "29"
-RGB_DPS = "31"
-UNKNOWN32_DPS = "32"
-UNKNOWN33_DPS = "33"
-UNKNOWN34_DPS = "34"
-UNKNOWN35_DPS = "35"
-UNKNOWN36_DPS = "36"
-
-
-class TestDigooNightlightSwitch(BasicSwitchTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig(
-            "digoo_dgsp01_dual_nightlight_switch.yaml",
-            DIGOO_DGSP01_SOCKET_PAYLOAD,
-        )
-        self.subject = self.entities.get("switch_outlet")
-        self.light = self.entities.get("light_nightlight")
-
-        self.setUpBasicSwitch(
-            SWITCH_DPS, self.subject, device_class=SwitchDeviceClass.OUTLET
-        )
-
-    def test_light_is_on(self):
-        self.dps[LIGHTSW_DPS] = True
-        self.assertTrue(self.light.is_on)
-        self.dps[LIGHTSW_DPS] = False
-        self.assertFalse(self.light.is_on)
-
-    def test_light_brightness(self):
-        self.dps[BRIGHTNESS_DPS] = 45
-        self.dps[COLORMODE_DPS] = "white"
-        self.assertEqual(self.light.brightness, 23)
-
-    def test_light_color_mode(self):
-        self.dps[COLORMODE_DPS] = "colour"
-        self.assertEqual(self.light.color_mode, ColorMode.HS)
-        self.dps[COLORMODE_DPS] = "white"
-        self.assertEqual(self.light.color_mode, ColorMode.WHITE)
-        self.dps[COLORMODE_DPS] = "scene"
-        self.assertEqual(self.light.color_mode, ColorMode.HS)
-        self.dps[COLORMODE_DPS] = "music"
-        self.assertEqual(self.light.color_mode, ColorMode.HS)
-        self.dps[COLORMODE_DPS] = "scene_1"
-        self.assertEqual(self.light.color_mode, ColorMode.HS)
-        self.dps[COLORMODE_DPS] = "scene_2"
-        self.assertEqual(self.light.color_mode, ColorMode.HS)
-        self.dps[COLORMODE_DPS] = "scene_3"
-        self.assertEqual(self.light.color_mode, ColorMode.HS)
-        self.dps[COLORMODE_DPS] = "scene_4"
-        self.assertEqual(self.light.color_mode, ColorMode.HS)
-
-    def test_light_hs_color(self):
-        self.dps[RGB_DPS] = "ffff00003c6464"
-        self.dps[BRIGHTNESS_DPS] = 255
-        self.assertSequenceEqual(self.light.hs_color, (60, 100))
-
-    def test_light_effect_list(self):
-        self.assertCountEqual(
-            self.light.effect_list,
-            [
-                "Scene",
-                "Music",
-                "Scene 1",
-                "Scene 2",
-                "Scene 3",
-                "Scene 4",
-                EFFECT_OFF,
-            ],
-        )
-
-    def test_light_effect(self):
-        self.dps[COLORMODE_DPS] = "scene"
-        self.assertEqual(self.light.effect, "Scene")
-        self.dps[COLORMODE_DPS] = "music"
-        self.assertEqual(self.light.effect, "Music")
-        self.dps[COLORMODE_DPS] = "scene_1"
-        self.assertEqual(self.light.effect, "Scene 1")
-        self.dps[COLORMODE_DPS] = "scene_2"
-        self.assertEqual(self.light.effect, "Scene 2")
-        self.dps[COLORMODE_DPS] = "scene_3"
-        self.assertEqual(self.light.effect, "Scene 3")
-        self.dps[COLORMODE_DPS] = "scene_4"
-        self.assertEqual(self.light.effect, "Scene 4")
-        self.dps[COLORMODE_DPS] = "white"
-        self.assertEqual(self.light.effect, EFFECT_OFF)
-        self.dps[COLORMODE_DPS] = "colour"
-        self.assertEqual(self.light.effect, EFFECT_OFF)
-
-    def test_light_supported_color_modes(self):
-        self.assertCountEqual(
-            self.light.supported_color_modes,
-            {ColorMode.HS, ColorMode.WHITE},
-        )
-
-    def test_light_supported_features(self):
-        self.assertEqual(self.light.supported_features, LightEntityFeature.EFFECT)
-
-    async def test_turn_on(self):
-        self.dps[LIGHTSW_DPS] = False
-        async with assert_device_properties_set(
-            self.light._device, {LIGHTSW_DPS: True}
-        ):
-            await self.light.async_turn_on()
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.light._device, {LIGHTSW_DPS: False}
-        ):
-            await self.light.async_turn_off()
-
-    async def test_set_brightness(self):
-        self.dps[COLORMODE_DPS] = "white"
-        async with assert_device_properties_set(
-            self.light._device,
-            {
-                BRIGHTNESS_DPS: 140,
-            },
-        ):
-            await self.light.async_turn_on(brightness=128)
-
-    async def test_set_hs_color(self):
-        self.dps[RGB_DPS] = "ffffff00000064"
-        self.dps[COLORMODE_DPS] = "colour"
-        async with assert_device_properties_set(
-            self.light._device,
-            {
-                RGB_DPS: "ff000000006464",
-            },
-        ):
-            await self.light.async_turn_on(hs_color=(0, 100))
-
-    def test_extra_state_attributes_set(self):
-        self.dps[UNKNOWN32_DPS] = "32"
-        self.dps[UNKNOWN33_DPS] = "33"
-        self.dps[UNKNOWN34_DPS] = "34"
-        self.dps[UNKNOWN35_DPS] = "35"
-        self.dps[UNKNOWN36_DPS] = "36"
-        self.assertDictEqual(
-            self.light.extra_state_attributes,
-            {
-                "unknown_32": "32",
-                "unknown_33": "33",
-                "unknown_34": "34",
-                "unknown_35": "35",
-                "unknown_36": "36",
-            },
-        )

+ 0 - 83
tests/devices/test_digoo_dgsp202.py

@@ -1,83 +0,0 @@
-"""Tests for Digoo DSSP202 dual switch with timers and energy monitoring"""
-
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.components.switch import SwitchDeviceClass
-from homeassistant.const import (
-    UnitOfElectricCurrent,
-    UnitOfElectricPotential,
-    UnitOfPower,
-)
-
-from ..const import DIGOO_DGSP202_SOCKET_PAYLOAD
-from ..mixins.sensor import MultiSensorTests
-from ..mixins.switch import MultiSwitchTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH1_DPS = "1"
-SWITCH2_DPS = "2"
-TIMER1_DPS = "9"
-TIMER2_DPS = "10"
-CURRENT_DPS = "18"
-POWER_DPS = "19"
-VOLTAGE_DPS = "20"
-
-
-class TestDigooDGSP202Switch(
-    MultiSensorTests,
-    MultiSwitchTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("digoo_dgsp202.yaml", DIGOO_DGSP202_SOCKET_PAYLOAD)
-        self.setUpMultiSwitch(
-            [
-                {
-                    "dps": SWITCH1_DPS,
-                    "name": "switch_outlet_1",
-                    "device_class": SwitchDeviceClass.OUTLET,
-                    "power_dps": POWER_DPS,
-                    "power_scale": 10,
-                },
-                {
-                    "dps": SWITCH2_DPS,
-                    "name": "switch_outlet_2",
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-            ]
-        )
-        self.setUpMultiSensors(
-            [
-                {
-                    "name": "sensor_voltage",
-                    "dps": VOLTAGE_DPS,
-                    "unit": UnitOfElectricPotential.VOLT,
-                    "device_class": SensorDeviceClass.VOLTAGE,
-                    "state_class": "measurement",
-                    "testdata": (2300, 230.0),
-                },
-                {
-                    "name": "sensor_current",
-                    "dps": CURRENT_DPS,
-                    "unit": UnitOfElectricCurrent.MILLIAMPERE,
-                    "device_class": SensorDeviceClass.CURRENT,
-                    "state_class": "measurement",
-                },
-                {
-                    "name": "sensor_power",
-                    "dps": POWER_DPS,
-                    "unit": UnitOfPower.WATT,
-                    "device_class": SensorDeviceClass.POWER,
-                    "state_class": "measurement",
-                    "testdata": (1234, 123.4),
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "sensor_voltage",
-                "sensor_current",
-                "sensor_power",
-                "time_timer_1",
-                "time_timer_2",
-            ]
-        )

+ 0 - 91
tests/devices/test_duux_blizzard.py

@@ -1,91 +0,0 @@
-from homeassistant.components.climate.const import HVACMode
-
-from ..const import DUUX_BLIZZARD_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.climate import TargetTemperatureTests
-from .base_device_tests import TuyaDeviceTestCase
-
-POWER_DP = "1"
-MODE_DP = "2"
-SPEED_DP = "3"
-TIMER_DP = "4"
-TEMPERATURE_DP = "5"
-SLEEP_DP = "6"
-ION_DP = "7"
-CURRENTTEMP_DP = "8"
-FAULT_DP = "9"
-SETTEMPF_DP = "10"
-CURTEMPF_DP = "11"
-IONSHOW_DP = "12"
-HEATSHOW_DP = "13"
-UNIT_DP = "14"
-COUNTDOWN_DP = "15"
-
-
-class TestDuuxBlizzard(TargetTemperatureTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig(
-            "duux_blizzard_portable_aircon.yaml",
-            DUUX_BLIZZARD_PAYLOAD,
-        )
-        self.subject = self.entities.get("climate")
-        self.ionizer = self.entities.get("switch_ionizer")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DP,
-            self.subject,
-            min=18.0,
-            max=32.0,
-        )
-        self.mark_secondary(
-            [
-                "number_timer",
-                "switch_sleep",
-                "switch_ionizer",
-                "binary_sensor_tank_full",
-                "binary_sensor_problem",
-                "select_temperature_unit",
-                "sensor_time_remaining",
-            ]
-        )
-
-    def test_hvac_modes_with_heat_disabled(self):
-        self.dps[HEATSHOW_DP] = False
-        self.assertCountEqual(
-            self.subject.hvac_modes,
-            [
-                HVACMode.OFF,
-                HVACMode.COOL,
-                HVACMode.DRY,
-                HVACMode.FAN_ONLY,
-                HVACMode.AUTO,
-            ],
-        )
-
-    def test_hvac_modes_with_heat_enabled(self):
-        self.dps[HEATSHOW_DP] = True
-        self.assertCountEqual(
-            self.subject.hvac_modes,
-            [
-                HVACMode.OFF,
-                HVACMode.COOL,
-                HVACMode.DRY,
-                HVACMode.FAN_ONLY,
-                HVACMode.AUTO,
-                HVACMode.HEAT,
-            ],
-        )
-
-    def test_ionizer_availability(self):
-        self.dps[IONSHOW_DP] = False
-        self.dps[ION_DP] = True
-        self.assertFalse(self.ionizer.available)
-        self.dps[IONSHOW_DP] = True
-        self.assertTrue(self.ionizer.available)
-
-    async def test_set_redirected_temperature(self):
-        self.dps[UNIT_DP] = True  # Fahrenheit
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SETTEMPF_DP: 75},
-        ):
-            await self.subject.async_set_target_temperature(75)

+ 0 - 213
tests/devices/test_eanons_humidifier.py

@@ -1,213 +0,0 @@
-from homeassistant.components.fan import FanEntityFeature
-from homeassistant.components.humidifier import HumidifierEntityFeature
-from homeassistant.components.humidifier.const import MODE_AUTO, MODE_NORMAL, MODE_SLEEP
-from homeassistant.components.sensor import SensorDeviceClass
-
-from ..const import EANONS_HUMIDIFIER_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import MultiBinarySensorTests
-from ..mixins.select import BasicSelectTests
-from ..mixins.sensor import BasicSensorTests
-from ..mixins.switch import BasicSwitchTests, SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-FANMODE_DPS = "2"
-TIMERHR_DPS = "3"
-TIMER_DPS = "4"
-ERROR_DPS = "9"
-HVACMODE_DPS = "10"
-PRESET_DPS = "12"
-HUMIDITY_DPS = "15"
-CURRENTHUMID_DPS = "16"
-SWITCH_DPS = "22"
-
-
-class TestEanonsHumidifier(
-    BasicSelectTests,
-    BasicSensorTests,
-    BasicSwitchTests,
-    MultiBinarySensorTests,
-    SwitchableTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("eanons_humidifier.yaml", EANONS_HUMIDIFIER_PAYLOAD)
-        self.subject = self.entities.get("humidifier_humidifier")
-        self.setUpSwitchable(HVACMODE_DPS, self.subject)
-        self.fan = self.entities.get("fan_intensity")
-        self.setUpBasicSwitch(SWITCH_DPS, self.entities.get("switch_uv_sterilization"))
-        self.setUpBasicSelect(
-            TIMERHR_DPS,
-            self.entities.get("select_timer"),
-            {
-                "cancel": "cancel",
-                "1": "1h",
-                "2": "2h",
-                "3": "3h",
-                "4": "4h",
-                "5": "5h",
-                "6": "6h",
-                "7": "7h",
-                "8": "8h",
-                "9": "9h",
-                "10": "10h",
-                "11": "11h",
-                "12": "12h",
-            },
-        )
-        self.setUpBasicSensor(
-            TIMER_DPS,
-            self.entities.get("sensor_time_remaining"),
-            unit="min",
-            device_class=SensorDeviceClass.DURATION,
-        )
-        self.setUpMultiBinarySensors(
-            [
-                {
-                    "name": "binary_sensor_tank_empty",
-                    "dps": ERROR_DPS,
-                    "testdata": (1, 0),
-                },
-                {
-                    "name": "binary_sensor_problem",
-                    "dps": ERROR_DPS,
-                    "device_class": "problem",
-                    "testdata": (2, 0),
-                },
-            ],
-        )
-        self.mark_secondary(
-            [
-                "select_timer",
-                "sensor_time_remaining",
-                "binary_sensor_problem",
-                "binary_sensor_tank_empty",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            HumidifierEntityFeature.MODES,
-        )
-        self.assertEqual(
-            self.fan.supported_features,
-            FanEntityFeature.SET_SPEED
-            | FanEntityFeature.TURN_OFF
-            | FanEntityFeature.TURN_ON,
-        )
-
-    def test_current_humidity(self):
-        self.dps[CURRENTHUMID_DPS] = 75
-        self.assertEqual(self.subject.current_humidity, 75)
-
-    def test_min_target_humidity(self):
-        self.assertEqual(self.subject.min_humidity, 40)
-
-    def test_max_target_humidity(self):
-        self.assertEqual(self.subject.max_humidity, 90)
-
-    def test_target_humidity(self):
-        self.dps[HUMIDITY_DPS] = 55
-        self.assertEqual(self.subject.target_humidity, 55)
-
-    async def test_fan_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: True}
-        ):
-            await self.fan.async_turn_on()
-
-    async def test_fan_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: False}
-        ):
-            await self.fan.async_turn_off()
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = "sleep"
-        self.assertEqual(self.subject.mode, MODE_SLEEP)
-
-        self.dps[PRESET_DPS] = "humidity"
-        self.assertEqual(self.subject.mode, MODE_AUTO)
-
-        self.dps[PRESET_DPS] = "work"
-        self.assertEqual(self.subject.mode, MODE_NORMAL)
-
-        self.dps[PRESET_DPS] = None
-        self.assertEqual(self.subject.mode, None)
-
-    def test_preset_modes(self):
-        self.assertCountEqual(
-            self.subject.available_modes,
-            [MODE_NORMAL, MODE_SLEEP, MODE_AUTO],
-        )
-
-    async def test_set_mode_to_auto(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                PRESET_DPS: "humidity",
-            },
-        ):
-            await self.subject.async_set_mode(MODE_AUTO)
-            self.subject._device.anticipate_property_value.assert_not_called()
-
-    async def test_set_mode_to_sleep(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                PRESET_DPS: "sleep",
-            },
-        ):
-            await self.subject.async_set_mode(MODE_SLEEP)
-            self.subject._device.anticipate_property_value.assert_not_called()
-
-    async def test_set_mode_to_normal(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                PRESET_DPS: "work",
-            },
-        ):
-            await self.subject.async_set_mode(MODE_NORMAL)
-            self.subject._device.anticipate_property_value.assert_not_called()
-
-    def test_fan_speed(self):
-        self.dps[FANMODE_DPS] = "small"
-        self.assertEqual(self.fan.percentage, 33)
-
-        self.dps[FANMODE_DPS] = "middle"
-        self.assertEqual(self.fan.percentage, 67)
-
-        self.dps[FANMODE_DPS] = "large"
-        self.assertEqual(self.fan.percentage, 100)
-
-    def test_fan_speed_count(self):
-        self.assertEqual(self.fan.speed_count, 3)
-
-    def test_fan_percentage_step(self):
-        self.assertAlmostEqual(self.fan.percentage_step, 33, 0)
-
-    async def test_fan_set_speed(self):
-        async with assert_device_properties_set(
-            self.fan._device,
-            {FANMODE_DPS: "small"},
-        ):
-            await self.fan.async_set_percentage(33)
-
-    async def test_fan_set_speed_snaps(self):
-        async with assert_device_properties_set(
-            self.fan._device,
-            {FANMODE_DPS: "middle"},
-        ):
-            await self.fan.async_set_percentage(60)
-
-    def test_multi_bsensor_extra_state_attributes(self):
-        self.dps[ERROR_DPS] = 2
-        self.assertEqual(
-            self.multiBSensor["binary_sensor_tank_empty"].extra_state_attributes, {}
-        )
-        self.assertEqual(
-            self.multiBSensor["binary_sensor_problem"].extra_state_attributes,
-            {"fault_code": 2},
-        )

+ 0 - 248
tests/devices/test_eberg_cooly_c35hd.py

@@ -1,248 +0,0 @@
-from homeassistant.components.climate.const import (
-    SWING_OFF,
-    SWING_VERTICAL,
-    ClimateEntityFeature,
-    HVACMode,
-)
-from homeassistant.const import UnitOfTemperature
-
-from ..const import EBERG_COOLY_C35HD_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.climate import TargetTemperatureTests
-from ..mixins.select import BasicSelectTests
-from .base_device_tests import TuyaDeviceTestCase
-
-POWER_DPS = "1"
-UNKNOWN4_DPS = "4"
-HVACMODE_DPS = "5"
-TEMPERATURE_DPS = "6"
-FAN_DPS = "8"
-UNIT_DPS = "10"
-UNKNOWN13_DPS = "13"
-UNKNOWN14_DPS = "14"
-UNKNOWN15_DPS = "15"
-SWING_DPS = "16"
-UNKNOWN17_DPS = "17"
-TEMPF_DPS = "18"
-UNKNOWN19_DPS = "19"
-
-
-class TestEbergCoolyC35HDHeatpump(
-    BasicSelectTests, TargetTemperatureTests, TuyaDeviceTestCase
-):
-    def setUp(self):
-        self.setUpForConfig(
-            "eberg_cooly_c35hd.yaml",
-            EBERG_COOLY_C35HD_PAYLOAD,
-        )
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=13.0,
-            max=32.0,
-        )
-        self.setUpBasicSelect(
-            UNIT_DPS,
-            self.entities.get("select_temperature_unit"),
-            {
-                True: "fahrenheit",
-                False: "celsius",
-            },
-        )
-        self.mark_secondary(["select_temperature_unit"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                ClimateEntityFeature.TARGET_TEMPERATURE
-                | ClimateEntityFeature.FAN_MODE
-                | ClimateEntityFeature.SWING_MODE
-                | ClimateEntityFeature.TURN_OFF
-                | ClimateEntityFeature.TURN_ON
-            ),
-        )
-
-    def test_temperature_unit(self):
-        self.dps[UNIT_DPS] = False
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-        self.dps[UNIT_DPS] = True
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.FAHRENHEIT)
-
-    def test_minimum_target_temperature_f(self):
-        self.dps[UNIT_DPS] = True
-        self.assertEqual(self.subject.min_temp, 55)
-
-    def test_maximum_target_temperature_f(self):
-        self.dps[UNIT_DPS] = True
-        self.assertEqual(self.subject.max_temp, 90)
-
-    def test_temperature_redirects_f(self):
-        self.dps[UNIT_DPS] = True
-        self.dps[TEMPERATURE_DPS] = 20
-        self.dps[TEMPF_DPS] = 90
-        self.assertEqual(self.subject.target_temperature, 90)
-
-    async def test_set_temperature_redirects_f(self):
-        self.dps[UNIT_DPS] = True
-        async with assert_device_properties_set(
-            self.subject._device,
-            {TEMPF_DPS: 85},
-        ):
-            await self.subject.async_set_target_temperature(85)
-
-    def test_hvac_mode(self):
-        self.dps[POWER_DPS] = True
-        self.dps[HVACMODE_DPS] = "1"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-        self.dps[HVACMODE_DPS] = "2"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.DRY)
-        self.dps[HVACMODE_DPS] = "3"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.COOL)
-        self.dps[HVACMODE_DPS] = "4"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.FAN_ONLY)
-
-        self.dps[HVACMODE_DPS] = "3"
-        self.dps[POWER_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(
-            self.subject.hvac_modes,
-            [
-                HVACMode.OFF,
-                HVACMode.COOL,
-                HVACMode.DRY,
-                HVACMode.FAN_ONLY,
-                HVACMode.HEAT,
-            ],
-        )
-
-    async def test_set_hvac_mode_to_heat(self):
-        async with assert_device_properties_set(
-            self.subject._device, {POWER_DPS: True, HVACMODE_DPS: "1"}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT)
-
-    async def test_set_hvac_mode_to_dry(self):
-        async with assert_device_properties_set(
-            self.subject._device, {POWER_DPS: True, HVACMODE_DPS: "2"}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.DRY)
-
-    async def test_set_hvac_mode_to_cool(self):
-        async with assert_device_properties_set(
-            self.subject._device, {POWER_DPS: True, HVACMODE_DPS: "3"}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.COOL)
-
-    async def test_set_hvac_mode_to_fan(self):
-        async with assert_device_properties_set(
-            self.subject._device, {POWER_DPS: True, HVACMODE_DPS: "4"}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.FAN_ONLY)
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {POWER_DPS: False}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    def test_fan_mode(self):
-        self.dps[FAN_DPS] = "1"
-        self.assertEqual(self.subject.fan_mode, "low")
-        self.dps[FAN_DPS] = "2"
-        self.assertEqual(self.subject.fan_mode, "medium")
-        self.dps[FAN_DPS] = "3"
-        self.assertEqual(self.subject.fan_mode, "high")
-        self.dps[FAN_DPS] = "0"
-        self.assertEqual(self.subject.fan_mode, "auto")
-
-    def test_fan_modes(self):
-        self.assertCountEqual(
-            self.subject.fan_modes,
-            [
-                "auto",
-                "low",
-                "medium",
-                "high",
-            ],
-        )
-
-    async def test_set_fan_mode_to_low(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: "1"},
-        ):
-            await self.subject.async_set_fan_mode("low")
-
-    async def test_set_fan_mode_to_medium(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: "2"},
-        ):
-            await self.subject.async_set_fan_mode("medium")
-
-    async def test_set_fan_mode_to_high(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: "3"},
-        ):
-            await self.subject.async_set_fan_mode("high")
-
-    async def test_set_fan_mode_to_auto(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: "0"},
-        ):
-            await self.subject.async_set_fan_mode("auto")
-
-    def test_swing_mode(self):
-        self.dps[SWING_DPS] = True
-        self.assertEqual(self.subject.swing_mode, SWING_VERTICAL)
-        self.dps[SWING_DPS] = False
-        self.assertEqual(self.subject.swing_mode, SWING_OFF)
-
-    def test_swing_modes(self):
-        self.assertCountEqual(
-            self.subject.swing_modes,
-            [
-                SWING_VERTICAL,
-                SWING_OFF,
-            ],
-        )
-
-    async def test_set_swing_mode_to_vertical(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWING_DPS: True},
-        ):
-            await self.subject.async_set_swing_mode(SWING_VERTICAL)
-
-    async def test_set_swing_mode_to_off(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWING_DPS: False},
-        ):
-            await self.subject.async_set_swing_mode(SWING_OFF)
-
-    def test_extra_state_attributes(self):
-        self.dps[UNKNOWN4_DPS] = 4
-        self.dps[UNKNOWN13_DPS] = 13
-        self.dps[UNKNOWN14_DPS] = 14
-        self.dps[UNKNOWN15_DPS] = 15
-        self.dps[UNKNOWN17_DPS] = True
-        self.dps[UNKNOWN19_DPS] = False
-
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {
-                "unknown_4": 4,
-                "unknown_13": 13,
-                "unknown_14": 14,
-                "unknown_15": 15,
-                "unknown_17": True,
-                "unknown_19": False,
-            },
-        )

+ 0 - 288
tests/devices/test_eberg_qubo_q40hd_heatpump.py

@@ -1,288 +0,0 @@
-from homeassistant.components.climate.const import (
-    PRESET_COMFORT,
-    PRESET_SLEEP,
-    SWING_OFF,
-    SWING_VERTICAL,
-    ClimateEntityFeature,
-    HVACAction,
-    HVACMode,
-)
-from homeassistant.components.number import NumberDeviceClass
-from homeassistant.const import UnitOfTemperature, UnitOfTime
-
-from ..const import EBERG_QUBO_Q40HD_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.climate import TargetTemperatureTests
-from ..mixins.number import BasicNumberTests
-from .base_device_tests import TuyaDeviceTestCase
-
-POWER_DPS = "1"
-TEMPERATURE_DPS = "2"
-CURRENTTEMP_DPS = "3"
-HVACMODE_DPS = "4"
-FAN_DPS = "5"
-UNIT_DPS = "19"
-TIMER_DPS = "22"
-PRESET_DPS = "25"
-SWING_DPS = "30"
-HVACACTION_DPS = "101"
-
-
-class TestEbergQuboQ40HDHeatpump(
-    BasicNumberTests, TargetTemperatureTests, TuyaDeviceTestCase
-):
-    def setUp(self):
-        self.setUpForConfig(
-            "eberg_qubo_q40hd_heatpump.yaml",
-            EBERG_QUBO_Q40HD_PAYLOAD,
-        )
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=17.0,
-            max=30.0,
-        )
-        self.setUpBasicNumber(
-            TIMER_DPS,
-            self.entities.get("number_timer"),
-            max=24,
-            device_class=NumberDeviceClass.DURATION,
-            unit=UnitOfTime.HOURS,
-        )
-        self.mark_secondary(["number_timer"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                ClimateEntityFeature.TARGET_TEMPERATURE
-                | ClimateEntityFeature.FAN_MODE
-                | ClimateEntityFeature.PRESET_MODE
-                | ClimateEntityFeature.SWING_MODE
-                | ClimateEntityFeature.TURN_OFF
-                | ClimateEntityFeature.TURN_ON
-            ),
-        )
-
-    def test_temperature_unit(self):
-        self.dps[UNIT_DPS] = "c"
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-        self.dps[UNIT_DPS] = "f"
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.FAHRENHEIT)
-
-    def test_minimum_target_temperature_f(self):
-        self.dps[UNIT_DPS] = "f"
-        self.assertEqual(self.subject.min_temp, 63)
-
-    def test_maximum_target_temperature_f(self):
-        self.dps[UNIT_DPS] = "f"
-        self.assertEqual(self.subject.max_temp, 86)
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 25
-        self.assertEqual(self.subject.current_temperature, 25)
-
-    def test_hvac_mode(self):
-        self.dps[POWER_DPS] = True
-        self.dps[HVACMODE_DPS] = "cold"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.COOL)
-
-        self.dps[HVACMODE_DPS] = "hot"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-        self.dps[HVACMODE_DPS] = "dehumidify"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.DRY)
-
-        self.dps[HVACMODE_DPS] = "cold"
-        self.dps[POWER_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(
-            self.subject.hvac_modes,
-            [
-                HVACMode.OFF,
-                HVACMode.COOL,
-                HVACMode.DRY,
-                HVACMode.HEAT,
-            ],
-        )
-
-    async def test_set_hvac_cool(self):
-        async with assert_device_properties_set(
-            self.subject._device, {POWER_DPS: True, HVACMODE_DPS: "cold"}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.COOL)
-
-    async def test_set_hvac_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {POWER_DPS: False}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    async def test_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device, {POWER_DPS: True}
-        ):
-            await self.subject.async_turn_on()
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {POWER_DPS: False}
-        ):
-            await self.subject.async_turn_off()
-
-    def test_fan_mode(self):
-        self.dps[FAN_DPS] = "low"
-        self.assertEqual(self.subject.fan_mode, "low")
-        self.dps[FAN_DPS] = "middle"
-        self.assertEqual(self.subject.fan_mode, "medium")
-        self.dps[FAN_DPS] = "high"
-        self.assertEqual(self.subject.fan_mode, "high")
-        self.dps[FAN_DPS] = "auto"
-        self.assertEqual(self.subject.fan_mode, "auto")
-
-    def test_fan_modes(self):
-        self.assertCountEqual(
-            self.subject.fan_modes,
-            [
-                "auto",
-                "low",
-                "medium",
-                "high",
-            ],
-        )
-
-    async def test_set_fan_mode_to_low(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: "low"},
-        ):
-            await self.subject.async_set_fan_mode("low")
-
-    async def test_set_fan_mode_to_medium(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: "middle"},
-        ):
-            await self.subject.async_set_fan_mode("medium")
-
-    async def test_set_fan_mode_to_high(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: "high"},
-        ):
-            await self.subject.async_set_fan_mode("high")
-
-    async def test_set_fan_mode_to_auto(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: "auto"},
-        ):
-            await self.subject.async_set_fan_mode("auto")
-
-    def test_swing_mode(self):
-        self.dps[SWING_DPS] = True
-        self.assertEqual(self.subject.swing_mode, SWING_VERTICAL)
-        self.dps[SWING_DPS] = False
-        self.assertEqual(self.subject.swing_mode, SWING_OFF)
-
-    def test_swing_modes(self):
-        self.assertCountEqual(
-            self.subject.swing_modes,
-            [
-                SWING_VERTICAL,
-                SWING_OFF,
-            ],
-        )
-
-    async def test_set_swing_mode_to_vertical(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWING_DPS: True},
-        ):
-            await self.subject.async_set_swing_mode(SWING_VERTICAL)
-
-    async def test_set_swing_mode_to_off(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWING_DPS: False},
-        ):
-            await self.subject.async_set_swing_mode(SWING_OFF)
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = True
-        self.assertEqual(self.subject.preset_mode, PRESET_SLEEP)
-        self.dps[PRESET_DPS] = False
-        self.assertEqual(self.subject.preset_mode, PRESET_COMFORT)
-
-    def test_preset_modes(self):
-        self.assertCountEqual(
-            self.subject.preset_modes,
-            [
-                PRESET_COMFORT,
-                PRESET_SLEEP,
-            ],
-        )
-
-    async def test_set_preset_mode_to_sleep(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: True},
-        ):
-            await self.subject.async_set_preset_mode(PRESET_SLEEP)
-
-    async def test_set_preset_mode_to_normal(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: False},
-        ):
-            await self.subject.async_set_preset_mode(PRESET_COMFORT)
-
-    def test_hvac_action(self):
-        self.dps[POWER_DPS] = True
-        self.dps[HVACACTION_DPS] = "heat_s"
-        self.assertEqual(self.subject.hvac_action, HVACAction.HEATING)
-
-        self.dps[HVACACTION_DPS] = "hot"
-        self.assertEqual(self.subject.hvac_action, HVACAction.HEATING)
-
-        self.dps[HVACACTION_DPS] = "heating"
-        self.assertEqual(self.subject.hvac_action, HVACAction.HEATING)
-
-        self.dps[HVACACTION_DPS] = "cool_s"
-        self.assertEqual(self.subject.hvac_action, HVACAction.COOLING)
-
-        self.dps[HVACACTION_DPS] = "cooling"
-        self.assertEqual(self.subject.hvac_action, HVACAction.COOLING)
-
-        self.dps[HVACACTION_DPS] = "anti-clockwise"
-        self.assertEqual(self.subject.hvac_action, HVACAction.FAN)
-
-        self.dps[HVACACTION_DPS] = "ventilation"
-        self.assertEqual(self.subject.hvac_action, HVACAction.FAN)
-
-        self.dps[HVACACTION_DPS] = "wind"
-        self.assertEqual(self.subject.hvac_action, HVACAction.FAN)
-
-        self.dps[HVACACTION_DPS] = "appointment"
-        self.assertEqual(self.subject.hvac_action, HVACAction.IDLE)
-
-        self.dps[HVACACTION_DPS] = "auto"
-        self.assertEqual(self.subject.hvac_action, HVACAction.IDLE)
-
-        self.dps[HVACACTION_DPS] = "auto_clean"
-        self.assertEqual(self.subject.hvac_action, HVACAction.IDLE)
-
-        self.dps[HVACACTION_DPS] = "eco"
-        self.assertEqual(self.subject.hvac_action, HVACAction.IDLE)
-
-        self.dps[HVACACTION_DPS] = "wet"
-        self.assertEqual(self.subject.hvac_action, HVACAction.DRYING)
-
-        self.dps[HVACACTION_DPS] = "off"
-        self.assertEqual(self.subject.hvac_action, HVACAction.IDLE)
-
-        self.dps[POWER_DPS] = False
-        self.assertEqual(self.subject.hvac_action, HVACAction.OFF)

+ 0 - 65
tests/devices/test_elko_cfmtb_thermostat.py

@@ -1,65 +0,0 @@
-from datetime import datetime, timezone
-
-from ..const import ELKO_CFMTB_THERMOSTAT_PAYLOAD
-from ..helpers import assert_device_properties_set
-from .base_device_tests import TuyaDeviceTestCase
-
-OVERRIDE_END_DPS = "108"
-
-
-class TestElkoCFMTBThermostat(TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig(
-            "elko_cfmtb_thermostat.yaml",
-            ELKO_CFMTB_THERMOSTAT_PAYLOAD,
-        )
-        self.subject = self.entities.get("datetime_override_end")
-        self.mark_secondary(
-            [
-                "number_power_rating",
-                "lock_child_lock",
-                "number_active_screen_brightness",
-                "number_standby_screen_brightness",
-                "sensor_external_sensor_type",
-                "sensor_device_type",
-                "sensor_floor_temperature",
-                "sensor_air_temperature",
-                "sensor_power",
-                "sensor_energy",
-                "datetime_override_end",
-                "number_heating_temperature",
-                "number_cooling_temperature",
-                "number_away_heating_reduction",
-                "number_away_cooling_reduction",
-                "number_away_minimum_temperature",
-                "number_away_maximum_temperature",
-                "switch_away",
-                "switch_schedule",
-                "binary_sensor_occupancy",
-                "binary_sensor_window",
-                "number_room_temperature_calibration",
-                "number_external_temperature_calibration",
-                "number_screen_timeout",
-                "switch_screen_timeout",
-                "switch_regulator_mode",
-            ]
-        )
-
-    def test_datetime_override_end(self):
-        self.dps[OVERRIDE_END_DPS] = (
-            1770465243 - datetime(2000, 1, 1, tzinfo=timezone.utc).timestamp()
-        )
-        self.assertEqual(
-            self.subject.native_value,
-            datetime(2026, 2, 7, 11, 54, 3, tzinfo=timezone.utc),
-        )
-
-    async def test_set_datetime_override_end(self):
-        MILLINIUM = datetime(2000, 1, 1, tzinfo=timezone.utc).timestamp()
-        async with assert_device_properties_set(
-            self.subject._device,
-            {OVERRIDE_END_DPS: 1770465243 - MILLINIUM},
-        ):
-            await self.subject.async_set_value(
-                datetime(2026, 2, 7, 11, 54, 3, tzinfo=timezone.utc)
-            )

+ 0 - 117
tests/devices/test_energy_monitoring_powerstrip.py

@@ -1,117 +0,0 @@
-"""Tests for the energy monitoring powerstrip."""
-
-from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass
-from homeassistant.components.switch import SwitchDeviceClass
-from homeassistant.const import (
-    UnitOfElectricCurrent,
-    UnitOfElectricPotential,
-    UnitOfPower,
-)
-
-from ..const import ENERGY_POWERSTRIP_PAYLOAD
-from ..mixins.sensor import MultiSensorTests
-from ..mixins.switch import MultiSwitchTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH1_DP = "1"
-SWITCH2_DP = "2"
-SWITCH3_DP = "3"
-SWITCH4_DP = "4"
-CURRENT_DP = "102"
-POWER_DP = "103"
-VOLTAGE_DP = "104"
-UNKNOWN105_DP = "105"
-UNKNOWN106_DP = "106"
-UNKNOWN107_DP = "107"
-UNKNOWN108_DP = "108"
-UNKNOWN109_DP = "109"
-
-
-class TestEnergyMonitoringPowerstrip(
-    MultiSensorTests,
-    MultiSwitchTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig(
-            "energy_monitoring_powerstrip.yaml", ENERGY_POWERSTRIP_PAYLOAD
-        )
-        self.setUpMultiSwitch(
-            [
-                {
-                    "dps": SWITCH1_DP,
-                    "name": "switch_switch_1",
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-                {
-                    "dps": SWITCH2_DP,
-                    "name": "switch_switch_2",
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-                {
-                    "dps": SWITCH3_DP,
-                    "name": "switch_switch_3",
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-                {
-                    "dps": SWITCH4_DP,
-                    "name": "switch_switch_4",
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-            ]
-        )
-        self.setUpMultiSensors(
-            [
-                {
-                    "name": "sensor_current",
-                    "dps": CURRENT_DP,
-                    "device_class": SensorDeviceClass.CURRENT,
-                    "unit": UnitOfElectricCurrent.MILLIAMPERE,
-                    "state_class": SensorStateClass.MEASUREMENT,
-                },
-                {
-                    "name": "sensor_power",
-                    "dps": POWER_DP,
-                    "device_class": SensorDeviceClass.POWER,
-                    "unit": UnitOfPower.WATT,
-                    "state_class": SensorStateClass.MEASUREMENT,
-                    "testdata": (1234, 123.4),
-                },
-                {
-                    "name": "sensor_voltage",
-                    "dps": VOLTAGE_DP,
-                    "device_class": SensorDeviceClass.VOLTAGE,
-                    "unit": UnitOfElectricPotential.VOLT,
-                    "state_class": SensorStateClass.MEASUREMENT,
-                    "testdata": (2345, 234.5),
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "sensor_current",
-                "sensor_power",
-                "sensor_voltage",
-            ]
-        )
-
-    def test_multi_switch_state_attributes(self):
-        self.dps[UNKNOWN105_DP] = 105
-        self.dps[UNKNOWN106_DP] = 106
-        self.dps[UNKNOWN107_DP] = 107
-        self.dps[UNKNOWN108_DP] = 108
-        self.dps[UNKNOWN109_DP] = 109
-        for k, v in self.multiSwitch.items():
-            if k == "switch_switch_1":
-                self.assertDictEqual(
-                    v.extra_state_attributes,
-                    {
-                        "unknown_105": 105,
-                        "unknown_106": 106,
-                        "unknown_107": 107,
-                        "unknown_108": 108,
-                        "unknown_109": 109,
-                    },
-                )
-            else:
-                self.assertEqual(v.extra_state_attributes, {})

+ 0 - 113
tests/devices/test_essentials_purifier.py

@@ -1,113 +0,0 @@
-"""Tests for the essentials air purifier."""
-
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.const import (
-    CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
-    PERCENTAGE,
-    UnitOfTime,
-)
-
-from ..const import ESSENTIALS_PURIFIER_PAYLOAD
-from ..mixins.button import BasicButtonTests
-from ..mixins.lock import BasicLockTests
-from ..mixins.select import MultiSelectTests
-from ..mixins.sensor import MultiSensorTests
-from ..mixins.switch import MultiSwitchTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DP = "1"
-PM25_DP = "2"
-MODE_DP = "3"
-FILTER_DP = "5"
-LOCK_DP = "7"
-UV_DP = "9"
-RESET_DP = "11"
-TIMER_DP = "18"
-COUNTDOWN_DP = "19"
-QUALITY_DP = "21"
-LIGHT_DP = "101"
-
-
-class TestEssentialsPurifier(
-    BasicButtonTests,
-    BasicLockTests,
-    MultiSelectTests,
-    MultiSensorTests,
-    MultiSwitchTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("essentials_purifier.yaml", ESSENTIALS_PURIFIER_PAYLOAD)
-        self.setUpBasicButton(
-            RESET_DP,
-            self.entities.get("button_filter_reset"),
-        )
-        self.setUpBasicLock(LOCK_DP, self.entities.get("lock_child_lock"))
-        self.setUpMultiSelect(
-            [
-                {
-                    "dps": LIGHT_DP,
-                    "name": "select_light",
-                    "options": {
-                        "Standard": "On",
-                        "Soft": "Soft",
-                        "Close": "Off",
-                    },
-                },
-                {
-                    "dps": TIMER_DP,
-                    "name": "select_timer",
-                    "options": {
-                        "cancel": "cancel",
-                        "2h": "2h",
-                        "4h": "4h",
-                        "8h": "8h",
-                    },
-                },
-            ]
-        )
-        self.setUpMultiSensors(
-            [
-                {
-                    "dps": FILTER_DP,
-                    "name": "sensor_active_filter_life",
-                    "unit": PERCENTAGE,
-                },
-                {
-                    "dps": COUNTDOWN_DP,
-                    "name": "sensor_time_remaining",
-                    "unit": UnitOfTime.MINUTES,
-                    "device_class": SensorDeviceClass.DURATION,
-                },
-                {
-                    "dps": PM25_DP,
-                    "name": "sensor_pm25",
-                    "unit": CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
-                    "device_class": SensorDeviceClass.PM25,
-                    "state_class": "measurement",
-                },
-                {
-                    "dps": QUALITY_DP,
-                    "name": "sensor_air_quality",
-                },
-            ]
-        )
-        self.setUpMultiSwitch(
-            [
-                {
-                    "dps": UV_DP,
-                    "name": "switch_uv_sterilization",
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "button_filter_reset",
-                "sensor_active_filter_life",
-                "lock_child_lock",
-                "select_light",
-                "switch_uv_sterilization",
-                "select_timer",
-                "sensor_time_remaining",
-            ]
-        )

+ 0 - 76
tests/devices/test_eurom_600_heater.py

@@ -1,76 +0,0 @@
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
-from homeassistant.const import UnitOfTemperature
-
-from ..const import EUROM_600_HEATER_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import BasicBinarySensorTests
-from ..mixins.climate import TargetTemperatureTests
-from .base_device_tests import TuyaDeviceTestCase
-
-HVACMODE_DPS = "1"
-TEMPERATURE_DPS = "2"
-CURRENTTEMP_DPS = "5"
-ERROR_DPS = "6"
-
-
-class TestEurom600Heater(
-    BasicBinarySensorTests, TargetTemperatureTests, TuyaDeviceTestCase
-):
-    def setUp(self):
-        self.setUpForConfig("eurom_600_heater.yaml", EUROM_600_HEATER_PAYLOAD)
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=0.0,
-            max=37.0,
-        )
-        self.setUpBasicBinarySensor(
-            ERROR_DPS,
-            self.entities.get("binary_sensor_problem"),
-            device_class=BinarySensorDeviceClass.PROBLEM,
-            testdata=(1, 0),
-        )
-        self.mark_secondary(["binary_sensor_problem"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            ClimateEntityFeature.TARGET_TEMPERATURE
-            | ClimateEntityFeature.TURN_OFF
-            | ClimateEntityFeature.TURN_ON,
-        )
-
-    def test_temperature_unit_returns_celsius(self):
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 25
-        self.assertEqual(self.subject.current_temperature, 25)
-
-    def test_hvac_mode(self):
-        self.dps[HVACMODE_DPS] = True
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-        self.dps[HVACMODE_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(self.subject.hvac_modes, [HVACMode.OFF, HVACMode.HEAT])
-
-    async def test_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: True}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT)
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: False}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    def test_basic_bsensor_extra_state_attributes(self):
-        self.dps[ERROR_DPS] = 2
-        self.assertEqual(self.basicBSensor.extra_state_attributes, {"fault_code": 2})

+ 0 - 76
tests/devices/test_eurom_600v2_heater.py

@@ -1,76 +0,0 @@
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
-from homeassistant.const import UnitOfTemperature
-
-from ..const import EUROM_600v2_HEATER_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import BasicBinarySensorTests
-from ..mixins.climate import TargetTemperatureTests
-from .base_device_tests import TuyaDeviceTestCase
-
-HVACMODE_DPS = "1"
-TEMPERATURE_DPS = "2"
-CURRENTTEMP_DPS = "5"
-ERROR_DPS = "7"
-
-
-class TestEurom600v2Heater(
-    BasicBinarySensorTests, TargetTemperatureTests, TuyaDeviceTestCase
-):
-    def setUp(self):
-        self.setUpForConfig("eurom_600_heater_v2.yaml", EUROM_600v2_HEATER_PAYLOAD)
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=0.0,
-            max=37.0,
-        )
-        self.setUpBasicBinarySensor(
-            ERROR_DPS,
-            self.entities.get("binary_sensor_problem"),
-            device_class=BinarySensorDeviceClass.PROBLEM,
-            testdata=(1, 0),
-        )
-        self.mark_secondary(["binary_sensor_problem"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            ClimateEntityFeature.TARGET_TEMPERATURE
-            | ClimateEntityFeature.TURN_OFF
-            | ClimateEntityFeature.TURN_ON,
-        )
-
-    def test_temperature_unit_returns_celsius(self):
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 25
-        self.assertEqual(self.subject.current_temperature, 25)
-
-    def test_hvac_mode(self):
-        self.dps[HVACMODE_DPS] = True
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-        self.dps[HVACMODE_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(self.subject.hvac_modes, [HVACMode.OFF, HVACMode.HEAT])
-
-    async def test_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: True}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT)
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: False}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    def test_basic_bsensor_extra_state_attributes(self):
-        self.dps[ERROR_DPS] = 2
-        self.assertEqual(self.basicBSensor.extra_state_attributes, {"fault_code": 2})

+ 0 - 116
tests/devices/test_eurom_601_heater.py

@@ -1,116 +0,0 @@
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.climate.const import (
-    PRESET_COMFORT,
-    PRESET_ECO,
-    ClimateEntityFeature,
-    HVACMode,
-)
-from homeassistant.const import UnitOfTemperature
-
-from ..const import EUROM_601_HEATER_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import BasicBinarySensorTests
-from ..mixins.climate import TargetTemperatureTests
-from .base_device_tests import TuyaDeviceTestCase
-
-HVACMODE_DPS = "1"
-TEMPERATURE_DPS = "2"
-CURRENTTEMP_DPS = "3"
-PRESET_DPS = "6"
-ERROR_DPS = "13"
-
-
-class TestEurom601Heater(
-    BasicBinarySensorTests, TargetTemperatureTests, TuyaDeviceTestCase
-):
-    def setUp(self):
-        self.setUpForConfig("eurom_601_heater.yaml", EUROM_601_HEATER_PAYLOAD)
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=0.0,
-            max=37.0,
-        )
-        self.setUpBasicBinarySensor(
-            ERROR_DPS,
-            self.entities.get("binary_sensor_problem"),
-            device_class=BinarySensorDeviceClass.PROBLEM,
-            testdata=(1, 0),
-        )
-        self.mark_secondary(["binary_sensor_problem"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                ClimateEntityFeature.TARGET_TEMPERATURE
-                | ClimateEntityFeature.PRESET_MODE
-                | ClimateEntityFeature.TURN_OFF
-                | ClimateEntityFeature.TURN_ON
-            ),
-        )
-
-    def test_temperature_unit_returns_celsius(self):
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 25
-        self.assertEqual(self.subject.current_temperature, 25)
-
-    def test_hvac_mode(self):
-        self.dps[HVACMODE_DPS] = True
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-        self.dps[HVACMODE_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(self.subject.hvac_modes, [HVACMode.OFF, HVACMode.HEAT])
-
-    async def test_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: True}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT)
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: False}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    def test_preset_modes(self):
-        self.assertCountEqual(
-            self.subject.preset_modes,
-            [PRESET_COMFORT, PRESET_ECO],
-        )
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = True
-        self.assertEqual(self.subject.preset_mode, PRESET_ECO)
-
-        self.dps[PRESET_DPS] = False
-        self.assertEqual(self.subject.preset_mode, PRESET_COMFORT)
-
-    async def test_set_preset_more_to_eco(self):
-        async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: True}
-        ):
-            await self.subject.async_set_preset_mode(PRESET_ECO)
-
-    async def test_set_preset_more_to_comfort(self):
-        async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: False}
-        ):
-            await self.subject.async_set_preset_mode(PRESET_COMFORT)
-
-    def test_extra_state_attributes(self):
-        self.assertCountEqual(
-            self.subject.extra_state_attributes,
-            {},
-        )
-
-    def test_basic_bsensor_extra_state_attributes(self):
-        self.dps[ERROR_DPS] = 2
-        self.assertEqual(self.basicBSensor.extra_state_attributes, {"fault_code": 2})

+ 0 - 85
tests/devices/test_garage_door_opener.py

@@ -1,85 +0,0 @@
-"""Tests for the simple garage door opener."""
-
-from homeassistant.components.cover import CoverDeviceClass, CoverEntityFeature
-
-from ..const import SIMPLE_GARAGE_DOOR_PAYLOAD
-from ..helpers import assert_device_properties_set
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-OPEN_DPS = "101"
-
-
-class TestSimpleGarageOpener(TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("garage_door_opener.yaml", SIMPLE_GARAGE_DOOR_PAYLOAD)
-        self.subject = self.entities["cover_garage"]
-
-    def test_device_class_is_garage(self):
-        self.assertEqual(self.subject.device_class, CoverDeviceClass.GARAGE)
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            CoverEntityFeature.OPEN | CoverEntityFeature.CLOSE,
-        )
-
-    def test_current_cover_position(self):
-        self.dps[OPEN_DPS] = True
-        self.assertEqual(self.subject.current_cover_position, 100)
-        self.dps[OPEN_DPS] = False
-        self.assertEqual(self.subject.current_cover_position, 0)
-
-    def test_is_opening(self):
-        self.dps[SWITCH_DPS] = False
-        self.dps[OPEN_DPS] = False
-        self.assertFalse(self.subject.is_opening)
-        self.dps[OPEN_DPS] = True
-        self.assertFalse(self.subject.is_opening)
-        self.dps[SWITCH_DPS] = True
-        self.assertFalse(self.subject.is_opening)
-        self.dps[OPEN_DPS] = False
-        self.assertFalse(self.subject.is_opening)
-
-    def test_is_closing(self):
-        self.dps[SWITCH_DPS] = False
-        self.dps[OPEN_DPS] = False
-        self.assertFalse(self.subject.is_closing)
-        self.dps[OPEN_DPS] = True
-        self.assertFalse(self.subject.is_closing)
-        self.dps[SWITCH_DPS] = True
-        self.assertFalse(self.subject.is_closing)
-        self.dps[OPEN_DPS] = False
-        self.assertFalse(self.subject.is_closing)
-
-    def test_is_closed(self):
-        self.dps[SWITCH_DPS] = False
-        self.dps[OPEN_DPS] = True
-        self.assertFalse(self.subject.is_closed)
-        self.dps[OPEN_DPS] = False
-        self.assertTrue(self.subject.is_closed)
-
-    async def test_open_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWITCH_DPS: True},
-        ):
-            await self.subject.async_open_cover()
-
-    async def test_close_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWITCH_DPS: False},
-        ):
-            await self.subject.async_close_cover()
-
-    async def test_set_cover_position_not_supported(self):
-        with self.assertRaises(NotImplementedError):
-            await self.subject.async_set_cover_position(50)
-
-    async def test_stop_cover_not_supported(self):
-        with self.assertRaises(NotImplementedError):
-            await self.subject.async_stop_cover()
-
-    def test_extra_state_attributes(self):
-        self.assertEqual(self.subject.extra_state_attributes, {})

+ 0 - 148
tests/devices/test_goldair_fan.py

@@ -1,148 +0,0 @@
-from homeassistant.components.fan import FanEntityFeature
-
-from ..const import FAN_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.light import BasicLightTests
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-FANMODE_DPS = "2"
-PRESET_DPS = "3"
-SWING_DPS = "8"
-TIMER_DPS = "11"
-LIGHT_DPS = "101"
-
-
-class TestGoldairFan(BasicLightTests, SwitchableTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("goldair_fan.yaml", FAN_PAYLOAD)
-        self.subject = self.entities.get("fan")
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.setUpBasicLight(LIGHT_DPS, self.entities.get("light_display"))
-        self.mark_secondary(["light_display"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                FanEntityFeature.OSCILLATE
-                | FanEntityFeature.PRESET_MODE
-                | FanEntityFeature.SET_SPEED
-                | FanEntityFeature.TURN_ON
-                | FanEntityFeature.TURN_OFF
-            ),
-        )
-
-    def test_is_on(self):
-        self.dps[SWITCH_DPS] = True
-        self.assertTrue(self.subject.is_on)
-
-        self.dps[SWITCH_DPS] = False
-        self.assertFalse(self.subject.is_on)
-
-    async def test_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device, {SWITCH_DPS: True}
-        ):
-            await self.subject.async_turn_on()
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {SWITCH_DPS: False}
-        ):
-            await self.subject.async_turn_off()
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = "normal"
-        self.assertEqual(self.subject.preset_mode, "normal")
-
-        self.dps[PRESET_DPS] = "nature"
-        self.assertEqual(self.subject.preset_mode, "nature")
-
-        self.dps[PRESET_DPS] = "sleep"
-        self.assertEqual(self.subject.preset_mode, "sleep")
-
-    def test_preset_modes(self):
-        self.assertCountEqual(self.subject.preset_modes, ["normal", "nature", "sleep"])
-
-    async def test_set_preset_mode_to_normal(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "normal"},
-        ):
-            await self.subject.async_set_preset_mode("normal")
-
-    async def test_set_preset_mode_to_nature(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "nature"},
-        ):
-            await self.subject.async_set_preset_mode("nature")
-
-    async def test_set_preset_mode_to_sleep(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "sleep"},
-        ):
-            await self.subject.async_set_preset_mode("sleep")
-
-    def test_swing_mode(self):
-        self.dps[SWING_DPS] = False
-        self.assertFalse(self.subject.oscillating)
-
-        self.dps[SWING_DPS] = True
-        self.assertTrue(self.subject.oscillating)
-
-        self.dps[SWING_DPS] = None
-        self.assertFalse(self.subject.oscillating)
-
-    async def test_oscillate_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {SWING_DPS: False}
-        ):
-            await self.subject.async_oscillate(False)
-
-    async def test_oscillate_on(self):
-        async with assert_device_properties_set(
-            self.subject._device, {SWING_DPS: True}
-        ):
-            await self.subject.async_oscillate(True)
-
-    def test_speed(self):
-        self.dps[PRESET_DPS] = "normal"
-        self.dps[FANMODE_DPS] = 6
-        self.assertEqual(self.subject.percentage, 50)
-
-    async def test_set_speed_in_normal_mode(self):
-        self.dps[PRESET_DPS] = "normal"
-        self.dps[SWITCH_DPS] = True
-        async with assert_device_properties_set(self.subject._device, {FANMODE_DPS: 3}):
-            await self.subject.async_set_percentage(25)
-
-    async def test_set_speed_in_normal_mode_snaps(self):
-        self.dps[PRESET_DPS] = "normal"
-        self.dps[SWITCH_DPS] = True
-        async with assert_device_properties_set(
-            self.subject._device, {FANMODE_DPS: 10}
-        ):
-            await self.subject.async_set_percentage(80)
-
-    async def test_set_speed_in_sleep_mode_while_off_snaps_and_turns_on(self):
-        self.dps[PRESET_DPS] = "sleep"
-        self.dps[SWITCH_DPS] = False
-        async with assert_device_properties_set(
-            self.subject._device, {FANMODE_DPS: 8, SWITCH_DPS: True}
-        ):
-            await self.subject.async_set_percentage(75)
-
-    async def test_set_speed_to_zero_turns_off(self):
-        self.dps[SWITCH_DPS] = True
-        async with assert_device_properties_set(
-            self.subject._device, {SWITCH_DPS: False}
-        ):
-            await self.subject.async_set_percentage(0)
-
-    def test_extra_state_attributes(self):
-        self.dps[TIMER_DPS] = "5"
-        self.assertEqual(self.subject.extra_state_attributes, {"timer": "5"})

+ 0 - 102
tests/devices/test_goldair_geco_heater.py

@@ -1,102 +0,0 @@
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
-from homeassistant.components.number import NumberDeviceClass
-from homeassistant.const import UnitOfTemperature, UnitOfTime
-
-from ..const import GECO_HEATER_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import BasicBinarySensorTests
-from ..mixins.climate import TargetTemperatureTests
-from ..mixins.lock import BasicLockTests
-from ..mixins.number import BasicNumberTests
-from .base_device_tests import TuyaDeviceTestCase
-
-HVACMODE_DPS = "1"
-LOCK_DPS = "2"
-TEMPERATURE_DPS = "3"
-CURRENTTEMP_DPS = "4"
-TIMER_DPS = "5"
-ERROR_DPS = "6"
-
-
-class TestGoldairGECOHeater(
-    BasicBinarySensorTests,
-    BasicLockTests,
-    BasicNumberTests,
-    TargetTemperatureTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("goldair_geco_heater.yaml", GECO_HEATER_PAYLOAD)
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=15.0,
-            max=35.0,
-        )
-        self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock"))
-        self.setUpBasicNumber(
-            TIMER_DPS,
-            self.entities.get("number_timer"),
-            max=24,
-            device_class=NumberDeviceClass.DURATION,
-            unit=UnitOfTime.HOURS,
-        )
-        self.setUpBasicBinarySensor(
-            ERROR_DPS,
-            self.entities.get("binary_sensor_problem"),
-            device_class=BinarySensorDeviceClass.PROBLEM,
-            testdata=(1, 0),
-        )
-        self.mark_secondary(
-            [
-                "lock_child_lock",
-                "number_timer",
-                "binary_sensor_problem",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            ClimateEntityFeature.TARGET_TEMPERATURE
-            | ClimateEntityFeature.TURN_OFF
-            | ClimateEntityFeature.TURN_ON,
-        )
-
-    def test_temperature_unit_returns_celsius(self):
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 25
-        self.assertEqual(self.subject.current_temperature, 25)
-
-    def test_hvac_mode(self):
-        self.dps[HVACMODE_DPS] = True
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-        self.dps[HVACMODE_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(self.subject.hvac_modes, [HVACMode.OFF, HVACMode.HEAT])
-
-    async def test_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: True}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT)
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: False}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    def test_basic_bsensor_extra_state_attributes(self):
-        self.dps[ERROR_DPS] = 2
-        self.assertDictEqual(
-            self.basicBSensor.extra_state_attributes,
-            {"fault_code": 2},
-        )

+ 0 - 319
tests/devices/test_goldair_gpph_heater.py

@@ -1,319 +0,0 @@
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
-from homeassistant.const import (
-    PERCENTAGE,
-    PRECISION_WHOLE,
-    UnitOfTemperature,
-)
-
-from ..const import GPPH_HEATER_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import BasicBinarySensorTests
-from ..mixins.climate import TargetTemperatureTests
-from ..mixins.light import BasicLightTests
-from ..mixins.lock import BasicLockTests
-from ..mixins.sensor import BasicSensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-HVACMODE_DPS = "1"
-TEMPERATURE_DPS = "2"
-CURRENTTEMP_DPS = "3"
-PRESET_DPS = "4"
-LOCK_DPS = "6"
-ERROR_DPS = "12"
-POWERLEVEL_DPS = "101"
-TIMER_DPS = "102"
-TIMERACT_DPS = "103"
-LIGHT_DPS = "104"
-SWING_DPS = "105"
-ECOTEMP_DPS = "106"
-
-
-class TestGoldairHeater(
-    BasicBinarySensorTests,
-    BasicLightTests,
-    BasicLockTests,
-    BasicSensorTests,
-    TargetTemperatureTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("goldair_gpph_heater.yaml", GPPH_HEATER_PAYLOAD)
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=5.0,
-            max=35.0,
-        )
-        self.setUpBasicLight(LIGHT_DPS, self.entities.get("light_display"))
-        self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock"))
-        self.setUpBasicSensor(
-            POWERLEVEL_DPS,
-            self.entities.get("sensor_power_level"),
-            unit=PERCENTAGE,
-            testdata=("2", 40),
-        )
-        self.setUpBasicBinarySensor(
-            ERROR_DPS,
-            self.entities.get("binary_sensor_problem"),
-            device_class=BinarySensorDeviceClass.PROBLEM,
-            testdata=(1, 0),
-        )
-        self.mark_secondary(
-            [
-                "binary_sensor_problem",
-                "light_display",
-                "lock_child_lock",
-                "sensor_power_level",
-                "time_timer",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                ClimateEntityFeature.TARGET_TEMPERATURE
-                | ClimateEntityFeature.PRESET_MODE
-                | ClimateEntityFeature.SWING_MODE
-                | ClimateEntityFeature.TURN_OFF
-                | ClimateEntityFeature.TURN_ON
-            ),
-        )
-
-    def test_translation_key(self):
-        self.assertEqual(self.subject.translation_key, "swing_as_powerlevel")
-
-    def test_temperature_unit_returns_celsius(self):
-        self.assertEqual(
-            self.subject.temperature_unit,
-            UnitOfTemperature.CELSIUS,
-        )
-
-    def test_precision(self):
-        self.assertEqual(self.subject.precision, PRECISION_WHOLE)
-
-    def test_target_temperature_in_eco_and_af_modes(self):
-        self.dps[TEMPERATURE_DPS] = 25
-        self.dps[ECOTEMP_DPS] = 15
-
-        self.dps[PRESET_DPS] = "ECO"
-        self.assertEqual(self.subject.target_temperature, 15)
-
-        self.dps[PRESET_DPS] = "AF"
-        self.assertIs(self.subject.target_temperature, None)
-
-    def test_minimum_temperature(self):
-        self.dps[PRESET_DPS] = "C"
-        self.assertEqual(self.subject.min_temp, 5.0)
-
-        self.dps[PRESET_DPS] = "ECO"
-        self.assertEqual(self.subject.min_temp, 5.0)
-
-        self.dps[PRESET_DPS] = "AF"
-        self.assertEqual(self.subject.min_temp, 5.0)
-
-    def test_maximum_target_temperature(self):
-        self.dps[PRESET_DPS] = "C"
-        self.assertEqual(self.subject.max_temp, 35.0)
-
-        self.dps[PRESET_DPS] = "ECO"
-        self.assertEqual(self.subject.max_temp, 21.0)
-
-        self.dps[PRESET_DPS] = "AF"
-        self.assertEqual(self.subject.max_temp, 5.0)
-
-    async def test_legacy_set_temperature_with_preset_mode(self):
-        async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: "C"}
-        ):
-            await self.subject.async_set_temperature(preset_mode="comfort")
-
-    async def test_legacy_set_temperature_with_both_properties(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                TEMPERATURE_DPS: 25,
-                PRESET_DPS: "C",
-            },
-        ):
-            await self.subject.async_set_temperature(
-                temperature=25, preset_mode="comfort"
-            )
-
-    async def test_set_target_temperature_in_eco_mode(self):
-        self.dps[PRESET_DPS] = "ECO"
-
-        async with assert_device_properties_set(
-            self.subject._device, {ECOTEMP_DPS: 15}
-        ):
-            await self.subject.async_set_target_temperature(15)
-
-    async def test_set_target_temperature_fails_outside_valid_range_in_eco(
-        self,
-    ):
-        self.dps[PRESET_DPS] = "ECO"
-
-        with self.assertRaisesRegex(
-            ValueError, "eco_temperature \\(4\\) must be between 5.0 and 21.0"
-        ):
-            await self.subject.async_set_target_temperature(4)
-
-        with self.assertRaisesRegex(
-            ValueError, "eco_temperature \\(22\\) must be between 5.0 and 21.0"
-        ):
-            await self.subject.async_set_target_temperature(22)
-
-    async def test_set_target_temperature_fails_in_anti_freeze(self):
-        self.dps[PRESET_DPS] = "AF"
-
-        with self.assertRaisesRegex(
-            AttributeError, "temperature cannot be set at this time"
-        ):
-            await self.subject.async_set_target_temperature(25)
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 25
-        self.assertEqual(self.subject.current_temperature, 25)
-
-    def test_humidity_unsupported(self):
-        self.assertIsNone(self.subject.min_humidity)
-        self.assertIsNone(self.subject.max_humidity)
-        self.assertIsNone(self.subject.current_humidity)
-        with self.assertRaises(NotImplementedError):
-            self.subject.target_humidity  # noqa: B018
-
-    async def test_set_humidity_unsupported(self):
-        with self.assertRaises(NotImplementedError):
-            await self.subject.async_set_humidity(50)
-
-    def test_hvac_mode(self):
-        self.dps[HVACMODE_DPS] = True
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-        self.dps[HVACMODE_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(
-            self.subject.hvac_modes,
-            [HVACMode.OFF, HVACMode.HEAT],
-        )
-
-    async def test_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: True}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT)
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: False}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = "C"
-        self.assertEqual(self.subject.preset_mode, "comfort")
-
-        self.dps[PRESET_DPS] = "ECO"
-        self.assertEqual(self.subject.preset_mode, "eco")
-
-        self.dps[PRESET_DPS] = "AF"
-        self.assertEqual(self.subject.preset_mode, "away")
-
-        self.dps[PRESET_DPS] = None
-        self.assertIs(self.subject.preset_mode, None)
-
-    def test_preset_modes(self):
-        self.assertCountEqual(
-            self.subject.preset_modes,
-            ["comfort", "eco", "away"],
-        )
-
-    async def test_set_preset_mode_to_comfort(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "C"},
-        ):
-            await self.subject.async_set_preset_mode("comfort")
-
-    async def test_set_preset_mode_to_eco(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "ECO"},
-        ):
-            await self.subject.async_set_preset_mode("eco")
-
-    async def test_set_preset_mode_to_anti_freeze(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "AF"},
-        ):
-            await self.subject.async_set_preset_mode("away")
-
-    def test_power_level_returns_user_power_level(self):
-        self.dps[SWING_DPS] = "user"
-
-        self.dps[POWERLEVEL_DPS] = "stop"
-        self.assertEqual(self.subject.swing_mode, "stop")
-
-        self.dps[POWERLEVEL_DPS] = "3"
-        self.assertEqual(self.subject.swing_mode, "3")
-
-    def test_non_user_swing_mode(self):
-        self.dps[SWING_DPS] = "stop"
-        self.assertEqual(self.subject.swing_mode, "stop")
-
-        self.dps[SWING_DPS] = "auto"
-        self.assertEqual(self.subject.swing_mode, "auto")
-
-        self.dps[SWING_DPS] = None
-        self.assertIs(self.subject.swing_mode, None)
-
-    def test_swing_modes(self):
-        self.assertCountEqual(
-            self.subject.swing_modes,
-            ["stop", "1", "2", "3", "4", "5", "auto"],
-        )
-
-    async def test_set_power_level_to_stop(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWERLEVEL_DPS: "stop", SWING_DPS: "stop"},
-        ):
-            await self.subject.async_set_swing_mode("stop")
-
-    async def test_set_swing_mode_to_auto(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWING_DPS: "auto"},
-        ):
-            await self.subject.async_set_swing_mode("auto")
-
-    async def test_set_power_level_to_numeric_value(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWING_DPS: "user", POWERLEVEL_DPS: "3"},
-        ):
-            await self.subject.async_set_swing_mode("3")
-
-    def test_extra_state_attributes(self):
-        self.dps[TIMERACT_DPS] = True
-        self.dps[POWERLEVEL_DPS] = 4
-
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {
-                "timer_mode": True,
-                "power_level": "4",
-            },
-        )
-
-    def test_basic_bsensor_extra_state_attributes(self):
-        self.dps[ERROR_DPS] = 1
-        self.assertDictEqual(
-            self.basicBSensor.extra_state_attributes,
-            {"fault_code": 1},
-        )

+ 0 - 136
tests/devices/test_goldair_portable_airconditioner.py

@@ -1,136 +0,0 @@
-from homeassistant.components.climate.const import (
-    SWING_OFF,
-    SWING_ON,
-)
-
-from ..const import GOLDAIR_PORTABLE_AIR_CONDITIONER_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.climate import TargetTemperatureTests
-from .base_device_tests import TuyaDeviceTestCase
-
-POWER_DP = "1"
-TEMPERATURE_DP = "2"
-CURRENT_TEMPERATURE_DP = "3"
-MODE_DP = "4"
-FANMODE_DP = "5"
-IONIZER_DP = "11"
-SWINGV_DP = "15"
-FAULT_DP = "20"
-SLEEP_DP = "103"
-ONTIMER_DP = "104"
-OFFTIMER_DP = "105"
-TEMPF_DP = "107"
-CURTEMPF_DP = "108"
-FEATURE_DP = "109"
-SWINGH_DP = "110"
-
-
-class TestGoldairPortableAir(TargetTemperatureTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig(
-            "goldair_portable_airconditioner.yaml",
-            GOLDAIR_PORTABLE_AIR_CONDITIONER_PAYLOAD,
-        )
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DP,
-            self.subject,
-            min=16.0,
-            max=31.0,
-        )
-        self.mark_secondary(
-            [
-                "binary_sensor_problem",
-                "binary_sensor_tank_full",
-                "number_on_timer",
-                "number_off_timer",
-                "time_on_timer",
-                "time_off_timer",
-            ],
-        )
-
-    def test_swing_modes_with_vswing_unavailable(self):
-        self.dps[FEATURE_DP] = 26
-        # config should arrange for hswing to move to swing_mode in this case
-        self.assertCountEqual(self.subject.swing_horizontal_modes, [])
-        self.assertCountEqual(self.subject.swing_modes, [SWING_OFF, SWING_ON])
-
-    def test_swing_modes_with_vswing_available(self):
-        self.dps[FEATURE_DP] = 27
-        self.assertCountEqual(self.subject.swing_modes, [SWING_OFF, SWING_ON])
-        self.assertCountEqual(
-            self.subject.swing_horizontal_modes, [SWING_OFF, SWING_ON]
-        )
-
-    def test_swing(self):
-        self.dps[FEATURE_DP] = 27
-        self.dps[SWINGV_DP] = "on"
-        self.dps[SWINGH_DP] = True
-        self.assertEqual(self.subject.swing_mode, SWING_ON)
-        self.assertEqual(self.subject.swing_horizontal_mode, SWING_ON)
-        self.dps[SWINGV_DP] = "off"
-        self.assertEqual(self.subject.swing_mode, SWING_OFF)
-        self.assertEqual(self.subject.swing_horizontal_mode, SWING_ON)
-        self.dps[SWINGH_DP] = False
-        self.assertEqual(self.subject.swing_horizontal_mode, SWING_OFF)
-
-    def test_swing_with_vswing_unavailable(self):
-        self.dps[FEATURE_DP] = 26
-        self.dps[SWINGV_DP] = "off"
-        self.dps[SWINGH_DP] = True
-        self.assertEqual(self.subject.swing_mode, SWING_ON)
-        self.dps[SWINGV_DP] = "on"
-        self.dps[SWINGH_DP] = False
-        self.assertEqual(self.subject.swing_mode, SWING_OFF)
-
-    async def test_set_swing_modes(self):
-        self.dps[FEATURE_DP] = 27
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                SWINGV_DP: "on",
-            },
-        ):
-            await self.subject.async_set_swing_mode(SWING_ON)
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                SWINGV_DP: "off",
-            },
-        ):
-            await self.subject.async_set_swing_mode(SWING_OFF)
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                SWINGH_DP: True,
-            },
-        ):
-            await self.subject.async_set_swing_horizontal_mode(SWING_ON)
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                SWINGH_DP: False,
-            },
-        ):
-            await self.subject.async_set_swing_horizontal_mode(SWING_OFF)
-
-    async def test_set_swing_modes_only_hswing(self):
-        self.dps[FEATURE_DP] = 26
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                SWINGH_DP: True,
-            },
-        ):
-            await self.subject.async_set_swing_mode(SWING_ON)
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                SWINGH_DP: False,
-            },
-        ):
-            await self.subject.async_set_swing_mode(SWING_OFF)
-
-    def test_available(self):
-        """Override the base class, as this has availability logic."""
-        pass

+ 0 - 159
tests/devices/test_grid_connect_double_power_point.py

@@ -1,159 +0,0 @@
-"""Tests for the switch entity."""
-
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.components.switch import SwitchDeviceClass
-from homeassistant.const import (
-    UnitOfElectricCurrent,
-    UnitOfElectricPotential,
-    UnitOfEnergy,
-    UnitOfPower,
-)
-
-from ..const import GRIDCONNECT_2SOCKET_PAYLOAD
-from ..mixins.lock import BasicLockTests
-from ..mixins.select import BasicSelectTests
-from ..mixins.sensor import MultiSensorTests
-from ..mixins.switch import MultiSwitchTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH1_DPS = "1"
-SWITCH2_DPS = "2"
-COUNTDOWN1_DPS = "9"
-COUNTDOWN2_DPS = "10"
-ENERGY_DPS = "17"
-CURRENT_DPS = "18"
-POWER_DPS = "19"
-VOLTAGE_DPS = "20"
-TEST_DPS = "21"
-CALIBV_DPS = "22"
-CALIBA_DPS = "23"
-CALIBW_DPS = "24"
-CALIBE_DPS = "25"
-INITIAL_DPS = "38"
-LOCK_DPS = "40"
-MASTER_DPS = "101"
-
-
-class TestGridConnectDoubleSwitch(
-    BasicLockTests,
-    BasicSelectTests,
-    MultiSensorTests,
-    MultiSwitchTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig(
-            "grid_connect_usb_double_power_point.yaml",
-            GRIDCONNECT_2SOCKET_PAYLOAD,
-        )
-        self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock"))
-        self.setUpBasicSelect(
-            INITIAL_DPS,
-            self.entities.get("select_initial_state"),
-            {
-                "on": "on",
-                "off": "off",
-                "memory": "memory",
-            },
-        )
-        # Master switch must go last, otherwise its tests interfere with
-        # the tests for the other switches since it overrides them.
-        # Tests for the specific override behaviour are below.
-        self.setUpMultiSwitch(
-            [
-                {
-                    "name": "switch_outlet_1",
-                    "dps": SWITCH1_DPS,
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-                {
-                    "name": "switch_outlet_2",
-                    "dps": SWITCH2_DPS,
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-                {
-                    "name": "switch_master",
-                    "dps": MASTER_DPS,
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-            ]
-        )
-        self.setUpMultiSensors(
-            [
-                {
-                    "name": "sensor_energy",
-                    "dps": ENERGY_DPS,
-                    "unit": UnitOfEnergy.WATT_HOUR,
-                    "state_class": "measurement",
-                },
-                {
-                    "name": "sensor_current",
-                    "dps": CURRENT_DPS,
-                    "device_class": SensorDeviceClass.CURRENT,
-                    "unit": UnitOfElectricCurrent.MILLIAMPERE,
-                    "state_class": "measurement",
-                },
-                {
-                    "name": "sensor_power",
-                    "dps": POWER_DPS,
-                    "device_class": SensorDeviceClass.POWER,
-                    "unit": UnitOfPower.WATT,
-                    "state_class": "measurement",
-                    "testdata": (1234, 123.4),
-                },
-                {
-                    "name": "sensor_voltage",
-                    "dps": VOLTAGE_DPS,
-                    "device_class": SensorDeviceClass.VOLTAGE,
-                    "unit": UnitOfElectricPotential.VOLT,
-                    "state_class": "measurement",
-                    "testdata": (2345, 234.5),
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "lock_child_lock",
-                "select_initial_state",
-                "switch_master",
-                "sensor_energy",
-                "sensor_current",
-                "sensor_power",
-                "sensor_voltage",
-                "time_timer_1",
-                "time_timer_2",
-            ],
-        )
-
-    # Since we have attributes, override the default test which expects none.
-    def test_multi_switch_state_attributes(self):
-        self.dps[TEST_DPS] = 21
-        self.assertDictEqual(
-            self.multiSwitch["switch_master"].extra_state_attributes,
-            {
-                "test_bit": 21,
-            },
-        )
-
-    def test_multi_sensor_extra_state_attributes(self):
-        self.dps[CALIBA_DPS] = 1
-        self.dps[CALIBE_DPS] = 2
-        self.dps[CALIBV_DPS] = 3
-        self.dps[CALIBW_DPS] = 4
-
-        self.assertDictEqual(
-            self.multiSensor["sensor_current"].extra_state_attributes,
-            {"calibration": 1},
-        )
-        self.assertDictEqual(
-            self.multiSensor["sensor_energy"].extra_state_attributes,
-            {"calibration": 2},
-        )
-        self.assertDictEqual(
-            self.multiSensor["sensor_voltage"].extra_state_attributes,
-            {"calibration": 3},
-        )
-        self.assertDictEqual(
-            self.multiSensor["sensor_power"].extra_state_attributes,
-            {"calibration": 4},
-        )

+ 0 - 65
tests/devices/test_gx_aroma_diffuser.py

@@ -1,65 +0,0 @@
-# Test the multi-model config for YYM/GX aroma diffusers - specifically
-# the conditional mapping of fan speed to either high/low or large/small.
-from ..const import GX_AROMA_PAYLOAD
-from ..helpers import assert_device_properties_set
-from .base_device_tests import TuyaDeviceTestCase
-
-FANSWITCH_DP = "1"
-FANSPEED_DP = "2"
-TIMER_DP = "3"
-REMAIN_DP = "4"
-LIGHTSWITCHDP = "5"
-LIGHTMODE_DP = "6"
-LIGHTCOLOR_DP = "8"
-ERROR_DP = "9"
-
-
-class TestAromaDiffuser(TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("yym_805SW_aroma_nightlight.yaml", GX_AROMA_PAYLOAD)
-        self.subject = self.entities["fan_aroma_diffuser"]
-        self.mark_secondary(["select_timer", "binary_sensor_problem"])
-
-    def test_speed_step(self):
-        # YYM diffuser
-        self.dps[FANSPEED_DP] = "large"
-        self.assertEqual(self.subject.percentage_step, 50)
-        self.assertEqual(self.subject.speed_count, 2)
-        self.dps[FANSPEED_DP] = "small"
-        self.assertEqual(self.subject.percentage_step, 50)
-        self.assertEqual(self.subject.speed_count, 2)
-        # GX diffuser
-        self.dps[FANSPEED_DP] = "high"
-        self.assertEqual(self.subject.percentage_step, 50)
-        self.assertEqual(self.subject.speed_count, 2)
-        self.dps[FANSPEED_DP] = "high"
-        self.assertEqual(self.subject.percentage_step, 50)
-        self.assertEqual(self.subject.speed_count, 2)
-
-    def test_speed(self):
-        # YYM diffuser
-        self.dps[FANSPEED_DP] = "large"
-        self.assertEqual(self.subject.percentage, 100)
-        self.dps[FANSPEED_DP] = "small"
-        self.assertEqual(self.subject.percentage, 50)
-        # GX diffuser
-        self.dps[FANSPEED_DP] = "high"
-        self.assertEqual(self.subject.percentage, 100)
-        self.dps[FANSPEED_DP] = "low"
-        self.assertEqual(self.subject.percentage, 50)
-
-    async def test_set_fan_speed_yym(self):
-        self.dps[FANSPEED_DP] = "large"
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FANSPEED_DP: "small"},
-        ):
-            await self.subject.async_set_percentage(50)
-
-    async def test_set_fan_speed_gx(self):
-        self.dps[FANSPEED_DP] = "high"
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FANSPEED_DP: "low"},
-        ):
-            await self.subject.async_set_percentage(50)

+ 0 - 104
tests/devices/test_himox_h05_purifier.py

@@ -1,104 +0,0 @@
-from homeassistant.components.fan import FanEntityFeature
-from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass
-from homeassistant.const import PERCENTAGE, UnitOfTemperature
-
-from ..const import HIMOX_H05_PURIFIER_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.button import BasicButtonTests
-from ..mixins.lock import BasicLockTests
-from ..mixins.select import BasicSelectTests
-from ..mixins.sensor import MultiSensorTests
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-TEMP_DPS = "2"
-PRESET_DPS = "4"
-FILTER_DPS = "5"
-LOCK_DPS = "7"
-RESET_DPS = "11"
-TIMER_DPS = "18"
-AQI_DPS = "21"
-
-
-class TestHimoxH05Purifier(
-    BasicButtonTests,
-    BasicLockTests,
-    BasicSelectTests,
-    MultiSensorTests,
-    SwitchableTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("himox_h05_purifier.yaml", HIMOX_H05_PURIFIER_PAYLOAD)
-        self.subject = self.entities["fan"]
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.setUpBasicButton(
-            RESET_DPS,
-            self.entities.get("button_filter_reset"),
-        )
-        self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock"))
-        self.setUpBasicSelect(
-            TIMER_DPS,
-            self.entities.get("select_timer"),
-            {
-                "cancel": "cancel",
-                "1h": "1h",
-                "2h": "2h",
-                "4h": "4h",
-                "8h": "8h",
-            },
-        )
-        self.setUpMultiSensors(
-            [
-                {
-                    "dps": TEMP_DPS,
-                    "name": "sensor_temperature",
-                    "unit": UnitOfTemperature.CELSIUS,
-                    "device_class": SensorDeviceClass.TEMPERATURE,
-                    "state_class": SensorStateClass.MEASUREMENT,
-                },
-                {
-                    "dps": FILTER_DPS,
-                    "name": "sensor_active_filter_life",
-                    "unit": PERCENTAGE,
-                },
-                {
-                    "dps": AQI_DPS,
-                    "name": "sensor_air_quality",
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "button_filter_reset",
-                "lock_child_lock",
-                "sensor_active_filter_life",
-                "select_timer",
-                "sensor_temperature",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            FanEntityFeature.PRESET_MODE
-            | FanEntityFeature.TURN_ON
-            | FanEntityFeature.TURN_OFF,
-        )
-
-    def test_preset_modes(self):
-        self.assertCountEqual(
-            self.subject.preset_modes,
-            ["smart", "sleep", "fresh", "strong"],
-        )
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = "low"
-        self.assertEqual(self.subject.preset_mode, "sleep")
-
-    async def test_set_preset_mode(self):
-        async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: "mid"}
-        ):
-            await self.subject.async_set_preset_mode("fresh")

+ 0 - 119
tests/devices/test_himox_h06_purifier.py

@@ -1,119 +0,0 @@
-from homeassistant.components.fan import FanEntityFeature
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.const import PERCENTAGE, UnitOfTime
-
-from ..const import HIMOX_H06_PURIFIER_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.button import BasicButtonTests
-from ..mixins.light import BasicLightTests
-from ..mixins.select import MultiSelectTests
-from ..mixins.sensor import MultiSensorTests
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-SPEED_DPS = "4"
-FILTER_DPS = "5"
-LIGHT_DPS = "8"
-RESET_DPS = "11"
-TIMER_DPS = "18"
-COUNTDOWN_DPS = "19"
-AQI_DPS = "22"
-MODE_DPS = "101"
-
-
-class TestHimoxH06Purifier(
-    BasicButtonTests,
-    BasicLightTests,
-    MultiSelectTests,
-    MultiSensorTests,
-    SwitchableTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("himox_h06_purifier.yaml", HIMOX_H06_PURIFIER_PAYLOAD)
-        self.subject = self.entities["fan"]
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.setUpBasicButton(
-            RESET_DPS,
-            self.entities.get("button_filter_reset"),
-        )
-        self.setUpBasicLight(LIGHT_DPS, self.entities.get("light_aq_indicator"))
-        self.setUpMultiSelect(
-            [
-                {
-                    "dps": TIMER_DPS,
-                    "name": "select_timer",
-                    "options": {
-                        "cancel": "cancel",
-                        "4h": "4h",
-                        "8h": "8h",
-                    },
-                },
-                {
-                    "dps": MODE_DPS,
-                    "name": "select_configuration",
-                    "options": {
-                        "calcle": "Auto",
-                        "1": "Medium",
-                        "2": "Severe",
-                    },
-                },
-            ]
-        )
-        self.setUpMultiSensors(
-            [
-                {
-                    "dps": FILTER_DPS,
-                    "name": "sensor_active_filter_life",
-                    "unit": PERCENTAGE,
-                },
-                {
-                    "dps": COUNTDOWN_DPS,
-                    "name": "sensor_time_remaining",
-                    "unit": UnitOfTime.MINUTES,
-                    "device_class": SensorDeviceClass.DURATION,
-                },
-                {
-                    "dps": AQI_DPS,
-                    "name": "sensor_air_quality",
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "button_filter_reset",
-                "light_aq_indicator",
-                "sensor_active_filter_life",
-                "select_timer",
-                "sensor_time_remaining",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            FanEntityFeature.SET_SPEED
-            | FanEntityFeature.TURN_OFF
-            | FanEntityFeature.TURN_ON,
-        )
-
-    def test_speed(self):
-        self.dps[SPEED_DPS] = "low"
-        self.assertEqual(self.subject.percentage, 33)
-        self.assertEqual(type(self.subject.percentage), int)
-
-    def test_speed_step(self):
-        self.assertAlmostEqual(self.subject.percentage_step, 33, 0)
-
-    async def test_set_speed(self):
-        async with assert_device_properties_set(
-            self.subject._device, {SPEED_DPS: "mid"}
-        ):
-            await self.subject.async_set_percentage(67)
-
-    async def test_set_speed_snaps(self):
-        async with assert_device_properties_set(
-            self.subject._device, {SPEED_DPS: "high"}
-        ):
-            await self.subject.async_set_percentage(90)

+ 0 - 182
tests/devices/test_hydrotherm_dynamicx8.py

@@ -1,182 +0,0 @@
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.water_heater import (
-    STATE_ECO,
-    STATE_ELECTRIC,
-    STATE_HEAT_PUMP,
-    STATE_HIGH_DEMAND,
-    STATE_OFF,
-    STATE_PERFORMANCE,
-    WaterHeaterEntityFeature,
-)
-from homeassistant.const import PRECISION_WHOLE, UnitOfTemperature
-
-from ..const import HYDROTHERM_DYNAMICX8_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import BasicBinarySensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-POWER_DP = "1"
-TEMPERATURE_DP = "2"
-CURRENTTEMP_DP = "3"
-MODE_DP = "4"
-ERROR_DP = "21"
-
-
-class TestHydrothermDynamicX8(
-    BasicBinarySensorTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig(
-            "hydrotherm_dynamic_x8_water_heater.yaml", HYDROTHERM_DYNAMICX8_PAYLOAD
-        )
-        self.subject = self.entities.get("water_heater")
-        self.setUpBasicBinarySensor(
-            ERROR_DP,
-            self.entities.get("binary_sensor_problem"),
-            device_class=BinarySensorDeviceClass.PROBLEM,
-            testdata=(1, 0),
-        )
-        self.mark_secondary(["binary_sensor_problem"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            WaterHeaterEntityFeature.OPERATION_MODE | WaterHeaterEntityFeature.ON_OFF,
-        )
-
-    def test_temperature_unit_returns_celsius(self):
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-
-    def test_precision(self):
-        self.assertEqual(self.subject.precision, PRECISION_WHOLE)
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DP] = 55
-        self.assertEqual(self.subject.current_temperature, 55)
-
-    def test_min_temp(self):
-        self.assertEqual(self.subject.min_temp, 15.0)
-
-    def test_max_temp(self):
-        self.assertEqual(self.subject.max_temp, 75.0)
-
-    def test_target_temperature(self):
-        self.dps[TEMPERATURE_DP] = 61
-        self.assertEqual(self.subject.target_temperature, 61)
-
-    def test_target_temperature_step(self):
-        self.assertEqual(self.subject.target_temperature_step, 1)
-
-    def test_operation_list(self):
-        self.assertCountEqual(
-            self.subject.operation_list,
-            [
-                STATE_ECO,
-                STATE_ELECTRIC,
-                STATE_HEAT_PUMP,
-                STATE_HIGH_DEMAND,
-                STATE_PERFORMANCE,
-                STATE_OFF,
-            ],
-        )
-
-    def test_current_operation(self):
-        self.dps[POWER_DP] = True
-        self.dps[MODE_DP] = "ECO"
-        self.assertEqual(self.subject.current_operation, STATE_ECO)
-        self.dps[MODE_DP] = "STANDARD"
-        self.assertEqual(self.subject.current_operation, STATE_HEAT_PUMP)
-        self.dps[MODE_DP] = "HYBRID"
-        self.assertEqual(self.subject.current_operation, STATE_HIGH_DEMAND)
-        self.dps[MODE_DP] = "HYBRID1"
-        self.assertEqual(self.subject.current_operation, STATE_PERFORMANCE)
-        self.dps[MODE_DP] = "ELEMENT"
-        self.assertEqual(self.subject.current_operation, STATE_ELECTRIC)
-        self.dps[POWER_DP] = False
-        self.assertEqual(self.subject.current_operation, STATE_OFF)
-
-    def test_is_away_mode_is_none_when_unsupported(self):
-        self.assertIsNone(self.subject.is_away_mode_on)
-
-    async def test_set_temperature_fails(self):
-        with self.assertRaises(TypeError):
-            await self.subject.async_set_temperature(temperature=65)
-
-    async def test_set_operation_mode_to_eco(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: True, MODE_DP: "ECO"},
-        ):
-            await self.subject.async_set_operation_mode(STATE_ECO)
-
-    async def test_set_operation_mode_with_temperature_service(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: True, MODE_DP: "ECO"},
-        ):
-            await self.subject.async_set_temperature(operation_mode=STATE_ECO)
-
-    async def test_set_operation_mode_to_heat_pump(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: True, MODE_DP: "STANDARD"},
-        ):
-            await self.subject.async_set_operation_mode(STATE_HEAT_PUMP)
-
-    async def test_set_operation_mode_to_electric(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: True, MODE_DP: "ELEMENT"},
-        ):
-            await self.subject.async_set_operation_mode(STATE_ELECTRIC)
-
-    async def test_set_operation_mode_to_highdemand(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: True, MODE_DP: "HYBRID"},
-        ):
-            await self.subject.async_set_operation_mode(STATE_HIGH_DEMAND)
-
-    async def test_set_operation_mode_to_performance(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: True, MODE_DP: "HYBRID1"},
-        ):
-            await self.subject.async_set_operation_mode(STATE_PERFORMANCE)
-
-    async def test_set_operation_mode_to_off(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: False},
-        ):
-            await self.subject.async_set_operation_mode(STATE_OFF)
-
-    async def test_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: True},
-        ):
-            await self.subject.async_turn_on()
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: False},
-        ):
-            await self.subject.async_turn_off()
-
-    async def test_turn_away_mode_on_fails(self):
-        with self.assertRaises(NotImplementedError):
-            await self.subject.async_turn_away_mode_on()
-
-    async def test_turn_away_mode_off_fails(self):
-        with self.assertRaises(NotImplementedError):
-            await self.subject.async_turn_away_mode_off()
-
-    def test_basic_bsensor_extra_state_attributes(self):
-        self.dps[ERROR_DP] = 2
-        self.assertDictEqual(
-            self.basicBSensor.extra_state_attributes,
-            {"fault_code": 2},
-        )

+ 0 - 119
tests/devices/test_immax_neo_light_vento.py

@@ -1,119 +0,0 @@
-from homeassistant.components.fan import (
-    DIRECTION_FORWARD,
-    DIRECTION_REVERSE,
-    FanEntityFeature,
-)
-
-from ..helpers import assert_device_properties_set
-from ..mixins.light import BasicLightTests
-from ..mixins.select import BasicSelectTests
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-IMAX_NEO_LIGHT_VENTO_PAYLOAD = {
-    "1": True,
-    "2": "normal",
-    "3": "1",
-    "8": "forward",
-    "15": False,
-    "22": "off",
-}
-
-SWITCH_DPS = "1"
-PRESET_DPS = "2"
-SPEED_DPS = "3"
-DIRECTION_DPS = "8"
-LIGHT_DPS = "15"
-TIMER_DPS = "22"
-
-
-class TestImmaxNeoLightVento(
-    SwitchableTests, BasicSelectTests, BasicLightTests, TuyaDeviceTestCase
-):
-    def setUp(self):
-        self.setUpForConfig("immax_neo_light_vento.yaml", IMAX_NEO_LIGHT_VENTO_PAYLOAD)
-        self.fan = self.entities["fan"]
-        self.light = self.entities["light"]
-        self.stop_timer = self.entities["select_timer"]
-        self.setUpSwitchable(SWITCH_DPS, self.fan)
-        self.setUpBasicLight(LIGHT_DPS, self.light)
-        self.setUpBasicSelect(
-            TIMER_DPS,
-            self.stop_timer,
-            {
-                "off": "cancel",
-                "1hour": "1h",
-                "2hour": "2h",
-                "4hour": "4h",
-                "8hour": "8h",
-            },
-        )
-        self.mark_secondary(["select_timer"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.fan.supported_features,
-            FanEntityFeature.DIRECTION
-            | FanEntityFeature.PRESET_MODE
-            | FanEntityFeature.SET_SPEED
-            | FanEntityFeature.TURN_OFF
-            | FanEntityFeature.TURN_ON,
-        )
-
-    def test_preset_modes(self):
-        self.assertCountEqual(self.fan.preset_modes, ["normal", "nature", "sleep"])
-
-    def test_speed(self):
-        self.dps[SPEED_DPS] = 2
-        self.assertAlmostEqual(33, self.fan.percentage, 0)
-        self.dps[SPEED_DPS] = 3
-        self.assertEqual(50, self.fan.percentage)
-        self.dps[SPEED_DPS] = 4
-        self.assertAlmostEqual(66, self.fan.percentage, 0)
-        self.dps[SPEED_DPS] = 5
-        self.assertAlmostEqual(83, self.fan.percentage, 0)
-        self.dps[SPEED_DPS] = 6
-        self.assertEqual(100, self.fan.percentage)
-        self.dps[SPEED_DPS] = 0
-        self.assertEqual(0, self.fan.percentage)
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = "normal"
-        self.assertEqual(self.fan.preset_mode, "normal")
-
-        self.dps[PRESET_DPS] = "nature"
-        self.assertEqual(self.fan.preset_mode, "nature")
-
-        self.dps[PRESET_DPS] = "sleep"
-        self.assertEqual(self.fan.preset_mode, "sleep")
-
-    def test_direction(self):
-        self.dps[DIRECTION_DPS] = "forward"
-        self.assertEqual(self.fan.current_direction, DIRECTION_FORWARD)
-        self.dps[DIRECTION_DPS] = "reverse"
-        self.assertEqual(self.fan.current_direction, DIRECTION_REVERSE)
-
-    async def test_set_direction_forward(self):
-        async with assert_device_properties_set(
-            self.fan._device, {DIRECTION_DPS: "forward"}
-        ):
-            await self.fan.async_set_direction(DIRECTION_FORWARD)
-
-    async def test_set_direction_reverse(self):
-        async with assert_device_properties_set(
-            self.fan._device, {DIRECTION_DPS: "reverse"}
-        ):
-            await self.fan.async_set_direction(DIRECTION_REVERSE)
-
-    def test_set_stop_timer(self):
-        self.dps[TIMER_DPS] = "2hour"
-        self.assertEqual(self.stop_timer.current_option, "2h")
-
-    async def test_set_speed(self):
-        async with assert_device_properties_set(self.fan._device, {SPEED_DPS: 2}):
-            await self.fan.async_set_percentage(33)
-
-    async def test_set_speed_in_normal_mode_snaps(self):
-        self.dps[PRESET_DPS] = "normal"
-        async with assert_device_properties_set(self.fan._device, {SPEED_DPS: 5}):
-            await self.fan.async_set_percentage(80)

+ 0 - 222
tests/devices/test_inkbird_itc308_thermostat.py

@@ -1,222 +0,0 @@
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.climate.const import ClimateEntityFeature, HVACAction
-from homeassistant.components.number.const import NumberDeviceClass
-from homeassistant.const import UnitOfTemperature, UnitOfTime
-
-from ..const import INKBIRD_ITC308_THERMOSTAT_PAYLOAD
-from ..mixins.binary_sensor import MultiBinarySensorTests
-from ..mixins.climate import TargetTemperatureTests
-from ..mixins.number import MultiNumberTests
-from ..mixins.select import BasicSelectTests
-from .base_device_tests import TuyaDeviceTestCase
-
-ERROR_DPS = "12"
-UNIT_DPS = "101"
-CALIBRATE_DPS = "102"
-CURRENTTEMP_DPS = "104"
-TEMPERATURE_DPS = "106"
-TIME_THRES_DPS = "108"
-HIGH_THRES_DPS = "109"
-LOW_THRES_DPS = "110"
-ALARM_HIGH_DPS = "111"
-ALARM_LOW_DPS = "112"
-ALARM_SENSOR_DPS = "113"
-STATUS_DPS = "115"
-TEMPF_DPS = "116"
-HEATDIFF_DPS = "117"
-COOLDIFF_DPS = "118"
-
-
-class TestInkbirdITC308Thermostat(
-    BasicSelectTests,
-    MultiBinarySensorTests,
-    MultiNumberTests,
-    TargetTemperatureTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig(
-            "inkbird_itc308_thermostat.yaml", INKBIRD_ITC308_THERMOSTAT_PAYLOAD
-        )
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=-50.0,
-            max=99.9,
-            scale=10,
-        )
-        self.setUpBasicSelect(
-            UNIT_DPS,
-            self.entities.get("select_temperature_unit"),
-            {
-                "C": "celsius",
-                "F": "fahrenheit",
-            },
-        )
-        self.setUpMultiBinarySensors(
-            [
-                {
-                    "name": "binary_sensor_high_temperature",
-                    "dps": ALARM_HIGH_DPS,
-                    "device_class": BinarySensorDeviceClass.HEAT,
-                },
-                {
-                    "name": "binary_sensor_low_temperature",
-                    "dps": ALARM_LOW_DPS,
-                    "device_class": BinarySensorDeviceClass.COLD,
-                },
-                {
-                    "name": "binary_sensor_sensor_fault",
-                    "dps": ALARM_SENSOR_DPS,
-                    "device_class": BinarySensorDeviceClass.PROBLEM,
-                },
-                {
-                    "name": "binary_sensor_problem",
-                    "dps": ERROR_DPS,
-                    "device_class": BinarySensorDeviceClass.PROBLEM,
-                    "testdata": (1, 0),
-                },
-            ]
-        )
-        self.setUpMultiNumber(
-            [
-                {
-                    "name": "number_temperature_calibration",
-                    "dps": CALIBRATE_DPS,
-                    "scale": 10,
-                    "step": 0.1,
-                    "min": -9.9,
-                    "max": 9.9,
-                    "device_class": NumberDeviceClass.TEMPERATURE_DELTA,
-                    "unit": NumberDeviceClass.CELSIUS,
-                },
-                {
-                    "name": "number_compressor_delay",
-                    "dps": TIME_THRES_DPS,
-                    "max": 10,
-                    "unit": UnitOfTime.MINUTES,
-                },
-                {
-                    "name": "number_maximum_temperature",
-                    "dps": HIGH_THRES_DPS,
-                    "device_class": NumberDeviceClass.TEMPERATURE,
-                    "scale": 10,
-                    "step": 0.1,
-                    "min": -50,
-                    "max": 99.9,
-                    "unit": UnitOfTemperature.CELSIUS,
-                },
-                {
-                    "name": "number_minimum_temperature",
-                    "dps": LOW_THRES_DPS,
-                    "device_class": NumberDeviceClass.TEMPERATURE,
-                    "scale": 10,
-                    "step": 0.1,
-                    "min": -50,
-                    "max": 99.9,
-                    "unit": UnitOfTemperature.CELSIUS,
-                },
-                {
-                    "name": "number_cooling_hysteresis",
-                    "dps": COOLDIFF_DPS,
-                    "scale": 10,
-                    "step": 0.1,
-                    "min": 0.3,
-                    "max": 15.0,
-                    "device_class": NumberDeviceClass.TEMPERATURE_DELTA,
-                    "unit": UnitOfTemperature.CELSIUS,
-                },
-                {
-                    "name": "number_heating_hysteresis",
-                    "dps": HEATDIFF_DPS,
-                    "scale": 10,
-                    "step": 0.1,
-                    "min": 0.3,
-                    "max": 15.0,
-                    "device_class": NumberDeviceClass.TEMPERATURE_DELTA,
-                    "unit": UnitOfTemperature.CELSIUS,
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "select_temperature_unit",
-                "binary_sensor_high_temperature",
-                "binary_sensor_low_temperature",
-                "binary_sensor_sensor_fault",
-                "binary_sensor_problem",
-                "number_temperature_calibration",
-                "number_compressor_delay",
-                "number_maximum_temperature",
-                "number_minimum_temperature",
-                "number_cooling_hysteresis",
-                "number_heating_hysteresis",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            ClimateEntityFeature.TARGET_TEMPERATURE,
-        )
-
-    def test_icon(self):
-        """Test that the icon is as expected."""
-        self.dps[ALARM_HIGH_DPS] = False
-        self.dps[ALARM_LOW_DPS] = False
-        self.dps[ALARM_SENSOR_DPS] = False
-        self.dps[STATUS_DPS] = "3"
-        self.assertEqual(self.subject.icon, "mdi:fire")
-        self.dps[STATUS_DPS] = "1"
-        self.assertEqual(self.subject.icon, "mdi:snowflake")
-
-        self.dps[STATUS_DPS] = "2"
-        self.assertEqual(self.subject.icon, "mdi:thermometer-off")
-
-        self.dps[ALARM_HIGH_DPS] = True
-        self.assertEqual(self.subject.icon, "mdi:thermometer-alert")
-
-        self.dps[STATUS_DPS] = "3"
-        self.assertEqual(self.subject.icon, "mdi:thermometer-alert")
-
-        self.dps[ALARM_HIGH_DPS] = False
-        self.dps[ALARM_LOW_DPS] = True
-        self.assertEqual(self.subject.icon, "mdi:snowflake-alert")
-
-        self.dps[ALARM_LOW_DPS] = False
-        self.dps[ALARM_SENSOR_DPS] = True
-        self.assertEqual(self.subject.icon, "mdi:thermometer-alert")
-
-    def test_climate_hvac_modes(self):
-        self.assertEqual(self.subject.hvac_modes, ["auto"])
-
-    def test_current_temperature(self):
-        self.dps[UNIT_DPS] = "C"
-        self.dps[CURRENTTEMP_DPS] = 289
-        self.assertEqual(self.subject.current_temperature, 28.9)
-        self.dps[UNIT_DPS] = "F"
-        self.dps[TEMPF_DPS] = 789
-        self.assertEqual(self.subject.current_temperature, 78.9)
-
-    def test_temperature_unit(self):
-        self.dps[UNIT_DPS] = "F"
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.FAHRENHEIT)
-
-        self.dps[UNIT_DPS] = "C"
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-
-    def test_hvac_action(self):
-        self.dps[STATUS_DPS] = "1"
-        self.assertEqual(self.subject.hvac_action, HVACAction.COOLING)
-        self.dps[STATUS_DPS] = "2"
-        self.assertEqual(self.subject.hvac_action, HVACAction.IDLE)
-        self.dps[STATUS_DPS] = "3"
-        self.assertEqual(self.subject.hvac_action, HVACAction.HEATING)
-
-    def test_multi_bsensor_extra_state_attributes(self):
-        self.dps[ERROR_DPS] = 2
-        self.assertDictEqual(
-            self.multiBSensor.get("binary_sensor_problem").extra_state_attributes,
-            {"fault_code": 2},
-        )

+ 0 - 176
tests/devices/test_inkbird_sousvide.py

@@ -1,176 +0,0 @@
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.climate.const import (
-    ClimateEntityFeature,
-    HVACAction,
-    HVACMode,
-)
-from homeassistant.components.number import NumberDeviceClass
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.const import UnitOfTemperature, UnitOfTime
-
-from ..const import INKBIRD_SOUSVIDE_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import BasicBinarySensorTests
-from ..mixins.climate import TargetTemperatureTests
-from ..mixins.number import MultiNumberTests
-from ..mixins.select import BasicSelectTests
-from ..mixins.sensor import BasicSensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-HVACMODE_DPS = "101"
-HVACACTION_DPS = "102"
-TEMPERATURE_DPS = "103"
-CURRENTTEMP_DPS = "104"
-TIMER_DPS = "105"
-REMAIN_DPS = "106"
-ERROR_DPS = "107"
-UNIT_DPS = "108"
-RECIPE_DPS = "109"
-CALIBRATE_DPS = "110"
-
-
-class TestInkbirdSousVideCooker(
-    BasicBinarySensorTests,
-    MultiNumberTests,
-    BasicSelectTests,
-    BasicSensorTests,
-    TargetTemperatureTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("inkbird_sousvide_cooker.yaml", INKBIRD_SOUSVIDE_PAYLOAD)
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=0.0,
-            max=96.0,
-            scale=10,
-        )
-        self.setUpMultiNumber(
-            [
-                {
-                    "dps": TIMER_DPS,
-                    "name": "number_cooking_time",
-                    "max": 5999,
-                    "device_class": NumberDeviceClass.DURATION,
-                    "unit": UnitOfTime.MINUTES,
-                },
-                {
-                    "dps": RECIPE_DPS,
-                    "name": "number_recipe",
-                    "max": 1000,
-                },
-                {
-                    "dps": CALIBRATE_DPS,
-                    "name": "number_temperature_calibration",
-                    "min": -9.9,
-                    "max": 9.9,
-                    "scale": 10,
-                    "step": 0.1,
-                    "device_class": NumberDeviceClass.TEMPERATURE_DELTA,
-                    "unit": UnitOfTemperature.CELSIUS,
-                },
-            ]
-        )
-        self.setUpBasicBinarySensor(
-            ERROR_DPS,
-            self.entities.get("binary_sensor_problem"),
-            device_class=BinarySensorDeviceClass.PROBLEM,
-            testdata=(1, 0),
-        )
-        self.setUpBasicSelect(
-            UNIT_DPS,
-            self.entities.get("select_temperature_unit"),
-            {
-                False: "fahrenheit",
-                True: "celsius",
-            },
-        )
-        self.setUpBasicSensor(
-            REMAIN_DPS,
-            self.entities.get("sensor_time_remaining"),
-            unit=UnitOfTime.MINUTES,
-            device_class=SensorDeviceClass.DURATION,
-        )
-        self.mark_secondary(
-            [
-                "number_cooking_time",
-                "number_recipe",
-                "number_temperature_calibration",
-                "binary_sensor_problem",
-                "select_temperature_unit",
-                "sensor_time_remaining",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            ClimateEntityFeature.TARGET_TEMPERATURE
-            | ClimateEntityFeature.TURN_OFF
-            | ClimateEntityFeature.TURN_ON,
-        )
-
-    def test_icon(self):
-        self.dps[ERROR_DPS] = 0
-        self.dps[HVACACTION_DPS] = "stop"
-        self.assertEqual(self.subject.icon, "mdi:pot-outline")
-
-        self.dps[HVACACTION_DPS] = "working"
-        self.assertEqual(self.subject.icon, "mdi:pot-steam")
-        self.dps[HVACACTION_DPS] = "complete"
-        self.assertEqual(self.subject.icon, "mdi:pot")
-
-        self.dps[ERROR_DPS] = 2
-        self.assertEqual(self.subject.icon, "mdi:alert")
-
-    def test_temperature_unit(self):
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 522
-        self.assertEqual(self.subject.current_temperature, 52.2)
-
-    def test_hvac_mode(self):
-        self.dps[HVACMODE_DPS] = True
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-        self.dps[HVACMODE_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(self.subject.hvac_modes, [HVACMode.OFF, HVACMode.HEAT])
-
-    def test_hvac_action(self):
-        self.dps[HVACMODE_DPS] = True
-        self.dps[HVACACTION_DPS] = "stop"
-        self.assertEqual(self.subject.hvac_action, HVACAction.OFF)
-
-        self.dps[HVACACTION_DPS] = "working"
-        self.assertEqual(self.subject.hvac_action, HVACAction.HEATING)
-
-        self.dps[HVACACTION_DPS] = "complete"
-        self.assertEqual(self.subject.hvac_action, HVACAction.IDLE)
-
-        self.dps[HVACMODE_DPS] = False
-        self.assertEqual(self.subject.hvac_action, HVACAction.OFF)
-
-    async def test_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: True}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT)
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: False}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    def test_basic_bsensor_extra_state_attributes(self):
-        self.dps[ERROR_DPS] = 2
-        self.assertDictEqual(
-            self.basicBSensor.extra_state_attributes,
-            {"fault_code": 2},
-        )

+ 0 - 44
tests/devices/test_ir_remote_sensors.py

@@ -1,44 +0,0 @@
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.const import PERCENTAGE, UnitOfTemperature
-
-from ..const import IR_REMOTE_SENSORS_PAYLOAD
-from ..mixins.sensor import MultiSensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-TEMP_DP = "101"
-HUMID_DP = "102"
-IRSEND_DP = "201"
-IRRECV_DP = "202"
-
-
-class TestIRRemoteSensors(MultiSensorTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("ir_remote_sensors.yaml", IR_REMOTE_SENSORS_PAYLOAD)
-        self.subject = self.entities.get("remote")
-        self.setUpMultiSensors(
-            [
-                {
-                    "dps": TEMP_DP,
-                    "name": "sensor_temperature",
-                    "device_class": SensorDeviceClass.TEMPERATURE,
-                    "unit": UnitOfTemperature.CELSIUS,
-                    "state_class": "measurement",
-                    "testdata": (198, 19.8),
-                },
-                {
-                    "dps": HUMID_DP,
-                    "name": "sensor_humidity",
-                    "device_class": SensorDeviceClass.HUMIDITY,
-                    "unit": PERCENTAGE,
-                    "state_class": "measurement",
-                },
-            ]
-        )
-
-    # TODO: overcome issues with the HA Store in unit tests.
-    # async def test_send_command(self):
-    #     async with assert_device_properties_set(
-    #         self.subject._device,
-    #         {IRSEND_DP: '{"control": "send_ir", "head": "", "key1": "1testbutton", "type": 0, "delay": 300}'},
-    #     ):
-    #         await self.subject.async_send_command("b64:testbutton")

+ 0 - 108
tests/devices/test_kogan_garage_door_opener.py

@@ -1,108 +0,0 @@
-"""Tests for the simple garage door opener."""
-
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.cover import CoverDeviceClass, CoverEntityFeature
-from homeassistant.components.sensor import SensorDeviceClass
-
-from ..const import KOGAN_GARAGE_DOOR_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import BasicBinarySensorTests
-from ..mixins.sensor import BasicSensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-CONTROL_DPS = "101"
-ACTION_DPS = "102"
-BATTERY_DPS = "104"
-LEFTOPEN_DPS = "105"
-
-
-class TestKoganGarageOpener(
-    BasicBinarySensorTests,
-    BasicSensorTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("kogan_garage_opener.yaml", KOGAN_GARAGE_DOOR_PAYLOAD)
-        self.subject = self.entities["cover_garage"]
-        self.setUpBasicBinarySensor(
-            LEFTOPEN_DPS,
-            self.entities.get("binary_sensor_door_open"),
-            device_class=BinarySensorDeviceClass.GARAGE_DOOR,
-        )
-        self.setUpBasicSensor(
-            BATTERY_DPS,
-            self.entities.get("sensor_battery"),
-            device_class=SensorDeviceClass.BATTERY,
-        )
-        self.mark_secondary(["binary_sensor_door_open", "sensor_battery"])
-
-    def test_device_class_is_garage(self):
-        self.assertEqual(self.subject.device_class, CoverDeviceClass.GARAGE)
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            CoverEntityFeature.OPEN | CoverEntityFeature.CLOSE,
-        )
-
-    def test_current_cover_position(self):
-        self.dps[ACTION_DPS] = "opened"
-        self.dps[CONTROL_DPS] = "fopen"
-        self.assertEqual(self.subject.current_cover_position, 100)
-        self.dps[ACTION_DPS] = "closed"
-        self.dps[CONTROL_DPS] = "fclose"
-        self.assertEqual(self.subject.current_cover_position, 0)
-        self.dps[ACTION_DPS] = "closing"
-        self.assertEqual(self.subject.current_cover_position, 50)
-
-    def test_is_opening(self):
-        self.dps[ACTION_DPS] = "opened"
-        self.assertFalse(self.subject.is_opening)
-        self.dps[ACTION_DPS] = "closed"
-        self.assertFalse(self.subject.is_opening)
-        self.dps[ACTION_DPS] = "closing"
-        self.assertFalse(self.subject.is_opening)
-        self.dps[ACTION_DPS] = "openning"
-        self.assertTrue(self.subject.is_opening)
-
-    def test_is_closing(self):
-        self.dps[ACTION_DPS] = "opened"
-        self.assertFalse(self.subject.is_closing)
-        self.dps[ACTION_DPS] = "closed"
-        self.assertFalse(self.subject.is_closing)
-        self.dps[ACTION_DPS] = "openning"
-        self.assertFalse(self.subject.is_closing)
-        self.dps[ACTION_DPS] = "closing"
-        self.assertTrue(self.subject.is_closing)
-
-    def test_is_closed(self):
-        self.dps[CONTROL_DPS] = "fclose"
-        self.dps[ACTION_DPS] = "closing"
-        self.assertFalse(self.subject.is_closed)
-        self.dps[ACTION_DPS] = "closed"
-        self.assertTrue(self.subject.is_closed)
-
-    async def test_open_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {CONTROL_DPS: "fopen"},
-        ):
-            await self.subject.async_open_cover()
-
-    async def test_close_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {CONTROL_DPS: "fclose"},
-        ):
-            await self.subject.async_close_cover()
-
-    async def test_set_cover_position_not_supported(self):
-        with self.assertRaises(NotImplementedError):
-            await self.subject.async_set_cover_position(50)
-
-    async def test_stop_cover_not_supported(self):
-        with self.assertRaises(NotImplementedError):
-            await self.subject.async_stop_cover()
-
-    def test_extra_state_attributes(self):
-        self.assertEqual(self.subject.extra_state_attributes, {})

+ 0 - 125
tests/devices/test_kogan_glass_1_7l_kettle.py

@@ -1,125 +0,0 @@
-from homeassistant.components.climate.const import (
-    ClimateEntityFeature,
-    HVACMode,
-)
-
-from ..const import KOGAN_GLASS_1_7L_KETTLE_PAYLOAD
-from ..helpers import assert_device_properties_set
-from .base_device_tests import TuyaDeviceTestCase
-
-HVACMODE_DPS = "1"
-CURRENTTEMP_DPS = "5"
-# PRESET_DPS = "102"
-
-
-class TestKoganGlass1_7LKettle(TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig(
-            "kogan_glass_1_7l_kettle.yaml",
-            KOGAN_GLASS_1_7L_KETTLE_PAYLOAD,
-        )
-        self.subject = self.entities.get("climate")
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON,
-        )
-
-    def test_icon(self):
-        self.dps[HVACMODE_DPS] = True
-        self.assertEqual(self.subject.icon, "mdi:kettle")
-        self.dps[HVACMODE_DPS] = False
-        self.assertEqual(self.subject.icon, "mdi:kettle-off")
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 85
-        self.assertEqual(self.subject.current_temperature, 85)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(
-            self.subject.hvac_modes,
-            [HVACMode.HEAT, HVACMode.OFF],
-        )
-
-    def test_hvac_mode(self):
-        self.dps[HVACMODE_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-        self.dps[HVACMODE_DPS] = True
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-    async def test_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {HVACMODE_DPS: True},
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT)
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {HVACMODE_DPS: False},
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    # def test_preset_modes(self):
-    #     self.assertCountEqual(
-    #         self.subject.preset_modes,
-    #         ["40", "50", "60", "80", "90", "Current Temp"],
-    #     )
-
-    # def test_preset_mode(self):
-    #     self.dps[PRESET_DPS] = "40"
-    #     self.assertEqual(self.subject.preset_mode, "40")
-    #     self.dps[PRESET_DPS] = "50"
-    #     self.assertEqual(self.subject.preset_mode, "50")
-    #     self.dps[PRESET_DPS] = "60"
-    #     self.assertEqual(self.subject.preset_mode, "60")
-    #     self.dps[PRESET_DPS] = "80"
-    #     self.assertEqual(self.subject.preset_mode, "80")
-    #     self.dps[PRESET_DPS] = "90"
-    #     self.assertEqual(self.subject.preset_mode, "90")
-    #     self.dps[PRESET_DPS] = "currenttemp"
-    #     self.assertEqual(self.subject.preset_mode, "Current Temp")
-
-    # async def test_set_preset_to_40(self):
-    #     async with assert_device_properties_set(
-    #         self.subject._device,
-    #         {PRESET_DPS: "40"},
-    #     ):
-    #         await self.subject.async_set_preset_mode("40")
-
-    # async def test_set_preset_to_50(self):
-    #     async with assert_device_properties_set(
-    #         self.subject._device,
-    #         {PRESET_DPS: "50"},
-    #     ):
-    #         await self.subject.async_set_preset_mode("50")
-
-    # async def test_set_preset_to_60(self):
-    #     async with assert_device_properties_set(
-    #         self.subject._device,
-    #         {PRESET_DPS: "60"},
-    #     ):
-    #         await self.subject.async_set_preset_mode("60")
-
-    # async def test_set_preset_to_80(self):
-    #     async with assert_device_properties_set(
-    #         self.subject._device,
-    #         {PRESET_DPS: "80"},
-    #     ):
-    #         await self.subject.async_set_preset_mode("80")
-
-    # async def test_set_preset_to_90(self):
-    #     async with assert_device_properties_set(
-    #         self.subject._device,
-    #         {PRESET_DPS: "90"},
-    #     ):
-    #         await self.subject.async_set_preset_mode("90")
-
-    # async def test_set_preset_to_currenttemp(self):
-    #     async with assert_device_properties_set(
-    #         self.subject._device,
-    #         {PRESET_DPS: "currenttemp"},
-    #     ):
-    #         await self.subject.async_set_preset_mode("Current Temp")

+ 0 - 139
tests/devices/test_kogan_kawfpac09ya_airconditioner.py

@@ -1,139 +0,0 @@
-from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
-from homeassistant.const import UnitOfTemperature
-
-from ..const import KOGAN_KAWFPAC09YA_AIRCON_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.climate import TargetTemperatureTests
-from .base_device_tests import TuyaDeviceTestCase
-
-POWER_DPS = "1"
-TEMPERATURE_DPS = "2"
-CURRENTTEMP_DPS = "3"
-HVACMODE_DPS = "4"
-FAN_DPS = "5"
-UNIT_DPS = "19"
-COUNTDOWN_DPS = "105"
-UNKNOWN106_DPS = "106"
-UNKNOWN107_DPS = "107"
-
-
-class TestKoganKAWFPAC09YA(TargetTemperatureTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig(
-            "kogan_kawfpac09ya_airconditioner.yaml",
-            KOGAN_KAWFPAC09YA_AIRCON_PAYLOAD,
-        )
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=16.0,
-            max=30.0,
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            ClimateEntityFeature.TARGET_TEMPERATURE
-            | ClimateEntityFeature.FAN_MODE
-            | ClimateEntityFeature.TURN_OFF
-            | ClimateEntityFeature.TURN_ON,
-        )
-
-    def test_temperature_unit(self):
-        self.dps[UNIT_DPS] = "C"
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-        self.dps[UNIT_DPS] = "F"
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.FAHRENHEIT)
-
-    def test_minimum_target_temperature_f(self):
-        self.dps[UNIT_DPS] = "F"
-        self.assertEqual(self.subject.min_temp, 60)
-
-    def test_maximum_target_temperature_f(self):
-        self.dps[UNIT_DPS] = "F"
-        self.assertEqual(self.subject.max_temp, 86)
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 25
-        self.assertEqual(self.subject.current_temperature, 25)
-
-    def test_hvac_mode(self):
-        self.dps[POWER_DPS] = True
-        self.dps[HVACMODE_DPS] = "COOL"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.COOL)
-
-        self.dps[HVACMODE_DPS] = "DRY"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.DRY)
-
-        self.dps[HVACMODE_DPS] = "FAN"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.FAN_ONLY)
-
-        self.dps[HVACMODE_DPS] = "FAN"
-        self.dps[POWER_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(
-            self.subject.hvac_modes,
-            [
-                HVACMode.OFF,
-                HVACMode.COOL,
-                HVACMode.DRY,
-                HVACMode.FAN_ONLY,
-            ],
-        )
-
-    async def test_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device, {POWER_DPS: True, HVACMODE_DPS: "COOL"}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.COOL)
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {POWER_DPS: False}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    def test_fan_mode(self):
-        self.dps[FAN_DPS] = "1"
-        self.assertEqual(self.subject.fan_mode, "low")
-        self.dps[FAN_DPS] = "2"
-        self.assertEqual(self.subject.fan_mode, "high")
-
-    def test_fan_modes(self):
-        self.assertCountEqual(
-            self.subject.fan_modes,
-            [
-                "low",
-                "high",
-            ],
-        )
-
-    async def test_set_fan_mode_to_low(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: "1"},
-        ):
-            await self.subject.async_set_fan_mode("low")
-
-    async def test_set_fan_mode_to_high(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {FAN_DPS: "2"},
-        ):
-            await self.subject.async_set_fan_mode("high")
-
-    def test_extra_state_attributes(self):
-        self.dps[COUNTDOWN_DPS] = 105
-        self.dps[UNKNOWN106_DPS] = 106
-        self.dps[UNKNOWN107_DPS] = True
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {
-                "countdown": 105,
-                "unknown_106": 106,
-                "unknown_107": True,
-            },
-        )

+ 0 - 300
tests/devices/test_kyvol_e30_vacuum.py

@@ -1,300 +0,0 @@
-from homeassistant.components.button import ButtonDeviceClass
-from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass
-from homeassistant.components.vacuum import (
-    VacuumActivity,
-    VacuumEntityFeature,
-)
-from homeassistant.const import PERCENTAGE, UnitOfArea, UnitOfTime
-
-from ..const import KYVOL_E30_VACUUM_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.button import MultiButtonTests
-from ..mixins.sensor import MultiSensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-POWER_DPS = "1"
-SWITCH_DPS = "2"
-COMMAND_DPS = "3"
-DIRECTION_DPS = "4"
-STATUS_DPS = "5"
-BATTERY_DPS = "6"
-EDGE_DPS = "7"
-ROLL_DPS = "8"
-FILTER_DPS = "9"
-RSTEDGE_DPS = "10"
-RSTROLL_DPS = "11"
-RSTFILTER_DPS = "12"
-LOCATE_DPS = "13"
-FAN_DPS = "14"
-AREA_DPS = "16"
-TIME_DPS = "17"
-ERROR_DPS = "18"
-WATER_DPS = "101"
-MODEL_DPS = "102"
-MODE_DPS = "104"
-CARPET_DPS = "107"
-
-
-class TestKyvolE30Vacuum(MultiButtonTests, MultiSensorTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("kyvol_e30_vacuum.yaml", KYVOL_E30_VACUUM_PAYLOAD)
-        self.subject = self.entities.get("vacuum")
-        self.setUpMultiButtons(
-            [
-                {
-                    "dps": RSTEDGE_DPS,
-                    "name": "button_edge_brush_reset",
-                    "device_class": ButtonDeviceClass.RESTART,
-                },
-                {
-                    "dps": RSTROLL_DPS,
-                    "name": "button_roll_brush_reset",
-                    "device_class": ButtonDeviceClass.RESTART,
-                },
-                {
-                    "dps": RSTFILTER_DPS,
-                    "name": "button_filter_reset",
-                },
-            ]
-        )
-        self.setUpMultiSensors(
-            [
-                {
-                    "dps": AREA_DPS,
-                    "name": "sensor_clean_area",
-                    "unit": UnitOfArea.SQUARE_METERS,
-                    "device_class": SensorDeviceClass.AREA,
-                    "testdata": (30, 3.0),
-                },
-                {
-                    "dps": TIME_DPS,
-                    "name": "sensor_clean_time",
-                    "unit": UnitOfTime.MINUTES,
-                    "device_class": SensorDeviceClass.DURATION,
-                },
-                {
-                    "dps": EDGE_DPS,
-                    "name": "sensor_edge_brush",
-                    "unit": PERCENTAGE,
-                },
-                {
-                    "dps": ROLL_DPS,
-                    "name": "sensor_roll_brush",
-                    "unit": PERCENTAGE,
-                },
-                {
-                    "dps": FILTER_DPS,
-                    "name": "sensor_filter_life",
-                    "unit": PERCENTAGE,
-                },
-                {
-                    "dps": STATUS_DPS,
-                    "name": "sensor_status",
-                },
-                {
-                    "dps": BATTERY_DPS,
-                    "name": "sensor_battery",
-                    "unit": PERCENTAGE,
-                    "device_class": SensorDeviceClass.BATTERY,
-                    "state_class": SensorStateClass.MEASUREMENT,
-                },
-            ],
-        )
-
-        self.mark_secondary(
-            [
-                "binary_sensor_problem",
-                "button_edge_brush_reset",
-                "button_roll_brush_reset",
-                "button_filter_reset",
-                "sensor_clean_area",
-                "sensor_clean_time",
-                "sensor_edge_brush",
-                "sensor_roll_brush",
-                "sensor_filter_life",
-                "sensor_status",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                VacuumEntityFeature.STATE
-                | VacuumEntityFeature.STATUS
-                | VacuumEntityFeature.SEND_COMMAND
-                | VacuumEntityFeature.FAN_SPEED
-                | VacuumEntityFeature.TURN_ON
-                | VacuumEntityFeature.TURN_OFF
-                | VacuumEntityFeature.START
-                | VacuumEntityFeature.PAUSE
-                | VacuumEntityFeature.LOCATE
-                | VacuumEntityFeature.RETURN_HOME
-                | VacuumEntityFeature.CLEAN_SPOT
-            ),
-        )
-
-    def test_status(self):
-        self.dps[COMMAND_DPS] = "standby"
-        self.assertEqual(self.subject.status, "standby")
-        self.dps[COMMAND_DPS] = "smart"
-        self.assertEqual(self.subject.status, "smart")
-        self.dps[COMMAND_DPS] = "chargego"
-        self.assertEqual(self.subject.status, "return_to_base")
-        self.dps[COMMAND_DPS] = "random"
-        self.assertEqual(self.subject.status, "random")
-        self.dps[COMMAND_DPS] = "wall_follow"
-        self.assertEqual(self.subject.status, "wall_follow")
-        self.dps[COMMAND_DPS] = "spiral"
-        self.assertEqual(self.subject.status, "clean_spot")
-
-    def test_activity(self):
-        self.dps[POWER_DPS] = True
-        self.dps[SWITCH_DPS] = True
-        self.dps[ERROR_DPS] = 0
-        self.dps[COMMAND_DPS] = "return_to_base"
-        self.assertEqual(self.subject.activity, VacuumActivity.RETURNING)
-        self.dps[COMMAND_DPS] = "standby"
-        self.assertEqual(self.subject.activity, VacuumActivity.IDLE)
-        self.dps[COMMAND_DPS] = "random"
-        self.assertEqual(self.subject.activity, VacuumActivity.CLEANING)
-        self.dps[POWER_DPS] = False
-        self.assertEqual(self.subject.activity, VacuumActivity.IDLE)
-        self.dps[POWER_DPS] = True
-        self.dps[SWITCH_DPS] = False
-        self.assertEqual(self.subject.activity, VacuumActivity.PAUSED)
-        self.dps[ERROR_DPS] = 1
-        self.assertEqual(self.subject.activity, VacuumActivity.ERROR)
-
-    async def test_async_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DPS: True},
-        ):
-            await self.subject.async_turn_on()
-
-    async def test_async_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DPS: False},
-        ):
-            await self.subject.async_turn_off()
-
-    async def test_async_toggle(self):
-        self.dps[POWER_DPS] = False
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DPS: True},
-        ):
-            await self.subject.async_toggle()
-
-    async def test_async_start(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWITCH_DPS: True},
-        ):
-            await self.subject.async_start()
-
-    async def test_async_pause(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWITCH_DPS: False},
-        ):
-            await self.subject.async_pause()
-
-    async def test_async_return_to_base(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "chargego"},
-        ):
-            await self.subject.async_return_to_base()
-
-    async def test_async_clean_spot(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "spiral"},
-        ):
-            await self.subject.async_clean_spot()
-
-    async def test_async_locate(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {LOCATE_DPS: True},
-        ):
-            await self.subject.async_locate()
-
-    async def test_async_send_standby_command(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "standby"},
-        ):
-            await self.subject.async_send_command("standby")
-
-    async def test_async_send_smart_command(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "smart"},
-        ):
-            await self.subject.async_send_command("smart")
-
-    async def test_async_send_random_command(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "random"},
-        ):
-            await self.subject.async_send_command("random")
-
-    async def test_async_send_wall_follow_command(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "wall_follow"},
-        ):
-            await self.subject.async_send_command("wall_follow")
-
-    async def test_async_send_reverse_command(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {DIRECTION_DPS: "backward"},
-        ):
-            await self.subject.async_send_command("reverse")
-
-    async def test_async_send_left_command(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {DIRECTION_DPS: "turn_left"},
-        ):
-            await self.subject.async_send_command("left")
-
-    async def test_async_send_right_command(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {DIRECTION_DPS: "turn_right"},
-        ):
-            await self.subject.async_send_command("right")
-
-    async def test_async_send_stop_command(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {DIRECTION_DPS: "stop"},
-        ):
-            await self.subject.async_send_command("stop")
-
-    def test_fan_speed(self):
-        self.dps[FAN_DPS] = "2"
-        self.assertEqual(self.subject.fan_speed, "quiet")
-
-    def test_fan_speed_list(self):
-        self.assertCountEqual(
-            self.subject.fan_speed_list,
-            [
-                "strong",
-                "normal",
-                "quiet",
-                "gentle",
-                "closed",
-            ],
-        )
-
-    async def test_async_set_fan_speed(self):
-        async with assert_device_properties_set(self.subject._device, {FAN_DPS: "3"}):
-            await self.subject.async_set_fan_speed(fan_speed="gentle")

+ 0 - 44
tests/devices/test_ledvance_light.py

@@ -1,44 +0,0 @@
-"""Tests for Ledvance Panel lighting, in particular the combined settings"""
-
-from ..const import LEDVANCE_PANEL_PAYLOAD
-from ..helpers import assert_device_properties_set
-from .base_device_tests import TuyaDeviceTestCase
-
-POWER_DP = "20"
-COMBO_DP = "51"
-
-
-class TestLedvanceLight(TuyaDeviceTestCase):
-    """
-    Tests for Ledvance Panel lighting.
-    """
-
-    def setUp(self):
-        self.setUpForConfig(
-            "ledvance_smart_plabl100x25b.yaml",
-            LEDVANCE_PANEL_PAYLOAD,
-        )
-        self.white = self.entities.get("light")
-        self.color = self.entities.get("light_backlight")
-
-        self.mark_secondary(["number_timer", "time_timer"])
-
-    async def test_color_combined_bright(self):
-        self.dps[COMBO_DP] = "AAcAOQPoA+gCngDI"
-        self.assertEqual(self.color.brightness, 255)
-        self.assertEqual(self.white.brightness, 171)
-        async with assert_device_properties_set(
-            self.white._device,
-            {COMBO_DP: "AAcAOQPoA+gD6ADI"},
-        ):
-            await self.white.async_turn_on(brightness=255)
-
-    async def test_color_combined_rgb(self):
-        self.dps[COMBO_DP] = "AAcAOQPoA+gCngDI"
-        self.assertSequenceEqual(self.color.hs_color, (57, 100))
-
-        async with assert_device_properties_set(
-            self.color._device,
-            {COMBO_DP: "AAcAtAPoA+gCngDI"},
-        ):
-            await self.color.async_turn_on(hs_color=(180, 100))

+ 0 - 236
tests/devices/test_lefant_m213_vacuum.py

@@ -1,236 +0,0 @@
-from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass
-from homeassistant.components.vacuum import (
-    VacuumActivity,
-    VacuumEntityFeature,
-)
-from homeassistant.const import PERCENTAGE, UnitOfArea, UnitOfTime
-
-from ..const import LEFANT_M213_VACUUM_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.sensor import MultiSensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-POWER_DPS = "1"
-SWITCH_DPS = "2"
-COMMAND_DPS = "3"
-DIRECTION_DPS = "4"
-STATUS_DPS = "5"
-BATTERY_DPS = "6"
-LOCATE_DPS = "13"
-AREA_DPS = "16"
-TIME_DPS = "17"
-ERROR_DPS = "18"
-FAN_DPS = "101"
-UNKNOWN102_DPS = "102"
-UNKNOWN103_DPS = "103"
-UNKNOWN104_DPS = "104"
-UNKNOWN106_DPS = "106"
-UNKNOWN108_DPS = "108"
-
-
-class TestLefantM213Vacuum(MultiSensorTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("lefant_m213_vacuum.yaml", LEFANT_M213_VACUUM_PAYLOAD)
-        self.subject = self.entities.get("vacuum")
-        self.setUpMultiSensors(
-            [
-                {
-                    "dps": AREA_DPS,
-                    "name": "sensor_clean_area",
-                    "unit": UnitOfArea.SQUARE_METERS,
-                    "device_class": SensorDeviceClass.AREA,
-                },
-                {
-                    "dps": TIME_DPS,
-                    "name": "sensor_clean_time",
-                    "unit": UnitOfTime.MINUTES,
-                    "device_class": SensorDeviceClass.DURATION,
-                },
-                {
-                    "dps": BATTERY_DPS,
-                    "name": "sensor_battery",
-                    "unit": PERCENTAGE,
-                    "device_class": SensorDeviceClass.BATTERY,
-                    "state_class": SensorStateClass.MEASUREMENT,
-                },
-            ],
-        )
-        self.mark_secondary(
-            ["sensor_clean_area", "sensor_clean_time", "binary_sensor_problem"]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                VacuumEntityFeature.CLEAN_SPOT
-                | VacuumEntityFeature.FAN_SPEED
-                | VacuumEntityFeature.LOCATE
-                | VacuumEntityFeature.PAUSE
-                | VacuumEntityFeature.RETURN_HOME
-                | VacuumEntityFeature.SEND_COMMAND
-                | VacuumEntityFeature.START
-                | VacuumEntityFeature.STATE
-                | VacuumEntityFeature.STATUS
-                | VacuumEntityFeature.STOP
-                | VacuumEntityFeature.TURN_ON
-                | VacuumEntityFeature.TURN_OFF
-            ),
-        )
-
-    def test_fan_speed(self):
-        self.dps[FAN_DPS] = "low"
-        self.assertEqual(self.subject.fan_speed, "Low")
-        self.dps[FAN_DPS] = "nar"
-        self.assertEqual(self.subject.fan_speed, "Medium")
-        self.dps[FAN_DPS] = "high"
-        self.assertEqual(self.subject.fan_speed, "High")
-
-    def test_status(self):
-        self.dps[STATUS_DPS] = "0"
-        self.assertEqual(self.subject.status, "paused")
-        self.dps[STATUS_DPS] = "1"
-        self.assertEqual(self.subject.status, "smart")
-        self.dps[STATUS_DPS] = "2"
-        self.assertEqual(self.subject.status, "wall follow")
-        self.dps[STATUS_DPS] = "3"
-        self.assertEqual(self.subject.status, "spiral")
-        self.dps[STATUS_DPS] = "4"
-        self.assertEqual(self.subject.status, "returning")
-        self.dps[STATUS_DPS] = "5"
-        self.assertEqual(self.subject.status, "charging")
-        self.dps[STATUS_DPS] = "6"
-        self.assertEqual(self.subject.status, "random")
-        self.dps[STATUS_DPS] = "7"
-        self.assertEqual(self.subject.status, "standby")
-
-    def test_activity(self):
-        self.dps[POWER_DPS] = True
-        self.dps[SWITCH_DPS] = True
-        self.dps[ERROR_DPS] = 0
-        self.dps[STATUS_DPS] = "4"
-        self.assertEqual(self.subject.activity, VacuumActivity.RETURNING)
-        self.dps[STATUS_DPS] = "7"
-        self.assertEqual(self.subject.activity, VacuumActivity.IDLE)
-        self.dps[STATUS_DPS] = "6"
-        self.assertEqual(self.subject.activity, VacuumActivity.CLEANING)
-        self.dps[POWER_DPS] = False
-        self.assertEqual(self.subject.activity, VacuumActivity.IDLE)
-        self.dps[POWER_DPS] = True
-        self.dps[SWITCH_DPS] = False
-        self.assertEqual(self.subject.activity, VacuumActivity.PAUSED)
-        self.dps[ERROR_DPS] = 1
-        self.assertEqual(self.subject.activity, VacuumActivity.ERROR)
-
-    async def test_async_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DPS: True},
-        ):
-            await self.subject.async_turn_on()
-
-    async def test_async_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DPS: False},
-        ):
-            await self.subject.async_turn_off()
-
-    async def test_async_toggle(self):
-        self.dps[POWER_DPS] = False
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DPS: True},
-        ):
-            await self.subject.async_toggle()
-
-    async def test_async_start(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWITCH_DPS: True},
-        ):
-            await self.subject.async_start()
-
-    async def test_async_pause(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWITCH_DPS: False},
-        ):
-            await self.subject.async_pause()
-
-    async def test_async_return_to_base(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "chargego"},
-        ):
-            await self.subject.async_return_to_base()
-
-    async def test_async_clean_spot(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "spiral"},
-        ):
-            await self.subject.async_clean_spot()
-
-    async def test_async_locate(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {LOCATE_DPS: True},
-        ):
-            await self.subject.async_locate()
-
-    async def test_async_stop(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "standby"},
-        ):
-            await self.subject.async_stop()
-
-    async def test_async_send_smart_command(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "smart"},
-        ):
-            await self.subject.async_send_command("smart")
-
-    async def test_async_send_random_command(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "random"},
-        ):
-            await self.subject.async_send_command("random")
-
-    async def test_async_send_wall_follow_command(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "wall_follow"},
-        ):
-            await self.subject.async_send_command("wall_follow")
-
-    async def test_async_send_reverse_command(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {DIRECTION_DPS: "backward"},
-        ):
-            await self.subject.async_send_command("reverse")
-
-    async def test_async_send_left_command(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {DIRECTION_DPS: "turn_left"},
-        ):
-            await self.subject.async_send_command("left")
-
-    async def test_async_send_right_command(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {DIRECTION_DPS: "turn_right"},
-        ):
-            await self.subject.async_send_command("right")
-
-    async def test_async_send_stop_command(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {DIRECTION_DPS: "stop"},
-        ):
-            await self.subject.async_send_command("stop")

+ 0 - 162
tests/devices/test_lexy_f501_fan.py

@@ -1,162 +0,0 @@
-from homeassistant.components.fan import FanEntityFeature
-from homeassistant.components.number import NumberDeviceClass
-from homeassistant.const import UnitOfTime
-
-from ..const import LEXY_F501_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.light import BasicLightTests
-from ..mixins.lock import BasicLockTests
-from ..mixins.number import BasicNumberTests
-from ..mixins.switch import BasicSwitchTests, SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-POWER_DPS = "1"
-PRESET_DPS = "2"
-OSCILLATE_DPS = "4"
-TIMER_DPS = "6"
-LIGHT_DPS = "9"
-LOCK_DPS = "16"
-SWITCH_DPS = "17"
-SPEED_DPS = "102"
-
-
-class TestLexyF501Fan(
-    SwitchableTests,
-    BasicLightTests,
-    BasicLockTests,
-    BasicNumberTests,
-    BasicSwitchTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("lexy_f501_fan.yaml", LEXY_F501_PAYLOAD)
-        self.subject = self.entities.get("fan")
-        self.setUpSwitchable(POWER_DPS, self.subject)
-        self.setUpBasicLight(LIGHT_DPS, self.entities.get("light"))
-        self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock"))
-        self.setUpBasicNumber(
-            TIMER_DPS,
-            self.entities.get("number_timer"),
-            max=7,
-            device_class=NumberDeviceClass.DURATION,
-            unit=UnitOfTime.HOURS,
-        )
-        self.setUpBasicSwitch(SWITCH_DPS, self.entities.get("switch_sound"))
-        self.mark_secondary(
-            [
-                "light",
-                "lock_child_lock",
-                "number_timer",
-                "switch_sound",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                FanEntityFeature.OSCILLATE
-                | FanEntityFeature.PRESET_MODE
-                | FanEntityFeature.SET_SPEED
-                | FanEntityFeature.TURN_OFF
-                | FanEntityFeature.TURN_ON
-            ),
-        )
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = "forestwindhigh"
-        self.assertEqual(self.subject.preset_mode, "strong")
-
-        self.dps[PRESET_DPS] = "forestwindlow"
-        self.assertEqual(self.subject.preset_mode, "nature")
-
-        self.dps[PRESET_DPS] = "sleepwindlow"
-        self.assertEqual(self.subject.preset_mode, "sleep")
-
-        self.dps[PRESET_DPS] = "sleepwindhigh"
-        self.assertEqual(self.subject.preset_mode, "fresh")
-
-        self.dps[PRESET_DPS] = None
-        self.assertIs(self.subject.preset_mode, None)
-
-    def test_preset_modes(self):
-        self.assertCountEqual(
-            self.subject.preset_modes,
-            ["strong", "nature", "fresh", "sleep"],
-        )
-
-    async def test_set_preset_mode_to_foresthigh(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "forestwindhigh"},
-        ):
-            await self.subject.async_set_preset_mode("strong")
-
-    async def test_set_preset_mode_to_forestlow(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "forestwindlow"},
-        ):
-            await self.subject.async_set_preset_mode("nature")
-
-    async def test_set_preset_mode_to_sleephigh(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "sleepwindhigh"},
-        ):
-            await self.subject.async_set_preset_mode("fresh")
-
-    async def test_set_preset_mode_to_sleeplow(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "sleepwindlow"},
-        ):
-            await self.subject.async_set_preset_mode("sleep")
-
-    def test_oscillating(self):
-        self.dps[OSCILLATE_DPS] = "off"
-        self.assertFalse(self.subject.oscillating)
-
-        self.dps[OSCILLATE_DPS] = "30"
-        self.assertTrue(self.subject.oscillating)
-        self.dps[OSCILLATE_DPS] = "60"
-        self.assertTrue(self.subject.oscillating)
-        self.dps[OSCILLATE_DPS] = "90"
-        self.assertTrue(self.subject.oscillating)
-        self.dps[OSCILLATE_DPS] = "360positive"
-        self.assertTrue(self.subject.oscillating)
-        self.dps[OSCILLATE_DPS] = "360negative"
-        self.assertTrue(self.subject.oscillating)
-
-        self.dps[OSCILLATE_DPS] = None
-        self.assertFalse(self.subject.oscillating)
-
-    async def test_oscillate_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {OSCILLATE_DPS: "off"}
-        ):
-            await self.subject.async_oscillate(False)
-
-    def test_speed(self):
-        self.dps[SPEED_DPS] = "6"
-        self.assertEqual(self.subject.percentage, 40)
-
-    def test_speed_step(self):
-        self.assertAlmostEqual(self.subject.percentage_step, 6.7, 1)
-        self.assertEqual(self.subject.speed_count, 15)
-
-    async def test_set_speed(self):
-        async with assert_device_properties_set(self.subject._device, {SPEED_DPS: 3}):
-            await self.subject.async_set_percentage(20)
-
-    async def test_set_speed_snaps(self):
-        self.dps[PRESET_DPS] = "normal"
-        async with assert_device_properties_set(self.subject._device, {SPEED_DPS: 12}):
-            await self.subject.async_set_percentage(78)
-
-    def test_icons(self):
-        self.dps[LIGHT_DPS] = True
-        self.assertEqual(self.basicLight.icon, "mdi:led-on")
-
-        self.dps[LIGHT_DPS] = False
-        self.assertEqual(self.basicLight.icon, "mdi:led-off")

+ 0 - 64
tests/devices/test_logicom_powerstrip.py

@@ -1,64 +0,0 @@
-"""Tests for the Logicom Strippy 4-way+USB powerstrip."""
-
-from homeassistant.components.switch import SwitchDeviceClass
-
-from ..const import LOGICOM_STRIPPY_PAYLOAD
-from ..mixins.switch import MultiSwitchTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH1_DPS = "1"
-SWITCH2_DPS = "2"
-SWITCH3_DPS = "3"
-SWITCH4_DPS = "4"
-SWITCHUSB_DPS = "5"
-TIMER1_DPS = "9"
-TIMER2_DPS = "10"
-TIMER3_DPS = "11"
-TIMER4_DPS = "12"
-TIMERUSB_DPS = "13"
-
-
-class TestLogicomPowerstrip(
-    MultiSwitchTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("logicom_powerstrip.yaml", LOGICOM_STRIPPY_PAYLOAD)
-        self.setUpMultiSwitch(
-            [
-                {
-                    "dps": SWITCH1_DPS,
-                    "name": "switch_outlet_1",
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-                {
-                    "dps": SWITCH2_DPS,
-                    "name": "switch_outlet_2",
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-                {
-                    "dps": SWITCH3_DPS,
-                    "name": "switch_outlet_3",
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-                {
-                    "dps": SWITCH4_DPS,
-                    "name": "switch_outlet_4",
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-                {
-                    "dps": SWITCHUSB_DPS,
-                    "name": "switch_usb_switch",
-                    "device_class": SwitchDeviceClass.SWITCH,
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "time_timer_1",
-                "time_timer_2",
-                "time_timer_3",
-                "time_timer_4",
-                "time_timer_usb",
-            ]
-        )

+ 0 - 141
tests/devices/test_m027_curtain.py

@@ -1,141 +0,0 @@
-"""Tests for the M027 curtain module."""
-
-from homeassistant.components.cover import CoverDeviceClass, CoverEntityFeature
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.const import UnitOfTime
-
-from ..const import M027_CURTAIN_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.select import BasicSelectTests
-from ..mixins.sensor import MultiSensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-COMMAND_DPS = "1"
-POSITION_DPS = "2"
-CURRENTPOS_DPS = "3"
-MODE_DPS = "4"
-ACTION_DPS = "7"
-TIMER_DPS = "9"
-TRAVELTIME_DPS = "10"
-UNKNOWN12_DPS = "12"
-UNKNOWN101_DPS = "101"
-
-
-class TestM027Curtains(MultiSensorTests, BasicSelectTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("m027_curtain.yaml", M027_CURTAIN_PAYLOAD)
-        self.subject = self.entities["cover_curtain"]
-        self.setUpMultiSensors(
-            [
-                {
-                    "dps": TRAVELTIME_DPS,
-                    "name": "sensor_travel_time",
-                    "min": 1,
-                    "max": 120000,
-                    "unit": UnitOfTime.MILLISECONDS,
-                },
-                {
-                    "dps": TIMER_DPS,
-                    "name": "sensor_time_remaining",
-                    "device_class": SensorDeviceClass.DURATION,
-                    "min": 0,
-                    "max": 86400,
-                    "unit": UnitOfTime.SECONDS,
-                },
-            ]
-        )
-        self.setUpBasicSelect(
-            MODE_DPS,
-            self.entities.get("select_curtain_mode"),
-            {
-                "morning": "morning",
-                "night": "night",
-            },
-        )
-        self.mark_secondary(
-            [
-                "binary_sensor_problem",
-                "select_curtain_mode",
-                "sensor_time_remaining",
-                "sensor_travel_time",
-            ]
-        )
-
-    def test_device_class_is_curtain(self):
-        self.assertEqual(self.subject.device_class, CoverDeviceClass.CURTAIN)
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                CoverEntityFeature.OPEN
-                | CoverEntityFeature.CLOSE
-                | CoverEntityFeature.SET_POSITION
-                | CoverEntityFeature.STOP
-            ),
-        )
-
-    def test_current_cover_position(self):
-        self.dps[CURRENTPOS_DPS] = 47
-        self.assertEqual(self.subject.current_cover_position, 47)
-
-    def test_is_opening(self):
-        self.dps[ACTION_DPS] = "opening"
-        self.dps[CURRENTPOS_DPS] = 100
-        self.assertFalse(self.subject.is_opening)
-        self.dps[CURRENTPOS_DPS] = 50
-        self.assertTrue(self.subject.is_opening)
-        self.dps[ACTION_DPS] = "closing"
-        self.assertFalse(self.subject.is_opening)
-        self.dps[ACTION_DPS] = "opening"
-        self.dps[CURRENTPOS_DPS] = None
-        self.assertFalse(self.subject.is_opening)
-
-    def test_is_closing(self):
-        self.dps[ACTION_DPS] = "closing"
-        self.dps[CURRENTPOS_DPS] = 0
-        self.assertFalse(self.subject.is_closing)
-        self.dps[CURRENTPOS_DPS] = 50
-        self.assertTrue(self.subject.is_closing)
-        self.dps[ACTION_DPS] = "opening"
-        self.assertFalse(self.subject.is_closing)
-        self.dps[ACTION_DPS] = "closing"
-        self.dps[CURRENTPOS_DPS] = None
-        self.assertFalse(self.subject.is_closing)
-
-    def test_is_closed(self):
-        self.dps[CURRENTPOS_DPS] = 100
-        self.assertFalse(self.subject.is_closed)
-        self.dps[CURRENTPOS_DPS] = 0
-        self.assertTrue(self.subject.is_closed)
-        self.dps[ACTION_DPS] = "closing"
-        self.dps[CURRENTPOS_DPS] = None
-        self.assertTrue(self.subject.is_closed)
-
-    async def test_open_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "open"},
-        ):
-            await self.subject.async_open_cover()
-
-    async def test_close_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "close"},
-        ):
-            await self.subject.async_close_cover()
-
-    async def test_stop_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "stop"},
-        ):
-            await self.subject.async_stop_cover()
-
-    async def test_set_cover_position(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POSITION_DPS: 23},
-        ):
-            await self.subject.async_set_cover_position(23)

+ 0 - 117
tests/devices/test_moebot.py

@@ -1,117 +0,0 @@
-"""
-Test MoeBot S mower.
-Primarily for testing the STOP command which this device is the first to use,
-and the lawn_mower platform.
-"""
-
-from homeassistant.components.lawn_mower.const import (
-    LawnMowerActivity,
-    LawnMowerEntityFeature,
-)
-
-from ..const import MOEBOT_PAYLOAD
-from ..helpers import assert_device_properties_set
-from .base_device_tests import TuyaDeviceTestCase
-
-BATTERY_DP = "6"
-STATUS_DP = "101"
-ERROR_DP = "102"
-PROBLEM_DP = "103"
-RAINMODE_DP = "104"
-RUNTIME_DP = "105"
-PASSWD_DP = "106"  # noqa: S105
-CLEARSCHED_DP = "107"
-QUERYSCHED_DP = "108"
-QUERYZONE_DP = "109"
-SCHEDULE_DP = "110"
-ERRLOG_DP = "111"
-WORKLOG_DP = "112"
-ZONES_DP = "113"
-AUTOMODE_DP = "114"
-COMMAND_DP = "115"
-
-
-class TestMoebot(TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("moebot_s_mower.yaml", MOEBOT_PAYLOAD)
-        self.mower = self.entities.get("lawn_mower")
-        self.start_button = self.entities.get("button_start_fixed_mowing")
-        self.mark_secondary(
-            [
-                "binary_sensor_cover",
-                "binary_sensor_problem",
-                "select_mowing_mode",
-                "sensor_problem",
-                "switch_backward_blade_stop",
-                "switch_rain_mode",
-                "number_running_time",
-                "button_clear_schedule",
-                "button_query_schedule",
-                "button_query_zones",
-                "switch_hedgehog_protection",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.mower.supported_features,
-            (
-                LawnMowerEntityFeature.START_MOWING
-                | LawnMowerEntityFeature.PAUSE
-                | LawnMowerEntityFeature.DOCK
-            ),
-        )
-
-    def test_available(self):
-        """Skip available tests as this device has disabled entities."""
-        pass
-
-    def test_lawnmower_activity(self):
-        self.dps[STATUS_DP] = "ERROR"
-        self.assertEqual(self.mower.activity, LawnMowerActivity.ERROR)
-        self.dps[STATUS_DP] = "EMERGENCY"
-        self.assertEqual(self.mower.activity, LawnMowerActivity.ERROR)
-        self.dps[STATUS_DP] = "PAUSED"
-        self.assertEqual(self.mower.activity, LawnMowerActivity.PAUSED)
-        self.dps[STATUS_DP] = "PARK"
-        self.assertEqual(self.mower.activity, LawnMowerActivity.RETURNING)
-        self.dps[STATUS_DP] = "MOWING"
-        self.assertEqual(self.mower.activity, LawnMowerActivity.MOWING)
-        self.dps[STATUS_DP] = "FIXED_MOWING"
-        self.assertEqual(self.mower.activity, LawnMowerActivity.MOWING)
-        self.dps[STATUS_DP] = "STANDBY"
-        self.assertEqual(self.mower.activity, LawnMowerActivity.DOCKED)
-        self.dps[STATUS_DP] = "CHARGING"
-        self.assertEqual(self.mower.activity, LawnMowerActivity.DOCKED)
-        self.dps[STATUS_DP] = "LOCKED"
-        self.assertEqual(self.mower.activity, LawnMowerActivity.DOCKED)
-        self.dps[STATUS_DP] = "CHARGING_WITH_TASK_SUSPEND"
-        self.assertEqual(self.mower.activity, LawnMowerActivity.DOCKED)
-
-    async def test_async_start_mowing(self):
-        async with assert_device_properties_set(
-            self.mower._device,
-            {COMMAND_DP: "StartMowing"},
-        ):
-            await self.mower.async_start_mowing()
-
-    async def test_async_start_fixed_mowing(self):
-        async with assert_device_properties_set(
-            self.start_button._device,
-            {COMMAND_DP: "StartFixedMowing"},
-        ):
-            await self.start_button.async_press()
-
-    async def test_async_pause(self):
-        async with assert_device_properties_set(
-            self.mower._device,
-            {COMMAND_DP: "PauseWork"},
-        ):
-            await self.mower.async_pause()
-
-    async def test_async_dock(self):
-        async with assert_device_properties_set(
-            self.mower._device,
-            {COMMAND_DP: "StartReturnStation"},
-        ):
-            await self.mower.async_dock()

+ 0 - 106
tests/devices/test_moes_bht002_thermostat.py

@@ -1,106 +0,0 @@
-from homeassistant.components.climate.const import (
-    PRESET_COMFORT,
-    PRESET_ECO,
-    ClimateEntityFeature,
-    HVACMode,
-)
-from homeassistant.const import UnitOfTemperature
-
-from ..const import MOES_BHT002_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.climate import TargetTemperatureTests
-from ..mixins.lock import BasicLockTests
-from .base_device_tests import TuyaDeviceTestCase
-
-POWER_DPS = "1"
-TEMPERATURE_DPS = "2"
-CURRENTTEMP_DPS = "3"
-HVACMODE_DPS = "4"
-PRESET_DPS = "5"
-LOCK_DPS = "6"
-UNKNOWN104_DPS = "104"
-
-
-class TestMoesBHT002Thermostat(
-    BasicLockTests, TargetTemperatureTests, TuyaDeviceTestCase
-):
-    def setUp(self):
-        self.setUpForConfig(
-            "moes_bht002_thermostat_c.yaml",
-            MOES_BHT002_PAYLOAD,
-        )
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=5.0,
-            max=35.0,
-            scale=2,
-        )
-        self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock"))
-        self.mark_secondary(["lock_child_lock"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                ClimateEntityFeature.PRESET_MODE
-                | ClimateEntityFeature.TARGET_TEMPERATURE
-                | ClimateEntityFeature.TURN_OFF
-                | ClimateEntityFeature.TURN_ON
-            ),
-        )
-
-    def test_temperature_unit(self):
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-
-    async def test_legacy_set_temperature_with_preset_mode(self):
-        async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: True}
-        ):
-            await self.subject.async_set_temperature(preset_mode=PRESET_ECO)
-
-    async def test_legacy_set_temperature_with_both_properties(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                TEMPERATURE_DPS: 44,
-                PRESET_DPS: False,
-            },
-        ):
-            await self.subject.async_set_temperature(
-                temperature=22, preset_mode=PRESET_COMFORT
-            )
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 44
-        self.assertEqual(self.subject.current_temperature, 22)
-
-    def test_hvac_mode(self):
-        self.dps[POWER_DPS] = False
-        self.dps[HVACMODE_DPS] = "0"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-        self.dps[POWER_DPS] = True
-        self.assertEqual(self.subject.hvac_mode, HVACMode.AUTO)
-
-        self.dps[HVACMODE_DPS] = "1"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(
-            self.subject.hvac_modes,
-            [
-                HVACMode.HEAT,
-                HVACMode.AUTO,
-                HVACMode.OFF,
-            ],
-        )
-
-    def test_extra_state_attributes(self):
-        self.dps[UNKNOWN104_DPS] = False
-
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {"unknown_104": False},
-        )

+ 0 - 214
tests/devices/test_moes_rgb_socket.py

@@ -1,214 +0,0 @@
-"""Tests for the MoesHouse RGB smart socket."""
-
-from homeassistant.components.light import (
-    EFFECT_OFF,
-    ColorMode,
-    LightEntityFeature,
-)
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.components.switch import SwitchDeviceClass
-from homeassistant.const import (
-    UnitOfElectricCurrent,
-    UnitOfElectricPotential,
-    UnitOfPower,
-)
-
-from ..const import MOES_RGB_SOCKET_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.sensor import MultiSensorTests
-from ..mixins.switch import BasicSwitchTests
-from .base_device_tests import TuyaDeviceTestCase
-
-LIGHT_DPS = "1"
-MODE_DPS = "2"
-BRIGHTNESS_DPS = "3"
-UNKNOWN4_DPS = "4"
-RGB_DPS = "5"
-SCENE_DPS = "6"
-SCENE1_DPS = "7"
-SCENE2_DPS = "8"
-SCENE3_DPS = "9"
-SCENE4_DPS = "10"
-SWITCH_DPS = "101"
-TIMER_DPS = "102"
-CURRENT_DPS = "104"
-POWER_DPS = "105"
-VOLTAGE_DPS = "106"
-
-
-class TestMoesRGBSocket(
-    MultiSensorTests,
-    BasicSwitchTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("moes_rgb_socket.yaml", MOES_RGB_SOCKET_PAYLOAD)
-        self.light = self.entities.get("light_nightlight")
-
-        self.setUpBasicSwitch(
-            SWITCH_DPS,
-            self.entities.get("switch_outlet"),
-            device_class=SwitchDeviceClass.OUTLET,
-            power_dps=POWER_DPS,
-            power_scale=10,
-        )
-        self.setUpMultiSensors(
-            [
-                {
-                    "name": "sensor_voltage",
-                    "dps": VOLTAGE_DPS,
-                    "unit": UnitOfElectricPotential.VOLT,
-                    "device_class": SensorDeviceClass.VOLTAGE,
-                    "state_class": "measurement",
-                    "testdata": (2300, 230.0),
-                },
-                {
-                    "name": "sensor_current",
-                    "dps": CURRENT_DPS,
-                    "unit": UnitOfElectricCurrent.MILLIAMPERE,
-                    "device_class": SensorDeviceClass.CURRENT,
-                    "state_class": "measurement",
-                },
-                {
-                    "name": "sensor_power",
-                    "dps": POWER_DPS,
-                    "unit": UnitOfPower.WATT,
-                    "device_class": SensorDeviceClass.POWER,
-                    "state_class": "measurement",
-                    "testdata": (1234, 123.4),
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "sensor_current",
-                "sensor_power",
-                "sensor_voltage",
-                "time_timer",
-            ]
-        )
-
-    def test_light_is_on(self):
-        self.dps[LIGHT_DPS] = True
-        self.assertTrue(self.light.is_on)
-        self.dps[LIGHT_DPS] = False
-        self.assertFalse(self.light.is_on)
-
-    def test_light_brightness(self):
-        self.dps[BRIGHTNESS_DPS] = 45
-        self.dps[MODE_DPS] = "white"
-        self.assertEqual(self.light.brightness, 23)
-        self.dps[RGB_DPS] = "808000003cff80"
-        self.dps[MODE_DPS] = "colour"
-        self.assertEqual(self.light.brightness, 128)
-
-    def test_light_color_mode(self):
-        self.dps[MODE_DPS] = "colour"
-        self.assertEqual(self.light.color_mode, ColorMode.HS)
-        self.dps[MODE_DPS] = "white"
-        self.assertEqual(self.light.color_mode, ColorMode.WHITE)
-        self.dps[MODE_DPS] = "scene"
-        self.assertEqual(self.light.color_mode, ColorMode.HS)
-        self.dps[MODE_DPS] = "scene_1"
-        self.assertEqual(self.light.color_mode, ColorMode.HS)
-        self.dps[MODE_DPS] = "scene_2"
-        self.assertEqual(self.light.color_mode, ColorMode.HS)
-        self.dps[MODE_DPS] = "scene_3"
-        self.assertEqual(self.light.color_mode, ColorMode.HS)
-        self.dps[MODE_DPS] = "scene_4"
-        self.assertEqual(self.light.color_mode, ColorMode.HS)
-
-    def test_light_hs_color(self):
-        self.dps[RGB_DPS] = "ffff00003cffff"
-        self.dps[BRIGHTNESS_DPS] = 255
-        self.assertSequenceEqual(
-            self.light.hs_color,
-            (60, 100),
-        )
-
-    def test_light_effect_list(self):
-        self.assertCountEqual(
-            self.light.effect_list,
-            [
-                "Scene",
-                "Scene 1",
-                "Scene 2",
-                "Scene 3",
-                "Scene 4",
-                EFFECT_OFF,
-            ],
-        )
-
-    def test_light_effect(self):
-        self.dps[MODE_DPS] = "scene"
-        self.assertEqual(self.light.effect, "Scene")
-        self.dps[MODE_DPS] = "scene_1"
-        self.assertEqual(self.light.effect, "Scene 1")
-        self.dps[MODE_DPS] = "scene_2"
-        self.assertEqual(self.light.effect, "Scene 2")
-        self.dps[MODE_DPS] = "scene_3"
-        self.assertEqual(self.light.effect, "Scene 3")
-        self.dps[MODE_DPS] = "scene_4"
-        self.assertEqual(self.light.effect, "Scene 4")
-
-    def test_light_supported_color_modes(self):
-        self.assertCountEqual(
-            self.light.supported_color_modes,
-            {ColorMode.HS, ColorMode.WHITE},
-        )
-
-    def test_light_supported_features(self):
-        self.assertEqual(self.light.supported_features, LightEntityFeature.EFFECT)
-
-    async def test_turn_on(self):
-        self.dps[LIGHT_DPS] = False
-        async with assert_device_properties_set(self.light._device, {LIGHT_DPS: True}):
-            await self.light.async_turn_on()
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(self.light._device, {LIGHT_DPS: False}):
-            await self.light.async_turn_off()
-
-    async def test_set_brightness(self):
-        self.dps[LIGHT_DPS] = True
-        self.dps[MODE_DPS] = "white"
-        async with assert_device_properties_set(
-            self.light._device,
-            {
-                BRIGHTNESS_DPS: 140,
-            },
-        ):
-            await self.light.async_turn_on(brightness=128)
-
-    async def test_set_hs_color(self):
-        self.dps[BRIGHTNESS_DPS] = 255
-        self.dps[LIGHT_DPS] = True
-        self.dps[MODE_DPS] = "colour"
-
-        async with assert_device_properties_set(
-            self.light._device,
-            {
-                RGB_DPS: "ff00000000ffff",
-            },
-        ):
-            await self.light.async_turn_on(hs_color=(0, 100))
-
-    def test_extra_state_attributes_set(self):
-        self.dps[UNKNOWN4_DPS] = 4
-        self.dps[SCENE_DPS] = "scene"
-        self.dps[SCENE1_DPS] = "scene1"
-        self.dps[SCENE2_DPS] = "scene2"
-        self.dps[SCENE3_DPS] = "scene3"
-        self.dps[SCENE4_DPS] = "scene4"
-
-        self.assertDictEqual(
-            self.light.extra_state_attributes,
-            {
-                "unknown_4": 4,
-                "scene_data": "scene",
-                "flash_scene_1": "scene1",
-                "flash_scene_2": "scene2",
-                "flash_scene_3": "scene3",
-                "flash_scene_4": "scene4",
-            },
-        )

+ 0 - 151
tests/devices/test_motion_sensor_light.py

@@ -1,151 +0,0 @@
-from homeassistant.components.number.const import NumberDeviceClass
-from homeassistant.const import LIGHT_LUX, UnitOfTime
-
-from ..const import MOTION_LIGHT_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.number import MultiNumberTests
-from ..mixins.switch import BasicSwitchTests
-from .base_device_tests import TuyaDeviceTestCase
-
-EFFECT_DPS = "101"
-SWITCH_DPS = "102"
-PROX_DPS = "103"
-TIME_DPS = "104"
-LUX_DPS = "105"
-RESET_DPS = "106"
-
-
-class TestMotionLight(BasicSwitchTests, MultiNumberTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("motion_sensor_light.yaml", MOTION_LIGHT_PAYLOAD)
-        self.subject = self.entities.get("light")
-        self.auto_sw = self.entities.get("switch_auto_mode")
-        self.setUpBasicSwitch(RESET_DPS, self.entities.get("switch_auto_reset"))
-        self.setUpMultiNumber(
-            [
-                {
-                    "dps": PROX_DPS,
-                    "name": "number_sensitivity",
-                    "min": 0,
-                    "max": 4,
-                    "testdata": (1, 3),
-                },
-                {
-                    "dps": TIME_DPS,
-                    "name": "number_duration",
-                    "device_class": NumberDeviceClass.DURATION,
-                    "min": 10,
-                    "max": 900,
-                    "step": 10,
-                    "unit": UnitOfTime.SECONDS,
-                },
-                {
-                    "dps": LUX_DPS,
-                    "name": "number_light_level",
-                    "device_class": NumberDeviceClass.ILLUMINANCE,
-                    "min": 0,
-                    "max": 3900,
-                    "unit": LIGHT_LUX,
-                    "testdata": (1900, 2000),
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "number_duration",
-                "number_light_level",
-                "number_sensitivity",
-                "switch_auto_reset",
-            ]
-        )
-
-    def test_effects(self):
-        self.assertCountEqual(
-            self.subject.effect_list,
-            ["auto", "off", "on"],
-        )
-
-    def test_effect(self):
-        self.dps[EFFECT_DPS] = "mode_on"
-        self.assertEqual(self.subject.effect, "on")
-        self.dps[EFFECT_DPS] = "mode_off"
-        self.assertEqual(self.subject.effect, "off")
-        self.dps[EFFECT_DPS] = "mode_auto"
-        self.assertEqual(self.subject.effect, "auto")
-
-    def test_is_on_reflects_switch(self):
-        self.dps[SWITCH_DPS] = True
-        self.assertTrue(self.subject.is_on)
-        self.dps[SWITCH_DPS] = False
-        self.assertFalse(self.subject.is_on)
-
-    async def test_turn_on_via_effect(self):
-        self.dps[SWITCH_DPS] = False
-        async with assert_device_properties_set(
-            self.subject._device,
-            {EFFECT_DPS: "mode_on"},
-        ):
-            await self.subject.async_turn_on()
-
-    async def test_turn_off_via_effect(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {EFFECT_DPS: "mode_off"},
-        ):
-            await self.subject.async_turn_off()
-
-    async def test_set_to_auto(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {EFFECT_DPS: "mode_auto"},
-        ):
-            await self.subject.async_turn_on(effect="auto")
-
-    def test_auto_mode_is_on(self):
-        self.dps[SWITCH_DPS] = False
-        self.dps[EFFECT_DPS] = "mode_auto"
-        self.assertTrue(self.auto_sw.is_on)
-        self.assertFalse(self.subject.is_on)
-        self.dps[EFFECT_DPS] = "mode_off"
-        self.assertFalse(self.auto_sw.is_on)
-        self.assertFalse(self.subject.is_on)
-        self.dps[SWITCH_DPS] = True
-        self.dps[EFFECT_DPS] = "mode_auto"
-        self.assertTrue(self.auto_sw.is_on)
-        self.assertTrue(self.subject.is_on)
-        self.dps[EFFECT_DPS] = "mode_on"
-        self.assertFalse(self.auto_sw.is_on)
-        self.assertTrue(self.subject.is_on)
-
-    async def test_auto_mode_async_turn_on_off(self):
-        self.dps[SWITCH_DPS] = True
-        self.dps[EFFECT_DPS] = "mode_auto"
-        async with assert_device_properties_set(
-            self.subject._device,
-            {EFFECT_DPS: "mode_on"},
-        ):
-            await self.auto_sw.async_turn_off()
-
-        self.dps[SWITCH_DPS] = False
-        self.dps[EFFECT_DPS] = "mode_auto"
-        async with assert_device_properties_set(
-            self.subject._device,
-            {EFFECT_DPS: "mode_off"},
-        ):
-            await self.auto_sw.async_turn_off()
-
-        self.dps[SWITCH_DPS] = True
-        self.dps[EFFECT_DPS] = "mode_on"
-        async with assert_device_properties_set(
-            self.subject._device,
-            {EFFECT_DPS: "mode_auto"},
-        ):
-            await self.auto_sw.async_turn_on()
-
-        self.dps[SWITCH_DPS] = False
-        self.dps[EFFECT_DPS] = "mode_off"
-        async with assert_device_properties_set(
-            self.subject._device,
-            {EFFECT_DPS: "mode_auto"},
-        ):
-            await self.auto_sw.async_turn_on()

+ 0 - 53
tests/devices/test_mustool_mt15mt29_airbox.py

@@ -1,53 +0,0 @@
-"""Tests for Mustool MT15/MT29 Airbox, mainly for time entity."""
-
-from ..const import MUSTOOL_MT15MT29_AIRBOX_PAYLOAD
-from ..mixins.time import MultiTimeTests
-from .base_device_tests import TuyaDeviceTestCase
-
-
-class TestMustoolMT15MT29Airbox(MultiTimeTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig(
-            "mustool_mt15mt29_airbox.yaml", MUSTOOL_MT15MT29_AIRBOX_PAYLOAD
-        )
-        self.setUpMultiTime(
-            [
-                {
-                    "minute": "109",
-                    "name": "time_alarm_1",
-                    "testdata": {"minute": 600, "time": "10:00:00"},
-                },
-                {
-                    "minute": "110",
-                    "name": "time_alarm_2",
-                },
-                {
-                    "minute": "111",
-                    "name": "time_alarm_3",
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "sensor_battery",
-                "binary_sensor_plug",
-                "select_alarm_volume",
-                "light_backlight",
-                "number_co2_alarm_threshold",
-                "number_sleep_timer",
-                "number_timer",
-                "number_alarm_1",
-                "number_alarm_2",
-                "number_alarm_3",
-                "time_alarm_1",
-                "time_alarm_2",
-                "time_alarm_3",
-                "select_temperature_unit",
-                "number_co_alarm_threshold",
-                "number_pm2_5_alarm_threshold",
-                "number_formaldehyde_alarm_threshold",
-                "switch_alarm_1",
-                "switch_alarm_2",
-                "switch_alarm_3",
-            ]
-        )

+ 0 - 150
tests/devices/test_nashone_mts700wb_thermostat.py

@@ -1,150 +0,0 @@
-from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
-from homeassistant.components.number import NumberDeviceClass
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.const import UnitOfTemperature, UnitOfTime
-
-from ..const import NASHONE_MTS700WB_THERMOSTAT_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.button import BasicButtonTests
-from ..mixins.climate import TargetTemperatureTests
-from ..mixins.number import BasicNumberTests
-from ..mixins.select import BasicSelectTests
-from ..mixins.sensor import BasicSensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-POWER_DPS = "1"
-HVACMODE_DPS = "2"
-HVACACTION_DPS = "3"
-TEMPERATURE_DPS = "16"
-TEMPF_DPS = "17"
-UNIT_DPS = "23"
-CURRENTTEMP_DPS = "24"
-CALIBOFFSET_DPS = "27"
-CURRTEMPF_DPS = "29"
-RESET_DPS = "39"
-TIMER_DPS = "41"
-COUNTDOWN_DPS = "42"
-
-
-class TestNashoneMTS700WBThermostat(
-    BasicButtonTests,
-    BasicNumberTests,
-    BasicSelectTests,
-    BasicSensorTests,
-    TargetTemperatureTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig(
-            "nashone_mts700wb_thermostat.yaml",
-            NASHONE_MTS700WB_THERMOSTAT_PAYLOAD,
-        )
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=-20.0,
-            max=105.0,
-        )
-        self.setUpBasicButton(
-            RESET_DPS,
-            self.entities.get("button_factory_reset"),
-        )
-        self.setUpBasicNumber(
-            CALIBOFFSET_DPS,
-            self.entities.get("number_temperature_calibration"),
-            min=-5,
-            max=5,
-            device_class=NumberDeviceClass.TEMPERATURE_DELTA,
-            unit=UnitOfTemperature.CELSIUS,
-        )
-        self.setUpBasicSelect(
-            TIMER_DPS,
-            self.entities.get("select_timer"),
-            {
-                "cancel": "cancel",
-                "1h": "1h",
-            },
-        )
-        self.setUpBasicSensor(
-            COUNTDOWN_DPS,
-            self.entities.get("sensor_time_remaining"),
-            unit=UnitOfTime.SECONDS,
-            device_class=SensorDeviceClass.DURATION,
-        )
-        self.mark_secondary(
-            [
-                "button_factory_reset",
-                "number_temperature_calibration",
-                "select_timer",
-                "sensor_time_remaining",
-            ],
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            ClimateEntityFeature.TARGET_TEMPERATURE
-            | ClimateEntityFeature.TURN_OFF
-            | ClimateEntityFeature.TURN_ON,
-        )
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 24
-        self.assertEqual(self.subject.current_temperature, 24)
-
-    def test_hvac_mode(self):
-        self.dps[POWER_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-        self.dps[POWER_DPS] = True
-        self.dps[HVACMODE_DPS] = "hot"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-        self.dps[HVACMODE_DPS] = "cold"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.COOL)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(
-            self.subject.hvac_modes,
-            [
-                HVACMode.COOL,
-                HVACMode.HEAT,
-                HVACMode.OFF,
-            ],
-        )
-
-    async def test_set_hvac_mode_cool(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DPS: True, HVACMODE_DPS: "cold"},
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.COOL)
-
-    async def test_set_hvac_mode_heat(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DPS: True, HVACMODE_DPS: "hot"},
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT)
-
-    async def test_set_hvac_mode_off(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DPS: False},
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    # def test_hvac_action(self):
-    #     self.dps[HVACMODE_DPS] = "hot"
-    #     self.dps[HVACACTION_DPS] = "manual"
-    #     self.assertEqual(self.subject.hvac_action, HVACAction.HEATING)
-    #     self.dps[HVACMODE_DPS] = "cold"
-    #     self.assertEqual(self.subject.hvac_action, HVACAction.COOLING)
-
-    def test_extra_state_attributes(self):
-        self.dps[HVACACTION_DPS] = "manual"
-        self.assertEqual(
-            self.subject.extra_state_attributes,
-            {"work_state": "manual"},
-        )

+ 0 - 127
tests/devices/test_nedis_htpl20f_heater.py

@@ -1,127 +0,0 @@
-from homeassistant.components.climate.const import (
-    PRESET_AWAY,
-    PRESET_COMFORT,
-    PRESET_ECO,
-    ClimateEntityFeature,
-    HVACMode,
-)
-from homeassistant.const import UnitOfTemperature
-
-from ..const import NEDIS_HTPL20F_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.climate import TargetTemperatureTests
-from ..mixins.lock import BasicLockTests
-from .base_device_tests import TuyaDeviceTestCase
-
-HVACMODE_DPS = "1"
-TEMPERATURE_DPS = "2"
-CURRENTTEMP_DPS = "3"
-PRESET_DPS = "4"
-LOCK_DPS = "7"
-UNKNOWN11_DPS = "11"
-TIMER_DPS = "13"
-UNKNOWN101_DPS = "101"
-
-
-class TestNedisHtpl20fHeater(
-    BasicLockTests,
-    TargetTemperatureTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("nedis_htpl20f_heater.yaml", NEDIS_HTPL20F_PAYLOAD)
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=15.0,
-            max=35.0,
-        )
-        self.setUpBasicLock(
-            LOCK_DPS,
-            self.entities.get("lock_child_lock"),
-        )
-        self.mark_secondary(["lock_child_lock", "time_timer"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                ClimateEntityFeature.TARGET_TEMPERATURE
-                | ClimateEntityFeature.PRESET_MODE
-                | ClimateEntityFeature.TURN_OFF
-                | ClimateEntityFeature.TURN_ON
-            ),
-        )
-
-    def test_temperature_unit_returns_celsius(self):
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 25
-        self.assertEqual(self.subject.current_temperature, 25)
-
-    def test_hvac_mode(self):
-        self.dps[HVACMODE_DPS] = True
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-        self.dps[HVACMODE_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(self.subject.hvac_modes, [HVACMode.OFF, HVACMode.HEAT])
-
-    async def test_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: True}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT)
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: False}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    def test_preset_modes(self):
-        self.assertCountEqual(
-            self.subject.preset_modes,
-            [PRESET_COMFORT, PRESET_ECO, PRESET_AWAY],
-        )
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = "1"
-        self.assertEqual(self.subject.preset_mode, PRESET_ECO)
-
-        self.dps[PRESET_DPS] = "2"
-        self.assertEqual(self.subject.preset_mode, PRESET_COMFORT)
-
-        self.dps[PRESET_DPS] = "3"
-        self.assertEqual(self.subject.preset_mode, PRESET_AWAY)
-
-    async def test_set_preset_more_to_eco(self):
-        async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: "1"}
-        ):
-            await self.subject.async_set_preset_mode(PRESET_ECO)
-
-    async def test_set_preset_more_to_comfort(self):
-        async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: "2"}
-        ):
-            await self.subject.async_set_preset_mode(PRESET_COMFORT)
-
-    async def test_set_preset_more_to_away(self):
-        async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: "3"}
-        ):
-            await self.subject.async_set_preset_mode(PRESET_AWAY)
-
-    def test_extra_state_attributes(self):
-        self.dps[UNKNOWN11_DPS] = "11"
-        self.dps[UNKNOWN101_DPS] = True
-
-        self.assertCountEqual(
-            self.subject.extra_state_attributes,
-            {"unknown_11": "11", "unknown_101": True},
-        )

+ 0 - 182
tests/devices/test_orion_outdoor_siren.py

@@ -1,182 +0,0 @@
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.components.siren import SirenEntityFeature
-from homeassistant.const import PERCENTAGE
-
-from ..const import ORION_SIREN_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import MultiBinarySensorTests
-from ..mixins.sensor import BasicSensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-TONE_DP = "1"
-VOLUME_DP = "5"
-CHARGING_DP = "6"
-DURATION_DP = "7"
-BATTERY_DP = "15"
-TAMPER_DP = "20"
-
-DEFAULT_TONE = "alarm_sound_light"
-
-
-class TestOrionSiren(MultiBinarySensorTests, BasicSensorTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("orion_outdoor_siren.yaml", ORION_SIREN_PAYLOAD)
-        self.subject = self.entities.get("siren")
-        self.setUpMultiBinarySensors(
-            [
-                {
-                    "dps": CHARGING_DP,
-                    "name": "binary_sensor_charging",
-                    "device_class": BinarySensorDeviceClass.BATTERY_CHARGING,
-                },
-                {
-                    "dps": TAMPER_DP,
-                    "name": "binary_sensor_tamper_detect",
-                    "device_class": BinarySensorDeviceClass.TAMPER,
-                },
-            ]
-        )
-        self.setUpBasicSensor(
-            BATTERY_DP,
-            self.entities.get("sensor_battery"),
-            unit=PERCENTAGE,
-            device_class=SensorDeviceClass.BATTERY,
-        )
-        self.mark_secondary(
-            ["sensor_battery", "binary_sensor_charging", "binary_sensor_tamper_detect"]
-        )
-
-    def test_supported_features(self):
-        """Test the supported features of the siren"""
-        self.assertEqual(
-            self.subject.supported_features,
-            SirenEntityFeature.TURN_ON
-            | SirenEntityFeature.TURN_OFF
-            | SirenEntityFeature.TONES
-            | SirenEntityFeature.DURATION
-            | SirenEntityFeature.VOLUME_SET,
-        )
-
-    def test_available_tones(self):
-        """Test the available tones from the siren"""
-        self.assertCountEqual(
-            self.subject.available_tones,
-            [
-                "sound",
-                "light",
-                "sound+light",
-            ],
-        )
-
-    async def test_set_to_sound(self):
-        """Test turning on the siren with various parameters"""
-        async with assert_device_properties_set(
-            self.subject._device, {TONE_DP: "alarm_sound"}
-        ):
-            await self.subject.async_turn_on(tone="sound")
-
-    async def test_set_to_light(self):
-        """Test turning on the siren with various parameters"""
-        async with assert_device_properties_set(
-            self.subject._device, {TONE_DP: "alarm_light"}
-        ):
-            await self.subject.async_turn_on(tone="light")
-
-    async def test_set_to_sound_light(self):
-        """Test turning on the siren with various parameters"""
-        async with assert_device_properties_set(
-            self.subject._device, {TONE_DP: "alarm_sound_light"}
-        ):
-            await self.subject.async_turn_on(tone="sound+light")
-
-    async def test_turn_off(self):
-        """Test turning on the siren with various parameters"""
-        async with assert_device_properties_set(
-            self.subject._device, {TONE_DP: "normal"}
-        ):
-            await self.subject.async_turn_off()
-
-    async def test_turn_on_no_param(self):
-        """Test turning on the siren with no parameters"""
-        async with assert_device_properties_set(
-            self.subject._device,
-            {TONE_DP: DEFAULT_TONE},
-        ):
-            await self.subject.async_turn_on()
-
-    async def test_set_volume_low(self):
-        """Test turning on the siren with various parameters"""
-        async with assert_device_properties_set(
-            self.subject._device, {VOLUME_DP: "low", TONE_DP: DEFAULT_TONE}
-        ):
-            await self.subject.async_turn_on(volume_level=0.3)
-
-    async def test_set_volume_mid(self):
-        """Test turning on the siren with various parameters"""
-        async with assert_device_properties_set(
-            self.subject._device, {VOLUME_DP: "middle", TONE_DP: DEFAULT_TONE}
-        ):
-            await self.subject.async_turn_on(volume_level=0.7)
-
-    async def test_set_volume_high(self):
-        """Test turning on the siren with various parameters"""
-        async with assert_device_properties_set(
-            self.subject._device, {VOLUME_DP: "high", TONE_DP: DEFAULT_TONE}
-        ):
-            await self.subject.async_turn_on(volume_level=1.0)
-
-    async def test_set_volume_mute(self):
-        """Test turning on the siren with various parameters"""
-        async with assert_device_properties_set(
-            self.subject._device, {VOLUME_DP: "mute", TONE_DP: DEFAULT_TONE}
-        ):
-            await self.subject.async_turn_on(volume_level=0.0)
-
-    async def test_set_duration(self):
-        """Test turning on the siren with various parameters"""
-        async with assert_device_properties_set(
-            self.subject._device, {DURATION_DP: 5, TONE_DP: DEFAULT_TONE}
-        ):
-            await self.subject.async_turn_on(duration=5)
-
-    async def test_set_multi(self):
-        """Test turning on the siren with various parameters"""
-        async with assert_device_properties_set(
-            self.subject._device,
-            {TONE_DP: "alarm_sound", DURATION_DP: 4, VOLUME_DP: "high"},
-        ):
-            await self.subject.async_turn_on(tone="sound", duration=4, volume_level=0.9)
-
-    async def test_turn_on_keeps_tone_when_already_on(self):
-        """Test calling turn_on without a tone parameter when the siren is on"""
-        self.dps[TONE_DP] = "alarm_light"
-        async with assert_device_properties_set(
-            self.subject._device, {VOLUME_DP: "low", TONE_DP: "alarm_light"}
-        ):
-            await self.subject.async_turn_on(volume_level=0.5)
-
-    def test_is_on(self):
-        """Test the is_on property"""
-        self.dps[TONE_DP] = "normal"
-        self.assertFalse(self.subject.is_on)
-        self.dps[TONE_DP] = "alarm_light"
-        self.assertTrue(self.subject.is_on)
-        self.dps[TONE_DP] = "alarm_sound"
-        self.assertTrue(self.subject.is_on)
-        self.dps[TONE_DP] = "alarm_sound_light"
-        self.assertTrue(self.subject.is_on)
-
-    def test_extra_attributes(self):
-        """Test reading the extra attributes from the siren"""
-        self.dps[TONE_DP] = "alarm_light"
-        self.dps[VOLUME_DP] = "middle"
-        self.dps[DURATION_DP] = 3
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {
-                "tone": "light",
-                "volume_level": 0.67,
-                "duration": 3,
-            },
-        )

+ 0 - 146
tests/devices/test_orion_smartlock.py

@@ -1,146 +0,0 @@
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.const import PERCENTAGE
-
-from ..const import ORION_SMARTLOCK_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import MultiBinarySensorTests
-from ..mixins.sensor import MultiSensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-ULFP_DP = "1"
-ULPWD_DP = "2"
-ULTMP_DP = "3"
-ULDYN_DP = "4"
-ULCARD_DP = "5"
-ERROR_DP = "8"
-REQUEST_DP = "9"
-APPROVE_DP = "10"
-BATTERY_DP = "12"
-ULAPP_DP = "15"
-DURESS_DP = "16"
-
-
-class TestOrionSmartLock(
-    MultiBinarySensorTests,
-    MultiSensorTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("orion_smart_lock.yaml", ORION_SMARTLOCK_PAYLOAD)
-        self.subject = self.entities.get("lock")
-        self.setUpMultiBinarySensors(
-            [
-                {
-                    "dps": ERROR_DP,
-                    "name": "binary_sensor_tampered",
-                    "device_class": BinarySensorDeviceClass.TAMPER,
-                    "testdata": (33, 0),
-                },
-                {
-                    "dps": DURESS_DP,
-                    "name": "binary_sensor_duress",
-                    "device_class": BinarySensorDeviceClass.SAFETY,
-                },
-            ]
-        )
-        self.setUpMultiSensors(
-            [
-                {
-                    "dps": ERROR_DP,
-                    "name": "sensor_alert",
-                    "testdata": (512, "key_left_in"),
-                    "device_class": SensorDeviceClass.ENUM,
-                    "options": [
-                        "wrong_finger",
-                        "wrong_password",
-                        "wrong_card",
-                        "wrong_face",
-                        "lock_jammed_closed",
-                        "high_temperature",
-                        "open_too_long",
-                        "lock_jammed_open",
-                        "lock_forced",
-                        "key_left_in",
-                        "battery_dead",
-                        "battery_low",
-                        "shock",
-                    ],
-                },
-                {
-                    "dps": BATTERY_DP,
-                    "name": "sensor_battery",
-                    "device_class": SensorDeviceClass.BATTERY,
-                    "unit": PERCENTAGE,
-                },
-            ]
-        )
-        self.mark_secondary(["sensor_alert"])
-
-    def test_is_locked(self):
-        # Default is all 0
-        self.assertTrue(self.subject.is_locked)
-        self.dps[ULFP_DP] = 1
-        self.assertFalse(self.subject.is_locked)
-        self.dps[ULFP_DP] = 0
-        self.dps[ULPWD_DP] = 2
-        self.assertFalse(self.subject.is_locked)
-        self.dps[ULPWD_DP] = 0
-        self.dps[ULTMP_DP] = 3
-        self.assertFalse(self.subject.is_locked)
-        self.dps[ULTMP_DP] = 0
-        self.dps[ULDYN_DP] = 4
-        self.assertFalse(self.subject.is_locked)
-        self.dps[ULDYN_DP] = 0
-        self.dps[ULCARD_DP] = 5
-        self.assertFalse(self.subject.is_locked)
-        self.dps[ULCARD_DP] = 0
-        self.dps[ULAPP_DP] = 6
-        self.assertFalse(self.subject.is_locked)
-
-    def test_is_jammed(self):
-        self.assertFalse(self.subject.is_jammed)
-        self.dps[ERROR_DP] = 1
-        self.assertFalse(self.subject.is_jammed)
-        self.dps[ERROR_DP] = 16
-        self.assertTrue(self.subject.is_jammed)
-        self.dps[ERROR_DP] = 128
-        self.assertTrue(self.subject.is_jammed)
-        self.dps[ERROR_DP] = 17
-        self.assertTrue(self.subject.is_jammed)
-        self.dps[ERROR_DP] = 144
-        self.assertTrue(self.subject.is_jammed)
-
-    def test_changed_by(self):
-        self.dps[ULFP_DP] = 1
-        self.assertEqual(self.subject.changed_by, "Finger #1")
-        self.dps[ULFP_DP] = 0
-        self.dps[ULPWD_DP] = 2
-        self.assertEqual(self.subject.changed_by, "Password #2")
-        self.dps[ULPWD_DP] = 0
-        self.dps[ULTMP_DP] = 3
-        self.assertEqual(self.subject.changed_by, "Temporary Password #3")
-        self.dps[ULTMP_DP] = 0
-        self.dps[ULDYN_DP] = 4
-        self.assertEqual(self.subject.changed_by, "Dynamic Password #4")
-        self.dps[ULDYN_DP] = 0
-        self.dps[ULCARD_DP] = 5
-        self.assertEqual(self.subject.changed_by, "Card #5")
-        self.dps[ULCARD_DP] = 0
-        self.dps[ULAPP_DP] = 6
-        self.assertEqual(self.subject.changed_by, "App #6")
-
-    def test_extra_state_attributes(self):
-        self.assertEqual(self.subject.extra_state_attributes, {})
-
-    async def test_unlock(self):
-        self.dps[REQUEST_DP] = 30
-        async with assert_device_properties_set(
-            self.subject._device, {APPROVE_DP: True}
-        ):
-            await self.subject.async_unlock()
-
-    async def test_unlock_fails_when_not_requested(self):
-        self.dps[REQUEST_DP] = 0
-        with self.assertRaises(TimeoutError):
-            await self.subject.async_unlock()

+ 0 - 184
tests/devices/test_parkside_plgs2012a1_smart_charger.py

@@ -1,184 +0,0 @@
-"""Tests for Parkside PLGS 2012 A1 Smart Charger"""
-
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.number.const import NumberDeviceClass
-from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass
-from homeassistant.const import (
-    PERCENTAGE,
-    UnitOfElectricCurrent,
-    UnitOfElectricPotential,
-    UnitOfTemperature,
-    UnitOfTime,
-)
-
-from ..const import PARKSIDE_PLGS2012A1_PAYLOAD
-from ..mixins.binary_sensor import MultiBinarySensorTests
-from ..mixins.number import MultiNumberTests
-from ..mixins.select import BasicSelectTests
-from ..mixins.sensor import MultiSensorTests
-from ..mixins.switch import MultiSwitchTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-NAME_DPS = "2"
-CURRENT_DPS = "3"
-VOLTAGE_DPS = "4"
-BATTERY_DPS = "5"
-TEMPERATURE_DPS = "6"
-MODE_DPS = "7"
-STORAGE_DPS = "8"
-LIMITER_DPS = "9"
-MAXTEMPCOUNT_DPS = "10"
-FAULT_DPS = "11"
-MAXCURRENT_DPS = "101"
-REMAIN_DPS = "102"
-ALMOSTCHARGED_DPS = "103"
-FULLYCHARGED_DPS = "104"
-
-
-class TestParksidePLGS2012A1Charger(
-    MultiBinarySensorTests,
-    MultiNumberTests,
-    BasicSelectTests,
-    MultiSensorTests,
-    MultiSwitchTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig(
-            "parkside_plgs2012a1_smart_charger.yaml", PARKSIDE_PLGS2012A1_PAYLOAD
-        )
-        self.setUpMultiBinarySensors(
-            [
-                {
-                    "name": "binary_sensor_almost_charged",
-                    "dps": ALMOSTCHARGED_DPS,
-                },
-                {
-                    "name": "binary_sensor_fully_charged",
-                    "dps": FULLYCHARGED_DPS,
-                },
-                {
-                    "name": "binary_sensor_problem",
-                    "dps": FAULT_DPS,
-                    "device_class": BinarySensorDeviceClass.PROBLEM,
-                    "testdata": (32, 0),
-                },
-            ],
-        )
-        self.setUpMultiNumber(
-            [
-                {
-                    "name": "number_charge_current",
-                    "dps": CURRENT_DPS,
-                    "device_class": NumberDeviceClass.CURRENT,
-                    "max": 30.000,
-                    "step": 0.1,
-                    "scale": 1000,
-                    "unit": UnitOfElectricCurrent.AMPERE,
-                },
-                {
-                    "name": "number_charge_voltage",
-                    "dps": VOLTAGE_DPS,
-                    "device_class": NumberDeviceClass.VOLTAGE,
-                    "max": 25.0,
-                    "scale": 1000,
-                    "step": 0.1,
-                    "unit": UnitOfElectricPotential.VOLT,
-                },
-            ],
-        )
-        self.setUpBasicSelect(
-            MODE_DPS,
-            self.entities.get("select_charge_type"),
-            {
-                "ECO": "Eco",
-                "quick": "Performance",
-                "standard": "Balanced",
-                "individual": "Expert",
-            },
-        )
-        self.setUpMultiSensors(
-            [
-                {
-                    "name": "sensor_battery",
-                    "dps": BATTERY_DPS,
-                    "unit": PERCENTAGE,
-                    "device_class": SensorDeviceClass.BATTERY,
-                },
-                {
-                    "name": "sensor_time_remaining",
-                    "dps": REMAIN_DPS,
-                    "unit": UnitOfTime.MINUTES,
-                    "device_class": SensorDeviceClass.DURATION,
-                },
-                {
-                    "name": "sensor_temperature",
-                    "dps": TEMPERATURE_DPS,
-                    "unit": UnitOfTemperature.CELSIUS,
-                    "device_class": SensorDeviceClass.TEMPERATURE,
-                    "state_class": SensorStateClass.MEASUREMENT,
-                },
-                {
-                    "name": "sensor_max_current",
-                    "dps": MAXCURRENT_DPS,
-                    "unit": UnitOfElectricCurrent.AMPERE,
-                    "device_class": SensorDeviceClass.CURRENT,
-                    "testdata": (1234, 1.234),
-                },
-                {
-                    "name": "sensor_max_temperature_count",
-                    "dps": MAXTEMPCOUNT_DPS,
-                },
-            ],
-        )
-        self.setUpMultiSwitch(
-            [
-                {
-                    "name": "switch",
-                    "dps": SWITCH_DPS,
-                },
-                {
-                    "name": "switch_storage",
-                    "dps": STORAGE_DPS,
-                },
-                {
-                    "name": "switch_temperature_limiter",
-                    "dps": LIMITER_DPS,
-                },
-            ],
-        )
-
-        self.mark_secondary(
-            [
-                "number_charge_current",
-                "number_charge_voltage",
-                "switch_storage",
-                "switch_temperature_limiter",
-                "sensor_temperature",
-                "sensor_max_temperature_count",
-                "select_charge_type",
-                "sensor_max_current",
-                "binary_sensor_almost_charged",
-                "binary_sensor_fully_charged",
-                "binary_sensor_problem",
-            ]
-        )
-
-    def test_multi_switch_state_attributes(self):
-        switch = self.multiSwitch.get("switch")
-        storage = self.multiSwitch.get("switch_storage")
-        temp = self.multiSwitch.get("switch_temperature_limiter")
-        self.assertEqual(storage.extra_state_attributes, {})
-        self.assertEqual(temp.extra_state_attributes, {})
-        self.dps[NAME_DPS] = "test"
-        self.assertDictEqual(switch.extra_state_attributes, {"model": "test"})
-
-    def test_multi_bsensor_extra_state_attributes(self):
-        self.dps[FAULT_DPS] = 2
-        problem = self.multiBSensor.get("binary_sensor_problem")
-        almost = self.multiBSensor.get("binary_sensor_almost_charged")
-        fully = self.multiBSensor.get("binary_sensor_fully_charged")
-        self.assertEqual(almost.extra_state_attributes, {})
-        self.assertEqual(fully.extra_state_attributes, {})
-        self.assertCountEqual(problem.extra_state_attributes, {"fault_code": 2})

+ 0 - 140
tests/devices/test_poiema_one_purifier.py

@@ -1,140 +0,0 @@
-from homeassistant.components.fan import FanEntityFeature
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.const import CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, UnitOfTime
-
-from ..const import POIEMA_ONE_PURIFIER_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.button import BasicButtonTests
-from ..mixins.lock import BasicLockTests
-from ..mixins.select import BasicSelectTests
-from ..mixins.sensor import MultiSensorTests
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-PM25_DPS = "2"
-MODE_DPS = "3"
-SPEED_DPS = "4"
-LOCK_DPS = "7"
-RESET_DPS = "11"
-TIMER_DPS = "18"
-COUNTDOWN_DPS = "19"
-
-
-class TestPoeimaOnePurifier(
-    BasicButtonTests,
-    BasicLockTests,
-    BasicSelectTests,
-    MultiSensorTests,
-    SwitchableTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("poiema_one_purifier.yaml", POIEMA_ONE_PURIFIER_PAYLOAD)
-        self.subject = self.entities["fan"]
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.setUpBasicButton(
-            RESET_DPS,
-            self.entities.get("button_filter_reset"),
-        )
-        self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock"))
-        self.setUpBasicSelect(
-            TIMER_DPS,
-            self.entities.get("select_timer"),
-            {
-                "cancel": "cancel",
-                "1h": "1h",
-                "2h": "2h",
-                "3h": "3h",
-                "4h": "4h",
-                "5h": "5h",
-            },
-        )
-        self.setUpMultiSensors(
-            [
-                {
-                    "dps": PM25_DPS,
-                    "name": "sensor_pm25",
-                    "device_class": SensorDeviceClass.PM25,
-                    "state_class": "measurement",
-                    "unit": CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
-                },
-                {
-                    "dps": COUNTDOWN_DPS,
-                    "name": "sensor_time_remaining",
-                    "unit": UnitOfTime.MINUTES,
-                    "device_class": SensorDeviceClass.DURATION,
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "button_filter_reset",
-                "lock_child_lock",
-                "select_timer",
-                "sensor_time_remaining",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            FanEntityFeature.PRESET_MODE
-            | FanEntityFeature.SET_SPEED
-            | FanEntityFeature.TURN_OFF
-            | FanEntityFeature.TURN_ON,
-        )
-
-    def test_speed(self):
-        self.dps[SPEED_DPS] = "low"
-        self.assertEqual(self.subject.percentage, 25)
-
-    def test_speed_step(self):
-        self.assertEqual(self.subject.percentage_step, 25)
-
-    async def test_set_speed(self):
-        async with assert_device_properties_set(
-            self.subject._device, {SPEED_DPS: "mid"}
-        ):
-            await self.subject.async_set_percentage(50)
-
-    async def test_set_speed_snaps(self):
-        async with assert_device_properties_set(
-            self.subject._device, {SPEED_DPS: "high"}
-        ):
-            await self.subject.async_set_percentage(70)
-
-    def test_preset_modes(self):
-        self.assertCountEqual(
-            self.subject.preset_modes,
-            ["normal", "smart", "sleep"],
-        )
-
-    def test_preset_mode(self):
-        self.dps[MODE_DPS] = "manual"
-        self.assertEqual(self.subject.preset_mode, "normal")
-        self.dps[MODE_DPS] = "auto"
-        self.assertEqual(self.subject.preset_mode, "smart")
-        self.dps[MODE_DPS] = "sleep"
-        self.assertEqual(self.subject.preset_mode, "sleep")
-
-    async def test_set_preset_to_manual(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {MODE_DPS: "manual"},
-        ):
-            await self.subject.async_set_preset_mode("normal")
-
-    async def test_set_preset_to_auto(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {MODE_DPS: "auto"},
-        ):
-            await self.subject.async_set_preset_mode("smart")
-
-    async def test_set_preset_to_sleep(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {MODE_DPS: "sleep"},
-        ):
-            await self.subject.async_set_preset_mode("sleep")

+ 0 - 112
tests/devices/test_poolex_qline_heatpump.py

@@ -1,112 +0,0 @@
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
-from homeassistant.const import UnitOfTemperature
-
-from ..const import POOLEX_QLINE_HEATPUMP_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import MultiBinarySensorTests
-from ..mixins.climate import TargetTemperatureTests
-from .base_device_tests import TuyaDeviceTestCase
-
-HVACMODE_DPS = "1"
-MODE_DPS = "2"
-TEMPERATURE_DPS = "4"
-CURRENTTEMP_DPS = "16"
-ERROR_DPS = "15"
-
-
-class TestPoolexQlineHeatpump(
-    MultiBinarySensorTests,
-    TargetTemperatureTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("poolex_qline_heatpump.yaml", POOLEX_QLINE_HEATPUMP_PAYLOAD)
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=8.0,
-            max=40.0,
-        )
-        self.setUpMultiBinarySensors(
-            [
-                {
-                    "dps": ERROR_DPS,
-                    "name": "binary_sensor_water_flow",
-                    "device_class": BinarySensorDeviceClass.PROBLEM,
-                    "testdata": (1, 0),
-                },
-                {
-                    "dps": ERROR_DPS,
-                    "name": "binary_sensor_defrost",
-                    "testdata": (2, 0),
-                },
-            ],
-        )
-        self.mark_secondary(
-            [
-                "binary_sensor_water_flow",
-                "binary_sensor_defrost",
-                "binary_sensor_problem",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            ClimateEntityFeature.TARGET_TEMPERATURE
-            | ClimateEntityFeature.TURN_OFF
-            | ClimateEntityFeature.TURN_ON,
-        )
-
-    def test_temperature_unit_returns_celsius(self):
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 25
-        self.assertEqual(self.subject.current_temperature, 25)
-
-    def test_hvac_mode(self):
-        self.dps[HVACMODE_DPS] = True
-        self.dps[MODE_DPS] = "heating"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-        self.dps[MODE_DPS] = "cold"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.COOL)
-
-        self.dps[MODE_DPS] = "mute"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT_COOL)
-
-        self.dps[HVACMODE_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(
-            self.subject.hvac_modes,
-            [HVACMode.OFF, HVACMode.COOL, HVACMode.HEAT, HVACMode.HEAT_COOL],
-        )
-
-    async def test_hvac_mode_heat(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: True, MODE_DPS: "heating"}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT)
-
-    async def test_hvac_mode_cool(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: True, MODE_DPS: "cold"}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.COOL)
-
-    async def test_hvac_mode_mute(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: True, MODE_DPS: "mute"}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT_COOL)
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {HVACMODE_DPS: False}
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)

+ 0 - 110
tests/devices/test_qoto_03_sprinkler.py

@@ -1,110 +0,0 @@
-"""Tests for the Quto 03 Sprinkler."""
-
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.valve import ValveDeviceClass, ValveEntityFeature
-
-from ..const import QOTO_SPRINKLER_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import BasicBinarySensorTests
-from ..mixins.sensor import MultiSensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-TARGET_DPS = "102"
-CURRENT_DPS = "103"
-COUNTDOWN_DPS = "104"
-TIMER_DPS = "105"
-ERROR_DPS = "108"
-
-
-class TestQotoSprinkler(
-    BasicBinarySensorTests,
-    MultiSensorTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("qoto_03_sprinkler.yaml", QOTO_SPRINKLER_PAYLOAD)
-        self.subject = self.entities.get("valve_water")
-        self.setUpBasicBinarySensor(
-            ERROR_DPS,
-            self.entities.get("binary_sensor_problem"),
-            device_class=BinarySensorDeviceClass.PROBLEM,
-            testdata=(1, 0),
-        )
-        self.setUpMultiSensors(
-            [
-                {
-                    "name": "sensor_open",
-                    "dps": CURRENT_DPS,
-                    "unit": "%",
-                },
-                {
-                    "name": "sensor_time_remaining",
-                    "dps": COUNTDOWN_DPS,
-                    "device_class": "duration",
-                    "unit": "s",
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "binary_sensor_problem",
-                "sensor_open",
-                "sensor_time_remaining",
-                "time_timer",
-            ]
-        )
-
-    def test_device_class_is_water(self):
-        self.assertEqual(self.subject.device_class, ValveDeviceClass.WATER)
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            ValveEntityFeature.OPEN
-            | ValveEntityFeature.CLOSE
-            | ValveEntityFeature.SET_POSITION,
-        )
-
-    def test_is_closed(self):
-        self.dps[TARGET_DPS] = 100
-        self.assertFalse(self.subject.is_closed)
-        self.dps[TARGET_DPS] = 50
-        self.assertFalse(self.subject.is_closed)
-        self.dps[TARGET_DPS] = 0
-        self.assertTrue(self.subject.is_closed)
-
-    def test_current_position(self):
-        self.dps[TARGET_DPS] = 100
-        self.assertEqual(self.subject.current_position, 100)
-        self.dps[TARGET_DPS] = 50
-        self.assertEqual(self.subject.current_position, 50)
-        self.dps[TARGET_DPS] = 0
-        self.assertEqual(self.subject.current_position, 0)
-
-    async def test_open_valve(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {TARGET_DPS: 100},
-        ):
-            await self.subject.async_open_valve()
-
-    async def test_close_valve(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {TARGET_DPS: 0},
-        ):
-            await self.subject.async_close_valve()
-
-    async def test_set_valve_position(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {TARGET_DPS: 50},
-        ):
-            await self.subject.async_set_valve_position(50)
-
-    def test_basic_bsensor_extra_state_attributes(self):
-        self.dps[ERROR_DPS] = 2
-        self.assertDictEqual(
-            self.basicBSensor.extra_state_attributes,
-            {"fault_code": 2},
-        )

+ 0 - 115
tests/devices/test_qs_c01_curtain.py

@@ -1,115 +0,0 @@
-"""Tests for the QS C01 curtain module."""
-
-from homeassistant.components.cover import CoverDeviceClass, CoverEntityFeature
-from homeassistant.components.number import NumberDeviceClass
-from homeassistant.const import UnitOfTime
-
-from ..const import QS_C01_CURTAIN_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.number import BasicNumberTests
-from ..mixins.select import BasicSelectTests
-from .base_device_tests import TuyaDeviceTestCase
-
-COMMAND_DPS = "1"
-POSITION_DPS = "2"
-BACKMODE_DPS = "8"
-TRAVELTIME_DPS = "10"
-
-
-class TestQSC01Curtains(BasicNumberTests, BasicSelectTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("qs_c01_curtain.yaml", QS_C01_CURTAIN_PAYLOAD)
-        self.subject = self.entities["cover_curtain"]
-        self.setUpBasicNumber(
-            TRAVELTIME_DPS,
-            self.entities.get("number_travel_time"),
-            min=1,
-            max=60,
-            device_class=NumberDeviceClass.DURATION,
-            unit=UnitOfTime.SECONDS,
-        )
-        self.setUpBasicSelect(
-            BACKMODE_DPS,
-            self.entities.get("select_motor_reverse_mode"),
-            {
-                "forward": "Forward",
-                "back": "Back",
-            },
-        )
-        self.mark_secondary(["number_travel_time", "select_motor_reverse_mode"])
-
-    def test_device_class_is_curtain(self):
-        self.assertEqual(self.subject.device_class, CoverDeviceClass.CURTAIN)
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                CoverEntityFeature.OPEN
-                | CoverEntityFeature.CLOSE
-                | CoverEntityFeature.SET_POSITION
-                | CoverEntityFeature.STOP
-            ),
-        )
-
-    def test_current_cover_position(self):
-        self.dps[POSITION_DPS] = 47
-        self.assertEqual(self.subject.current_cover_position, 47)
-
-    def test_is_opening(self):
-        self.dps[COMMAND_DPS] = "open"
-        self.dps[POSITION_DPS] = 100
-        self.assertFalse(self.subject.is_opening)
-        self.dps[POSITION_DPS] = 50
-        self.assertIsNone(self.subject.is_opening)
-        self.dps[COMMAND_DPS] = "close"
-        self.assertIsNone(self.subject.is_opening)
-        self.dps[COMMAND_DPS] = "stop"
-        self.assertIsNone(self.subject.is_opening)
-
-    def test_is_closing(self):
-        self.dps[COMMAND_DPS] = "close"
-        self.dps[POSITION_DPS] = 0
-        self.assertFalse(self.subject.is_closing)
-        self.dps[POSITION_DPS] = 50
-        self.assertIsNone(self.subject.is_closing)
-        self.dps[COMMAND_DPS] = "open"
-        self.assertIsNone(self.subject.is_closing)
-        self.dps[COMMAND_DPS] = "stop"
-        self.assertIsNone(self.subject.is_closing)
-
-    def test_is_closed(self):
-        self.dps[COMMAND_DPS] = "close"
-        self.dps[POSITION_DPS] = 100
-        self.assertFalse(self.subject.is_closed)
-        self.dps[POSITION_DPS] = 0
-        self.assertTrue(self.subject.is_closed)
-
-    async def test_open_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "open"},
-        ):
-            await self.subject.async_open_cover()
-
-    async def test_close_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "close"},
-        ):
-            await self.subject.async_close_cover()
-
-    async def test_stop_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "stop"},
-        ):
-            await self.subject.async_stop_cover()
-
-    async def test_set_cover_position(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POSITION_DPS: 20},
-        ):
-            # step is 10, so expect rounding to 20
-            await self.subject.async_set_cover_position(23)

+ 0 - 143
tests/devices/test_renpho_rp_ap001s.py

@@ -1,143 +0,0 @@
-from homeassistant.components.fan import FanEntityFeature
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.components.switch import SwitchDeviceClass
-
-from ..const import RENPHO_PURIFIER_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.light import BasicLightTests
-from ..mixins.lock import BasicLockTests
-from ..mixins.sensor import MultiSensorTests
-from ..mixins.switch import BasicSwitchTests, SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-PRESET_DPS = "4"
-LOCK_DPS = "7"
-LIGHT_DPS = "8"
-TIMER_DPS = "19"
-QUALITY_DPS = "22"
-SLEEP_DPS = "101"
-PREFILTER_DPS = "102"
-CHARCOAL_DPS = "103"
-ACTIVATED_DPS = "104"
-HEPA_DPS = "105"
-
-
-class TestRenphoPurifier(
-    BasicLightTests,
-    BasicLockTests,
-    BasicSwitchTests,
-    MultiSensorTests,
-    SwitchableTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("renpho_rp_ap001s.yaml", RENPHO_PURIFIER_PAYLOAD)
-        self.subject = self.entities.get("fan")
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.setUpBasicLight(LIGHT_DPS, self.entities.get("light_aq_indicator"))
-        self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock"))
-        self.setUpBasicSwitch(
-            SLEEP_DPS,
-            self.entities.get("switch_sleep"),
-            device_class=SwitchDeviceClass.SWITCH,
-        )
-        self.setUpMultiSensors(
-            [
-                {
-                    "name": "sensor_air_quality",
-                    "dps": QUALITY_DPS,
-                    "device_class": SensorDeviceClass.ENUM,
-                    "options": ["poor", "moderate", "good"],
-                },
-                {
-                    "name": "sensor_prefilter_life",
-                    "dps": PREFILTER_DPS,
-                },
-                {
-                    "name": "sensor_charcoal_filter_life",
-                    "dps": CHARCOAL_DPS,
-                },
-                {
-                    "name": "sensor_active_filter_life",
-                    "dps": ACTIVATED_DPS,
-                },
-                {
-                    "name": "sensor_hepa_filter_life",
-                    "dps": HEPA_DPS,
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "light_aq_indicator",
-                "lock_child_lock",
-                "sensor_air_quality",
-                "sensor_active_filter_life",
-                "sensor_charcoal_filter_life",
-                "sensor_hepa_filter_life",
-                "sensor_prefilter_life",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            FanEntityFeature.PRESET_MODE
-            | FanEntityFeature.TURN_OFF
-            | FanEntityFeature.TURN_ON,
-        )
-
-    def test_preset_modes(self):
-        self.assertCountEqual(
-            self.subject.preset_modes,
-            ["sleep", "fresh", "strong", "smart"],
-        )
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = "low"
-        self.assertEqual(self.subject.preset_mode, "sleep")
-        self.dps[PRESET_DPS] = "mid"
-        self.assertEqual(self.subject.preset_mode, "fresh")
-        self.dps[PRESET_DPS] = "high"
-        self.assertEqual(self.subject.preset_mode, "strong")
-        self.dps[PRESET_DPS] = "auto"
-        self.assertEqual(self.subject.preset_mode, "smart")
-
-    async def test_set_preset_mode_to_low(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "low"},
-        ):
-            await self.subject.async_set_preset_mode("sleep")
-
-    async def test_set_preset_mode_to_mid(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "mid"},
-        ):
-            await self.subject.async_set_preset_mode("fresh")
-
-    async def test_set_preset_mode_to_high(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "high"},
-        ):
-            await self.subject.async_set_preset_mode("strong")
-
-    async def test_set_preset_mode_to_auto(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "auto"},
-        ):
-            await self.subject.async_set_preset_mode("smart")
-
-    def test_extra_state_attributes(self):
-        self.dps[TIMER_DPS] = "19"
-
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {
-                "timer": "19",
-            },
-        )

+ 0 - 192
tests/devices/test_rgbcw_lightbulb.py

@@ -1,192 +0,0 @@
-from homeassistant.components.light import (
-    EFFECT_OFF,
-    ColorMode,
-    LightEntityFeature,
-)
-
-from ..const import RGBCW_LIGHTBULB_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.text import TEXT_PATTERN_HEX, BasicTextTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "20"
-MODE_DPS = "21"
-BRIGHTNESS_DPS = "22"
-COLORTEMP_DPS = "23"
-HSV_DPS = "24"
-SCENE_DPS = "25"
-TIMER_DPS = "26"
-
-
-class TestRGBCWLightbulb(BasicTextTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("rgbcw_lightbulb.yaml", RGBCW_LIGHTBULB_PAYLOAD)
-        self.subject = self.entities.get("light")
-
-        self.setUpBasicText(
-            SCENE_DPS,
-            self.entities.get("text_scene"),
-            pattern=TEXT_PATTERN_HEX,
-        )
-        self.mark_secondary(
-            [
-                "select_scene",
-                "text_scene",
-                "time_timer",
-                "switch_do_not_disturb",
-                "text_music",
-                "text_control",
-                "text_debug",
-                "text_rhythm",
-                "text_sleep",
-                "text_wakeup",
-            ]
-        )
-
-    def test_is_on(self):
-        self.dps[SWITCH_DPS] = True
-        self.assertTrue(self.subject.is_on)
-        self.dps[SWITCH_DPS] = False
-        self.assertFalse(self.subject.is_on)
-
-    def test_brightness(self):
-        self.dps[BRIGHTNESS_DPS] = 500
-        self.assertAlmostEqual(self.subject.brightness, 126, 0)
-
-    def test_color_temp(self):
-        self.dps[COLORTEMP_DPS] = 500
-        self.assertEqual(self.subject.color_temp_kelvin, 4600)
-        self.dps[COLORTEMP_DPS] = 1000
-        self.assertEqual(self.subject.color_temp_kelvin, 6500)
-        self.dps[COLORTEMP_DPS] = 0
-        self.assertEqual(self.subject.color_temp_kelvin, 2700)
-        self.dps[COLORTEMP_DPS] = None
-        self.assertEqual(self.subject.color_temp_kelvin, None)
-
-    def test_color_temp_range(self):
-        self.assertEqual(self.subject.min_color_temp_kelvin, 2700)
-        self.assertEqual(self.subject.max_color_temp_kelvin, 6500)
-
-    def test_color_mode(self):
-        self.dps[MODE_DPS] = "white"
-        self.assertEqual(self.subject.color_mode, ColorMode.COLOR_TEMP)
-        self.dps[MODE_DPS] = "colour"
-        self.assertEqual(self.subject.color_mode, ColorMode.HS)
-        self.dps[MODE_DPS] = "scene"
-        self.assertEqual(self.subject.color_mode, ColorMode.HS)
-        self.dps[MODE_DPS] = "music"
-        self.assertEqual(self.subject.color_mode, ColorMode.HS)
-
-    def test_hs_color(self):
-        self.dps[HSV_DPS] = "003c03e803e8"
-        self.dps[BRIGHTNESS_DPS] = 1000
-        self.assertSequenceEqual(self.subject.hs_color, (60, 100))
-
-    # Lights have been observed to return N, O and P mixed in with the hex
-    # number.  Maybe it has some special meaning, but since it is undocumented,
-    # we just want to reject such values without an exception.
-    def test_invalid_hs_color(self):
-        self.dps[HSV_DPS] = "0010001000OP"
-        self.dps[BRIGHTNESS_DPS] = 1000
-        self.assertIsNone(self.subject.hs_color)
-
-    def test_effect_list(self):
-        self.assertCountEqual(
-            self.subject.effect_list,
-            ["Scene", "Music", EFFECT_OFF],
-        )
-
-    def test_effect(self):
-        self.dps[MODE_DPS] = "scene"
-        self.assertEqual(self.subject.effect, "Scene")
-        self.dps[MODE_DPS] = "music"
-        self.assertEqual(self.subject.effect, "Music")
-        self.dps[MODE_DPS] = "white"
-        self.assertEqual(self.subject.effect, EFFECT_OFF)
-        self.dps[MODE_DPS] = "colour"
-        self.assertEqual(self.subject.effect, EFFECT_OFF)
-
-    def test_supported_color_modes(self):
-        self.assertCountEqual(
-            self.subject.supported_color_modes,
-            {ColorMode.HS, ColorMode.COLOR_TEMP},
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(self.subject.supported_features, LightEntityFeature.EFFECT)
-
-    async def test_turn_on(self):
-        self.dps[SWITCH_DPS] = False
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWITCH_DPS: True},
-        ):
-            await self.subject.async_turn_on()
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {SWITCH_DPS: False},
-        ):
-            await self.subject.async_turn_off()
-
-    async def test_set_brightness_white(self):
-        self.dps[SWITCH_DPS] = True
-        self.dps[MODE_DPS] = "white"
-
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                BRIGHTNESS_DPS: 506,
-            },
-        ):
-            await self.subject.async_turn_on(brightness=128)
-
-    async def test_set_brightness_color(self):
-        self.dps[SWITCH_DPS] = True
-        self.dps[MODE_DPS] = "colour"
-        self.dps[HSV_DPS] = "000003e803e8"
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                HSV_DPS: "000003e801f6",
-            },
-        ):
-            await self.subject.async_turn_on(brightness=128)
-
-    async def test_set_hs_color(self):
-        self.dps[BRIGHTNESS_DPS] = 1000
-        self.dps[SWITCH_DPS] = True
-        self.dps[MODE_DPS] = "colour"
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                HSV_DPS: "000003e803e8",
-            },
-        ):
-            await self.subject.async_turn_on(
-                hs_color=(0, 100),
-            )
-
-    async def test_set_hs_from_white(self):
-        self.dps[BRIGHTNESS_DPS] = 1000
-        self.dps[SWITCH_DPS] = True
-        self.dps[MODE_DPS] = "white"
-        async with assert_device_properties_set(
-            self.subject._device,
-            {
-                MODE_DPS: "colour",
-                HSV_DPS: "000003e803e8",
-            },
-        ):
-            await self.subject.async_turn_on(
-                hs_color=(0, 100),
-            )
-
-    def test_available(self):
-        self.assertFalse(self.entities.get("switch_do_not_disturb").available)
-        self.assertTrue(self.subject.available)
-
-    def test_disabled_by_default(self):
-        self.assertFalse(self.basicText.entity_registry_enabled_default)
-        self.assertTrue(self.subject.entity_registry_enabled_default)

+ 0 - 167
tests/devices/test_sd123_hpr01_presence.py

@@ -1,167 +0,0 @@
-"""Tests for SD123 Human Presence Radar HPR01"""
-
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-
-from ..const import SD123_PRESENCE_PAYLOAD
-from ..mixins.binary_sensor import BasicBinarySensorTests
-from ..mixins.light import BasicLightTests
-from ..mixins.number import MultiNumberTests
-from ..mixins.select import MultiSelectTests
-from ..mixins.switch import BasicSwitchTests
-from .base_device_tests import TuyaDeviceTestCase
-
-PRESENCE_DPS = "1"
-SAFERANGE_DPS = "101"
-MAXRANGE_DPS = "102"
-DELAY_DPS = "103"
-MODE_DPS = "104"
-UNKNOWN105_DPS = "105"
-LIGHT_DPS = "106"
-TRIGPOW_DPS = "107"
-MAINTPOW_DPS = "108"
-TRIGFRAME_DPS = "109"
-INTFRAME_DPS = "110"
-UNKNOWN111_DPS = "111"
-TRIGPOINT_DPS = "112"
-MAINTPOINT_DPS = "113"
-SWITCH_DPS = "114"
-
-
-class TestSD123HumanPresenceRadar(
-    BasicBinarySensorTests,
-    BasicLightTests,
-    BasicSwitchTests,
-    MultiNumberTests,
-    MultiSelectTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("sd123_hpr01_presence.yaml", SD123_PRESENCE_PAYLOAD)
-        self.setUpBasicBinarySensor(
-            PRESENCE_DPS,
-            self.entities.get("binary_sensor_occupancy"),
-            device_class=BinarySensorDeviceClass.OCCUPANCY,
-            testdata=("presence", "none"),
-        )
-        self.setUpBasicLight(
-            LIGHT_DPS,
-            self.entities.get("light_indicator"),
-            testdata=("normal", "slient"),
-        )
-        self.setUpBasicSwitch(SWITCH_DPS, self.entities.get("switch"))
-        self.setUpMultiNumber(
-            [
-                {
-                    "name": "number_trigger_power",
-                    "dps": TRIGPOW_DPS,
-                    "max": 5000,
-                    "step": 100,
-                },
-                {
-                    "name": "number_maintain_power",
-                    "dps": MAINTPOW_DPS,
-                    "max": 5000,
-                    "step": 100,
-                },
-                {
-                    "name": "number_trigger_frames",
-                    "dps": TRIGFRAME_DPS,
-                    "max": 20,
-                },
-                {
-                    "name": "number_interrupt_frames",
-                    "dps": INTFRAME_DPS,
-                    "max": 20,
-                },
-                {
-                    "name": "number_trigger_points",
-                    "dps": TRIGPOINT_DPS,
-                    "max": 10,
-                },
-                {
-                    "name": "number_maintain_points",
-                    "dps": MAINTPOINT_DPS,
-                    "max": 10,
-                },
-            ],
-        )
-        self.setUpMultiSelect(
-            [
-                {
-                    "name": "select_safe_range",
-                    "dps": SAFERANGE_DPS,
-                    "options": {
-                        "0_meters": "0m",
-                        "1_meters": "1m",
-                        "2_meters": "2m",
-                        "3_meters": "3m",
-                        "4_meters": "4m",
-                        "5_meters": "5m",
-                        "6_meters": "6m",
-                    },
-                },
-                {
-                    "name": "select_max_range",
-                    "dps": MAXRANGE_DPS,
-                    "options": {
-                        "0_meters": "0m",
-                        "1_meters": "1m",
-                        "2_meters": "2m",
-                        "3_meters": "3m",
-                        "4_meters": "4m",
-                        "5_meters": "5m",
-                        "6_meters": "6m",
-                        "7_meters": "7m",
-                    },
-                },
-                {
-                    "name": "select_delay",
-                    "dps": DELAY_DPS,
-                    "options": {
-                        "case_0": "10s",
-                        "case_1": "30s",
-                        "case_2": "1m",
-                        "case_3": "2m",
-                        "case_4": "5m",
-                        "case_5": "10m",
-                        "case_6": "30m",
-                    },
-                },
-                {
-                    "name": "select_configuration",
-                    "dps": MODE_DPS,
-                    "options": {
-                        "case_0": "Sleep/Micro motion",
-                        "case_1": "Meeting/Office",
-                        "case_2": "Classroom/Corridor",
-                        "case_3": "Custom",
-                    },
-                },
-            ],
-        )
-
-        self.mark_secondary(
-            [
-                "light_indicator",
-                "number_interrupt_frames",
-                "number_maintain_points",
-                "number_maintain_power",
-                "number_trigger_frames",
-                "number_trigger_points",
-                "number_trigger_power",
-                "select_configuration",
-                "select_delay",
-                "select_max_range",
-                "select_safe_range",
-                "switch",
-            ]
-        )
-
-    def test_basic_bsensor_extra_state_attributes(self):
-        self.dps[UNKNOWN105_DPS] = "unknown_105"
-        self.dps[UNKNOWN111_DPS] = 111
-
-        self.assertDictEqual(
-            self.basicBSensor.extra_state_attributes,
-            {"unknown_105": "unknown_105", "unknown_111": 111},
-        )

+ 0 - 106
tests/devices/test_simple_blinds.py

@@ -1,106 +0,0 @@
-"""Tests for the simple blinds controller."""
-
-from homeassistant.components.cover import CoverDeviceClass, CoverEntityFeature
-
-from ..const import SIMPLE_BLINDS_PAYLOAD
-from ..helpers import assert_device_properties_set
-from .base_device_tests import TuyaDeviceTestCase
-
-COMMAND_DPS = "1"
-POSITION_DPS = "2"
-CURRENT_POSITION = "3"
-BACKMODE_DPS = "5"
-ACTION_DPS = "7"
-
-
-class TestSimpleBlinds(TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("simple_blinds.yaml", SIMPLE_BLINDS_PAYLOAD)
-        self.subject = self.entities["cover_blind"]
-        self.mark_secondary(["switch_reverse"])
-
-    def test_device_class_is_blind(self):
-        self.assertEqual(self.subject.device_class, CoverDeviceClass.BLIND)
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                CoverEntityFeature.OPEN
-                | CoverEntityFeature.CLOSE
-                | CoverEntityFeature.SET_POSITION
-                | CoverEntityFeature.STOP
-            ),
-        )
-
-    def test_current_cover_position(self):
-        self.dps[POSITION_DPS] = 47
-        self.assertEqual(self.subject.current_cover_position, 53)
-
-    def test_is_opening(self):
-        self.dps[COMMAND_DPS] = "open"
-        self.dps[POSITION_DPS] = 0
-        self.assertFalse(self.subject.is_opening)
-        self.dps[POSITION_DPS] = 50
-        self.assertIsNone(self.subject.is_opening)
-        self.dps[COMMAND_DPS] = "close"
-        self.assertIsNone(self.subject.is_opening)
-        self.dps[COMMAND_DPS] = "stop"
-        self.assertIsNone(self.subject.is_opening)
-
-    def test_is_closing(self):
-        self.dps[COMMAND_DPS] = "close"
-        self.dps[POSITION_DPS] = 100
-        self.assertFalse(self.subject.is_closing)
-        self.dps[POSITION_DPS] = 50
-        self.assertIsNone(self.subject.is_closing)
-        self.dps[COMMAND_DPS] = "open"
-        self.assertIsNone(self.subject.is_closing)
-        self.dps[COMMAND_DPS] = "stop"
-        self.assertIsNone(self.subject.is_closing)
-
-    def test_is_closed(self):
-        self.dps[COMMAND_DPS] = "close"
-        self.dps[POSITION_DPS] = 0
-        self.assertFalse(self.subject.is_closed)
-        self.dps[POSITION_DPS] = 100
-        self.assertTrue(self.subject.is_closed)
-        self.dps[COMMAND_DPS] = "stop"
-        self.assertTrue(self.subject.is_closed)
-
-    async def test_open_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "open"},
-        ):
-            await self.subject.async_open_cover()
-
-    async def test_close_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "close"},
-        ):
-            await self.subject.async_close_cover()
-
-    async def test_stop_cover(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {COMMAND_DPS: "stop"},
-        ):
-            await self.subject.async_stop_cover()
-
-    async def test_set_cover_position(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POSITION_DPS: 23},
-        ):
-            await self.subject.async_set_cover_position(77)
-
-    def test_extra_state_attributes(self):
-        self.dps[ACTION_DPS] = "test"
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {
-                "work_state": "test",
-            },
-        )

+ 0 - 22
tests/devices/test_simple_switch_with_timer.py

@@ -1,22 +0,0 @@
-"""Tests for a simple switch with timer"""
-
-from ..const import TIMED_SOCKET_PAYLOAD
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-TIMER_DPS = "11"
-
-
-class TestTimedSwitch(SwitchableTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("simple_switch_timer.yaml", TIMED_SOCKET_PAYLOAD)
-        self.subject = self.entities.get("switch")
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.mark_secondary(["time_timer"])
-
-    def test_extra_state_attributes_set(self):
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {},
-        )

+ 0 - 36
tests/devices/test_simple_switch_with_timerv2.py

@@ -1,36 +0,0 @@
-"""Tests for a simple switch with timer"""
-
-from ..const import TIMED_SOCKETV2_PAYLOAD
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-TIMER_DPS = "9"
-INITIAL_STATE_DPS = "38"
-
-
-class TestTimedSwitch(SwitchableTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("simple_switch_timerv2.yaml", TIMED_SOCKETV2_PAYLOAD)
-        self.subject = self.entities.get("switch")
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.mark_secondary(
-            [
-                "select_initial_state",
-                "time_timer",
-            ]
-        )
-
-    def test_extra_state_attributes_set(self):
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {},
-        )
-
-    def test_available(self):
-        for entid, e in self.entities.items():
-            if entid == "select_initial_state":
-                self.dps[INITIAL_STATE_DPS] = None
-                self.assertFalse(e.available)
-                self.dps[INITIAL_STATE_DPS] = "on"
-            self.assertTrue(e.available)

+ 0 - 24
tests/devices/test_smartplug_encoded.py

@@ -1,24 +0,0 @@
-"""Tests for the switch entity."""
-
-from homeassistant.components.switch import SwitchDeviceClass
-
-from ..const import SMARTPLUG_ENCODED_PAYLOAD
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-TIMER_DPS = "11"
-RANDOM_DPS = "101"
-CIRCULATE_DPS = "102"
-SCHEDULE_DPS = "103"
-
-
-class TestSwitchEncoded(SwitchableTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("smartplug_encoded.yaml", SMARTPLUG_ENCODED_PAYLOAD)
-        self.subject = self.entities.get("switch_outlet")
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.mark_secondary(["time_timer"])
-
-    def test_device_class_is_outlet(self):
-        self.assertEqual(self.subject.device_class, SwitchDeviceClass.OUTLET)

+ 0 - 75
tests/devices/test_smartplugv2.py

@@ -1,75 +0,0 @@
-"""Tests for the switch entity."""
-
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.components.switch import SwitchDeviceClass
-from homeassistant.const import (
-    UnitOfElectricCurrent,
-    UnitOfElectricPotential,
-    UnitOfPower,
-)
-
-from ..const import KOGAN_SOCKET_PAYLOAD2
-from ..mixins.sensor import MultiSensorTests
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-TIMER_DPS = "9"
-CURRENT_DPS = "18"
-POWER_DPS = "19"
-VOLTAGE_DPS = "20"
-
-
-class TestSwitchV2(
-    MultiSensorTests,
-    SwitchableTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("smartplugv2.yaml", KOGAN_SOCKET_PAYLOAD2)
-        self.subject = self.entities.get("switch_outlet")
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.setUpMultiSensors(
-            [
-                {
-                    "name": "sensor_voltage",
-                    "dps": VOLTAGE_DPS,
-                    "unit": UnitOfElectricPotential.VOLT,
-                    "device_class": SensorDeviceClass.VOLTAGE,
-                    "state_class": "measurement",
-                    "testdata": (2300, 230.0),
-                },
-                {
-                    "name": "sensor_current",
-                    "dps": CURRENT_DPS,
-                    "unit": UnitOfElectricCurrent.MILLIAMPERE,
-                    "device_class": SensorDeviceClass.CURRENT,
-                    "state_class": "measurement",
-                },
-                {
-                    "name": "sensor_power",
-                    "dps": POWER_DPS,
-                    "unit": UnitOfPower.WATT,
-                    "device_class": SensorDeviceClass.POWER,
-                    "state_class": "measurement",
-                    "testdata": (1234, 123.4),
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "binary_sensor_problem",
-                "sensor_current",
-                "sensor_power",
-                "sensor_voltage",
-                "time_timer",
-            ]
-        )
-
-    def test_device_class_is_outlet(self):
-        self.assertEqual(self.subject.device_class, SwitchDeviceClass.OUTLET)
-
-    def test_sensor_precision(self):
-        self.assertEqual(self.multiSensor["sensor_current"].native_precision, 0)
-        self.assertEqual(self.multiSensor["sensor_power"].native_precision, 1)
-        self.assertEqual(self.multiSensor["sensor_voltage"].native_precision, 1)

+ 0 - 190
tests/devices/test_smartplugv2_energy.py

@@ -1,190 +0,0 @@
-"""Tests for the switch entity."""
-
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.components.switch import SwitchDeviceClass
-from homeassistant.const import (
-    UnitOfElectricCurrent,
-    UnitOfElectricPotential,
-    UnitOfEnergy,
-    UnitOfPower,
-)
-
-from ..const import SMARTSWITCH_ENERGY_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import BasicBinarySensorTests
-from ..mixins.select import BasicSelectTests
-from ..mixins.sensor import MultiSensorTests
-from ..mixins.switch import MultiSwitchTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-TIMER_DPS = "9"
-ENERGY_DPS = "17"
-CURRENT_DPS = "18"
-POWER_DPS = "19"
-VOLTAGE_DPS = "20"
-TEST_DPS = "21"
-CALIBV_DPS = "22"
-CALIBI_DPS = "23"
-CALIBP_DPS = "24"
-CALIBE_DPS = "25"
-ERROR_DPS = "26"
-INITIAL_DPS = "38"
-LIGHT_DPS = "39"
-LOCK_DPS = "40"
-CYCLE_DPS = "41"
-RANDOM_DPS = "42"
-OVERCHARGE_DPS = "46"
-ALT_OVERCHARGE_DPS = "51"
-
-
-class TestSwitchV2Energy(
-    BasicBinarySensorTests,
-    BasicSelectTests,
-    MultiSensorTests,
-    MultiSwitchTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("smartplugv2_energy.yaml", SMARTSWITCH_ENERGY_PAYLOAD)
-        self.setUpMultiSwitch(
-            [
-                {
-                    "name": "switch_outlet",
-                    "dps": SWITCH_DPS,
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-                {
-                    "name": "switch_overcharge_cutoff",
-                    "dps": OVERCHARGE_DPS,
-                },
-            ]
-        )
-        self.setUpBasicBinarySensor(
-            ERROR_DPS,
-            self.entities.get("binary_sensor_problem"),
-            device_class=BinarySensorDeviceClass.PROBLEM,
-            testdata=(1, 0),
-        )
-        self.setUpBasicSelect(
-            INITIAL_DPS,
-            self.entities.get("select_initial_state"),
-            {
-                "on": "on",
-                "off": "off",
-                "memory": "memory",
-            },
-        )
-        self.setUpMultiSensors(
-            [
-                {
-                    "name": "sensor_energy",
-                    "dps": ENERGY_DPS,
-                    "unit": UnitOfEnergy.WATT_HOUR,
-                    "state_class": "measurement",
-                },
-                {
-                    "name": "sensor_voltage",
-                    "dps": VOLTAGE_DPS,
-                    "unit": UnitOfElectricPotential.VOLT,
-                    "device_class": SensorDeviceClass.VOLTAGE,
-                    "state_class": "measurement",
-                    "testdata": (2300, 230.0),
-                },
-                {
-                    "name": "sensor_current",
-                    "dps": CURRENT_DPS,
-                    "unit": UnitOfElectricCurrent.MILLIAMPERE,
-                    "device_class": SensorDeviceClass.CURRENT,
-                    "state_class": "measurement",
-                },
-                {
-                    "name": "sensor_power",
-                    "dps": POWER_DPS,
-                    "unit": UnitOfPower.WATT,
-                    "device_class": SensorDeviceClass.POWER,
-                    "state_class": "measurement",
-                    "testdata": (1234, 123.4),
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "binary_sensor_problem",
-                "lock_child_lock",
-                "select_initial_state",
-                "select_light_mode",
-                "sensor_current",
-                "sensor_energy",
-                "sensor_power",
-                "sensor_voltage",
-                "switch_overcharge_cutoff",
-                "time_timer",
-            ]
-        )
-
-    def test_multi_switch_state_attributes(self):
-        self.dps[TEST_DPS] = 21
-
-        self.assertDictEqual(
-            self.multiSwitch["switch_outlet"].extra_state_attributes,
-            {
-                "test_bit": 21,
-            },
-        )
-
-    def test_multi_sensor_extra_state_attributes(self):
-        self.dps[CALIBV_DPS] = 22
-        self.dps[CALIBI_DPS] = 23
-        self.dps[CALIBP_DPS] = 24
-        self.dps[CALIBE_DPS] = 25
-
-        self.assertDictEqual(
-            self.multiSensor["sensor_current"].extra_state_attributes,
-            {"calibration": 23},
-        )
-        self.assertDictEqual(
-            self.multiSensor["sensor_energy"].extra_state_attributes,
-            {"calibration": 25},
-        )
-        self.assertDictEqual(
-            self.multiSensor["sensor_power"].extra_state_attributes,
-            {"calibration": 24},
-        )
-        self.assertDictEqual(
-            self.multiSensor["sensor_voltage"].extra_state_attributes,
-            {"calibration": 22},
-        )
-
-    def test_basic_bsensor_extra_state_attributes(self):
-        self.dps[ERROR_DPS] = 2
-        self.assertDictEqual(
-            self.basicBSensor.extra_state_attributes,
-            {"fault_code": 2},
-        )
-
-    async def test_redirected_switch(self):
-        overcharge_switch = self.multiSwitch["switch_overcharge_cutoff"]
-        self.dps[OVERCHARGE_DPS] = None
-        self.dps[ALT_OVERCHARGE_DPS] = False
-        async with assert_device_properties_set(
-            overcharge_switch._device,
-            {ALT_OVERCHARGE_DPS: True},
-        ):
-            await overcharge_switch.async_turn_on()
-
-    def test_available(self):
-        self.dps[INITIAL_DPS] = None
-        self.assertFalse(self.basicSelect.available)
-        self.dps[INITIAL_DPS] = "on"
-        self.assertTrue(self.basicSelect.available)
-        self.dps[OVERCHARGE_DPS] = None
-        self.dps[ALT_OVERCHARGE_DPS] = None
-        overcharge_switch = self.multiSwitch["switch_overcharge_cutoff"]
-        self.assertFalse(overcharge_switch.available)
-        self.dps[ALT_OVERCHARGE_DPS] = False
-        self.assertTrue(overcharge_switch.available)
-        self.dps[ALT_OVERCHARGE_DPS] = None
-        self.dps[OVERCHARGE_DPS] = True
-        self.assertTrue(overcharge_switch.available)

+ 0 - 163
tests/devices/test_starlight_heatpump.py

@@ -1,163 +0,0 @@
-from homeassistant.components.climate.const import ClimateEntityFeature
-
-from ..const import STARLIGHT_HEATPUMP_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.climate import TargetTemperatureTests
-from .base_device_tests import TuyaDeviceTestCase
-
-TEMPERATURE_DPS = "2"
-FLAGS_DPS = "123"
-
-
-class TestStarLightHeatpump(
-    TargetTemperatureTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("starlight_heatpump.yaml", STARLIGHT_HEATPUMP_PAYLOAD)
-        self.subject = self.entities["climate"]
-        self.display_switch = self.entities.get("light_display")
-        self.buzzer_switch = self.entities.get("switch_buzzer")
-        self.soft_wind_switch = self.entities.get("switch_soft_wind")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=16.0,
-            max=31.0,
-            scale=10,
-            step=5,
-        )
-        self.mark_secondary(
-            [
-                "binary_sensor_problem",
-                "binary_sensor_filter",
-                "light_display",
-                "sensor_humidity",
-                "select_vertical_swing",
-                "select_vertical_position",
-                "select_horizontal_swing",
-                "select_horizontal_position",
-                "select_sleep_mode",
-                "switch_buzzer",
-                "switch_soft_wind",
-                "switch_anti_mildew",
-                "switch_health",
-                "switch_anti_frost",
-                "switch_eco_mode",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                ClimateEntityFeature.TARGET_TEMPERATURE
-                | ClimateEntityFeature.FAN_MODE
-                | ClimateEntityFeature.SWING_MODE
-                | ClimateEntityFeature.SWING_HORIZONTAL_MODE
-                | ClimateEntityFeature.TURN_OFF
-                | ClimateEntityFeature.TURN_ON
-            ),
-        )
-
-    def test_display_is_on(self):
-        self.dps[FLAGS_DPS] = "0000"
-        self.assertFalse(self.display_switch.is_on)
-        self.dps[FLAGS_DPS] = "0008"
-        self.assertTrue(self.display_switch.is_on)
-        self.dps[FLAGS_DPS] = "8001"
-        self.assertFalse(self.display_switch.is_on)
-        self.dps[FLAGS_DPS] = "8009"
-        self.assertTrue(self.display_switch.is_on)
-
-    def test_buzzer_is_on(self):
-        self.dps[FLAGS_DPS] = "0008"
-        self.assertFalse(self.buzzer_switch.is_on)
-        self.dps[FLAGS_DPS] = "0018"
-        self.assertTrue(self.buzzer_switch.is_on)
-        self.dps[FLAGS_DPS] = "8000"
-        self.assertFalse(self.buzzer_switch.is_on)
-        self.dps[FLAGS_DPS] = "8010"
-        self.assertTrue(self.buzzer_switch.is_on)
-
-    def test_soft_wind_is_on(self):
-        self.dps[FLAGS_DPS] = "0000"
-        self.assertFalse(self.soft_wind_switch.is_on)
-        self.dps[FLAGS_DPS] = "0008"
-        self.assertFalse(self.soft_wind_switch.is_on)
-        self.dps[FLAGS_DPS] = "8002"
-        self.assertTrue(self.soft_wind_switch.is_on)
-        self.dps[FLAGS_DPS] = "8008"
-        self.assertTrue(self.soft_wind_switch.is_on)
-
-    async def test_turn_on_display(self):
-        self.dps[FLAGS_DPS] = "0000"
-        async with assert_device_properties_set(
-            self.subject._device, {FLAGS_DPS: "0008"}
-        ):
-            await self.display_switch.async_turn_on()
-        self.dps[FLAGS_DPS] = "8001"
-        async with assert_device_properties_set(
-            self.subject._device, {FLAGS_DPS: "8009"}
-        ):
-            await self.display_switch.async_turn_on()
-
-    async def test_turn_off_display(self):
-        self.dps[FLAGS_DPS] = "0018"
-        async with assert_device_properties_set(
-            self.subject._device, {FLAGS_DPS: "0010"}
-        ):
-            await self.display_switch.async_turn_off()
-        self.dps[FLAGS_DPS] = "8009"
-        async with assert_device_properties_set(
-            self.subject._device, {FLAGS_DPS: "8001"}
-        ):
-            await self.display_switch.async_turn_off()
-
-    async def test_turn_on_buzzer(self):
-        self.dps[FLAGS_DPS] = "8008"
-        async with assert_device_properties_set(
-            self.subject._device, {FLAGS_DPS: "8018"}
-        ):
-            await self.buzzer_switch.async_turn_on()
-        self.dps[FLAGS_DPS] = "0009"
-        async with assert_device_properties_set(
-            self.subject._device, {FLAGS_DPS: "0019"}
-        ):
-            await self.buzzer_switch.async_turn_on()
-
-    async def test_turn_off_buzzer(self):
-        self.dps[FLAGS_DPS] = "8018"
-        async with assert_device_properties_set(
-            self.subject._device, {FLAGS_DPS: "8008"}
-        ):
-            await self.buzzer_switch.async_turn_off()
-        self.dps[FLAGS_DPS] = "0019"
-        async with assert_device_properties_set(
-            self.subject._device, {FLAGS_DPS: "0009"}
-        ):
-            await self.buzzer_switch.async_turn_off()
-
-    async def test_turn_on_soft_wind(self):
-        self.dps[FLAGS_DPS] = "0008"
-        async with assert_device_properties_set(
-            self.subject._device, {FLAGS_DPS: "8008"}
-        ):
-            await self.soft_wind_switch.async_turn_on()
-        self.dps[FLAGS_DPS] = "0010"
-        async with assert_device_properties_set(
-            self.subject._device, {FLAGS_DPS: "8010"}
-        ):
-            await self.soft_wind_switch.async_turn_on()
-
-    async def test_turn_off_soft_wind(self):
-        self.dps[FLAGS_DPS] = "8008"
-        async with assert_device_properties_set(
-            self.subject._device, {FLAGS_DPS: "0008"}
-        ):
-            await self.soft_wind_switch.async_turn_off()
-        self.dps[FLAGS_DPS] = "8011"
-        async with assert_device_properties_set(
-            self.subject._device, {FLAGS_DPS: "0011"}
-        ):
-            await self.soft_wind_switch.async_turn_off()

+ 0 - 154
tests/devices/test_stirling_fs140dc_fan.py

@@ -1,154 +0,0 @@
-from homeassistant.components.fan import FanEntityFeature
-
-from ..const import STIRLING_FS1_FAN_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-PRESET_DPS = "2"
-SPEED_DPS = "3"
-OSCILLATE_DPS = "5"
-TIMER_DPS = "22"
-
-
-class TestStirlingFS1Fan(SwitchableTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("stirling_fs140dc_fan.yaml", STIRLING_FS1_FAN_PAYLOAD)
-        self.subject = self.entities.get("fan")
-        self.timer = self.entities.get("select_timer")
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.mark_secondary(["select_timer"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                FanEntityFeature.OSCILLATE
-                | FanEntityFeature.PRESET_MODE
-                | FanEntityFeature.SET_SPEED
-                | FanEntityFeature.TURN_OFF
-                | FanEntityFeature.TURN_ON
-            ),
-        )
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = "normal"
-        self.assertEqual(self.subject.preset_mode, "normal")
-
-        self.dps[PRESET_DPS] = "nature"
-        self.assertEqual(self.subject.preset_mode, "nature")
-
-        self.dps[PRESET_DPS] = "sleep"
-        self.assertEqual(self.subject.preset_mode, "sleep")
-
-        self.dps[PRESET_DPS] = None
-        self.assertIs(self.subject.preset_mode, None)
-
-    def test_preset_modes(self):
-        self.assertCountEqual(
-            self.subject.preset_modes,
-            ["normal", "nature", "sleep"],
-        )
-
-    async def test_set_preset_mode_to_normal(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "normal"},
-        ):
-            await self.subject.async_set_preset_mode("normal")
-
-    async def test_set_preset_mode_to_nature(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "nature"},
-        ):
-            await self.subject.async_set_preset_mode("nature")
-
-    async def test_set_preset_mode_to_sleep(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "sleep"},
-        ):
-            await self.subject.async_set_preset_mode("sleep")
-
-    def test_oscillating(self):
-        self.dps[OSCILLATE_DPS] = False
-        self.assertFalse(self.subject.oscillating)
-
-        self.dps[OSCILLATE_DPS] = True
-        self.assertTrue(self.subject.oscillating)
-
-        self.dps[OSCILLATE_DPS] = None
-        self.assertFalse(self.subject.oscillating)
-
-    async def test_oscillate_off(self):
-        async with assert_device_properties_set(
-            self.subject._device, {OSCILLATE_DPS: False}
-        ):
-            await self.subject.async_oscillate(False)
-
-    async def test_oscillate_on(self):
-        async with assert_device_properties_set(
-            self.subject._device, {OSCILLATE_DPS: True}
-        ):
-            await self.subject.async_oscillate(True)
-
-    def test_speed(self):
-        self.dps[SPEED_DPS] = "4"
-        self.assertAlmostEqual(self.subject.percentage, 26, 0)
-
-    def test_speed_step(self):
-        self.assertAlmostEqual(self.subject.percentage_step, 6.67, 2)
-        self.assertEqual(self.subject.speed_count, 15)
-
-    async def test_set_speed(self):
-        async with assert_device_properties_set(self.subject._device, {SPEED_DPS: 5}):
-            await self.subject.async_set_percentage(33)
-
-    async def test_set_speed_snaps(self):
-        async with assert_device_properties_set(self.subject._device, {SPEED_DPS: 10}):
-            await self.subject.async_set_percentage(64)
-
-    def test_extra_state_attributes(self):
-        self.assertEqual(self.subject.extra_state_attributes, {})
-        self.assertEqual(self.timer.extra_state_attributes, {})
-
-    def test_timer_options(self):
-        self.assertCountEqual(
-            self.timer.options,
-            [
-                "cancel",
-                "30m",
-                "1h",
-                "1h30m",
-                "2h",
-                "2h30m",
-                "3h",
-                "3h30m",
-                "4h",
-                "4h30m",
-                "5h",
-                "5h30m",
-                "6h",
-                "6h30m",
-                "7h",
-                "7h30m",
-                "8h",
-                "8h30m",
-                "9h",
-                "9h30m",
-                "10h",
-            ],
-        )
-
-    def test_timer_current_option(self):
-        self.dps[TIMER_DPS] = "0_5"
-        self.assertEqual(self.timer.current_option, "30m")
-
-    async def test_select_option(self):
-        async with assert_device_properties_set(
-            self.timer._device,
-            {TIMER_DPS: "4_0"},
-        ):
-            await self.timer.async_select_option("4h")

+ 0 - 183
tests/devices/test_thermex_if50v.py

@@ -1,183 +0,0 @@
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.water_heater import (
-    STATE_ECO,
-    STATE_ELECTRIC,
-    STATE_OFF,
-    STATE_PERFORMANCE,
-    WaterHeaterEntityFeature,
-)
-from homeassistant.const import PRECISION_WHOLE, UnitOfTemperature
-
-from ..const import THERMEX_IF50V_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import BasicBinarySensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-POWER_DP = "101"
-TEMPERATURE_DP = "104"
-CURRENTTEMP_DP = "102"
-MODE_DP = "105"
-ERROR_DP = "106"
-
-
-class TestThermexIF50V(
-    BasicBinarySensorTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig(
-            "thermex_if50v_waterheater.yaml",
-            THERMEX_IF50V_PAYLOAD,
-        )
-        self.subject = self.entities.get("water_heater")
-        self.setUpBasicBinarySensor(
-            ERROR_DP,
-            self.entities.get("binary_sensor_problem"),
-            device_class=BinarySensorDeviceClass.PROBLEM,
-            testdata=(1, 0),
-        )
-        self.mark_secondary(["binary_sensor_problem"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            WaterHeaterEntityFeature.OPERATION_MODE
-            | WaterHeaterEntityFeature.TARGET_TEMPERATURE
-            | WaterHeaterEntityFeature.AWAY_MODE
-            | WaterHeaterEntityFeature.ON_OFF,
-        )
-
-    def test_temperature_unit_returns_celsius(self):
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-
-    def test_precision(self):
-        self.assertEqual(self.subject.precision, PRECISION_WHOLE)
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DP] = 55
-        self.assertEqual(self.subject.current_temperature, 55)
-
-    def test_min_temp(self):
-        self.assertEqual(self.subject.min_temp, 15)
-
-    def test_max_temp(self):
-        self.assertEqual(self.subject.max_temp, 75)
-
-    def test_target_temperature(self):
-        self.dps[TEMPERATURE_DP] = 61
-        self.assertEqual(self.subject.target_temperature, 61)
-
-    def test_target_temperature_step(self):
-        self.assertEqual(self.subject.target_temperature_step, 1)
-
-    def test_operation_list(self):
-        self.assertCountEqual(
-            self.subject.operation_list,
-            [
-                STATE_ECO,
-                STATE_ELECTRIC,
-                STATE_PERFORMANCE,
-                STATE_OFF,
-                "away",
-            ],
-        )
-
-    def test_current_operation(self):
-        self.dps[POWER_DP] = True
-        self.dps[MODE_DP] = "3"
-        self.assertEqual(self.subject.current_operation, STATE_ECO)
-        self.dps[MODE_DP] = "1"
-        self.assertEqual(self.subject.current_operation, STATE_PERFORMANCE)
-        self.dps[MODE_DP] = "2"
-        self.assertEqual(self.subject.current_operation, STATE_ELECTRIC)
-        self.dps[MODE_DP] = "4"
-        self.assertEqual(self.subject.current_operation, "away")
-        self.dps[POWER_DP] = False
-        self.assertEqual(self.subject.current_operation, STATE_OFF)
-
-    def test_is_away_mode_redirects_to_mode(self):
-        self.dps[POWER_DP] = True
-        self.dps[MODE_DP] = "4"
-        self.assertTrue(self.subject.is_away_mode_on)
-        self.dps[MODE_DP] = "2"
-        self.assertFalse(self.subject.is_away_mode_on)
-
-    async def test_set_temperature(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {TEMPERATURE_DP: 65},
-        ):
-            await self.subject.async_set_temperature(temperature=65)
-
-    async def test_set_operation_mode_to_eco(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: True, MODE_DP: "3"},
-        ):
-            await self.subject.async_set_operation_mode(STATE_ECO)
-
-    async def test_set_operation_mode_with_temperature_service(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: True, MODE_DP: "3"},
-        ):
-            await self.subject.async_set_temperature(operation_mode=STATE_ECO)
-
-    async def test_set_operation_mode_to_electric(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: True, MODE_DP: "2"},
-        ):
-            await self.subject.async_set_operation_mode(STATE_ELECTRIC)
-
-    async def test_set_operation_mode_to_performance(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: True, MODE_DP: "1"},
-        ):
-            await self.subject.async_set_operation_mode(STATE_PERFORMANCE)
-
-    async def test_set_operation_mode_to_off(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: False},
-        ):
-            await self.subject.async_set_operation_mode(STATE_OFF)
-
-    async def test_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: True},
-        ):
-            await self.subject.async_turn_on()
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: False},
-        ):
-            await self.subject.async_turn_off()
-
-    async def test_turn_away_mode_on(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: True, MODE_DP: "4"},
-        ):
-            await self.subject.async_turn_away_mode_on()
-
-    async def test_turn_away_mode_off(self):
-        self.dps[POWER_DP] = True
-        self.dps[MODE_DP] = "4"
-
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DP: True, MODE_DP: "2"},
-        ):
-            await self.subject.async_turn_away_mode_off()
-
-    def test_basic_bsensor_extra_state_attributes(self):
-        self.dps[ERROR_DP] = 2
-        self.assertDictEqual(
-            self.basicBSensor.extra_state_attributes,
-            {"fault_code": 2},
-        )

+ 0 - 49
tests/devices/test_tmwf02_fan.py

@@ -1,49 +0,0 @@
-from homeassistant.components.fan import FanEntityFeature
-
-from ..const import TMWF02_FAN_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-TIMER_DPS = "2"
-LEVEL_DPS = "3"
-SPEED_DPS = "4"
-
-
-class TestTMWF02Fan(SwitchableTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("tmwf02_fan.yaml", TMWF02_FAN_PAYLOAD)
-        self.subject = self.entities["fan"]
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.mark_secondary(["time_timer"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            FanEntityFeature.SET_SPEED
-            | FanEntityFeature.TURN_ON
-            | FanEntityFeature.TURN_OFF,
-        )
-
-    def test_speed(self):
-        self.dps[SPEED_DPS] = 35
-        self.assertEqual(self.subject.percentage, 35)
-
-    def test_speed_step(self):
-        self.assertEqual(self.subject.percentage_step, 1)
-
-    async def test_set_speed(self):
-        async with assert_device_properties_set(self.subject._device, {SPEED_DPS: 70}):
-            await self.subject.async_set_percentage(70)
-
-    async def test_set_speed_snaps(self):
-        async with assert_device_properties_set(self.subject._device, {SPEED_DPS: 25}):
-            await self.subject.async_set_percentage(24.8)
-
-    def test_extra_state_attributes(self):
-        self.dps[LEVEL_DPS] = "level_3"
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {"fan_level": "level_3"},
-        )

+ 0 - 88
tests/devices/test_tompd63lw_breaker.py

@@ -1,88 +0,0 @@
-"""Tests for multiple sensors encoded together in a single dp."""
-
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.const import (
-    UnitOfElectricCurrent,
-    UnitOfElectricPotential,
-    UnitOfPower,
-)
-
-from ..const import TOMPD63LW_SOCKET_PAYLOAD
-from ..mixins.sensor import MultiSensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-ENERGY_DP = "1"
-PHASEA_DP = "6"
-FAULT_DP = "9"
-PREPAY_DP = "11"
-RESET_DP = "12"
-BALANCE_DP = "13"
-CHARGE_DP = "14"
-LEAKAGE_DP = "15"
-SWITCH_DP = "16"
-ALARM1_DP = "17"
-ALARM2_DP = "18"
-IDNUM_DP = "19"
-TEST_DP = "21"
-
-
-class TestTOMPD63lw(MultiSensorTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("tompd_63lw_breaker.yaml", TOMPD63LW_SOCKET_PAYLOAD)
-        self.subject = self.entities.get("switch")
-        self.setUpMultiSensors(
-            [
-                {
-                    "name": "sensor_voltage",
-                    "dps": PHASEA_DP,
-                    "unit": UnitOfElectricPotential.VOLT,
-                    "device_class": SensorDeviceClass.VOLTAGE,
-                    "testdata": ("CPwAFGEAAu4=", 230.0),
-                },
-                {
-                    "name": "sensor_current",
-                    "dps": PHASEA_DP,
-                    "unit": UnitOfElectricCurrent.AMPERE,
-                    "device_class": SensorDeviceClass.CURRENT,
-                    "testdata": ("CPwAFGEAAu4=", 5.217),
-                },
-                {
-                    "name": "sensor_power",
-                    "dps": PHASEA_DP,
-                    "unit": UnitOfPower.KILO_WATT,
-                    "device_class": SensorDeviceClass.POWER,
-                    "testdata": ("CPwAFGEAAu4=", 0.75),
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "binary_sensor_problem",
-                "button_clear_energy",
-                "button_earth_leak_test",
-                "button_energy_reset",
-                "button_factory_reset",
-                "button_refresh_sensors",
-                "number_charge_energy",
-                "sensor_balance_energy",
-                "sensor_current",
-                "sensor_frequency",
-                "sensor_leakage_current",
-                "sensor_power",
-                "sensor_power_factor",
-                "sensor_voltage",
-                "switch_prepayment",
-            ]
-        )
-
-    def test_phasea_encoding(self):
-        self.dps[PHASEA_DP] = "CQQAFGkAAu4="
-        self.assertEqual(self.multiSensor["sensor_voltage"].native_value, 230.8)
-        self.assertEqual(self.multiSensor["sensor_current"].native_value, 5.225)
-        self.assertEqual(self.multiSensor["sensor_power"].native_value, 0.75)
-
-    def test_phasea_missing(self):
-        self.dps[PHASEA_DP] = None
-        self.assertIsNone(self.multiSensor["sensor_voltage"].native_value)
-        self.assertIsNone(self.multiSensor["sensor_current"].native_value)
-        self.assertIsNone(self.multiSensor["sensor_power"].native_value)

+ 0 - 46
tests/devices/test_treatlife_ds02f.py

@@ -1,46 +0,0 @@
-from homeassistant.components.fan import FanEntityFeature
-
-from ..const import TREATLIFE_DS02F_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-TIMER_DPS = "2"
-SPEED_DPS = "3"
-
-
-class TestTreatlifeFan(SwitchableTests, TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("treatlife_ds02_fan.yaml", TREATLIFE_DS02F_PAYLOAD)
-        self.subject = self.entities["fan"]
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.mark_secondary(["time_timer"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            FanEntityFeature.SET_SPEED
-            | FanEntityFeature.TURN_ON
-            | FanEntityFeature.TURN_OFF,
-        )
-
-    def test_speed(self):
-        self.dps[SPEED_DPS] = "level_2"
-        self.assertEqual(self.subject.percentage, 50)
-
-    def test_speed_step(self):
-        self.assertEqual(self.subject.percentage_step, 25)
-        self.assertEqual(self.subject.speed_count, 4)
-
-    async def test_set_speed(self):
-        async with assert_device_properties_set(
-            self.subject._device, {SPEED_DPS: "level_3"}
-        ):
-            await self.subject.async_set_percentage(75)
-
-    async def test_set_speed_snaps(self):
-        async with assert_device_properties_set(
-            self.subject._device, {SPEED_DPS: "level_1"}
-        ):
-            await self.subject.async_set_percentage(30)

+ 0 - 146
tests/devices/test_vork_vk6067aw_purifier.py

@@ -1,146 +0,0 @@
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.fan import FanEntityFeature
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.const import PERCENTAGE, UnitOfTime
-
-from ..const import VORK_VK6067_PURIFIER_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import BasicBinarySensorTests
-from ..mixins.button import BasicButtonTests
-from ..mixins.light import BasicLightTests
-from ..mixins.select import BasicSelectTests
-from ..mixins.sensor import MultiSensorTests
-from ..mixins.switch import SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-MODE_DPS = "4"
-FILTER_DPS = "5"
-LIGHT_DPS = "8"
-RESET_DPS = "11"
-TIMER_DPS = "18"
-COUNTDOWN_DPS = "19"
-AQI_DPS = "21"
-ERROR_DPS = "22"
-
-
-class TestVorkVK6267AWPurifier(
-    BasicBinarySensorTests,
-    BasicButtonTests,
-    BasicLightTests,
-    BasicSelectTests,
-    MultiSensorTests,
-    SwitchableTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("vork_vk6067aw_purifier.yaml", VORK_VK6067_PURIFIER_PAYLOAD)
-        self.subject = self.entities["fan"]
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.setUpBasicBinarySensor(
-            ERROR_DPS,
-            self.entities.get("binary_sensor_problem"),
-            device_class=BinarySensorDeviceClass.PROBLEM,
-            testdata=(1, 0),
-        )
-        self.setUpBasicLight(LIGHT_DPS, self.entities.get("light"))
-        self.setUpBasicSelect(
-            TIMER_DPS,
-            self.entities.get("select_timer"),
-            {
-                "cancel": "cancel",
-                "1h": "1h",
-                "2h": "2h",
-            },
-        )
-        self.setUpBasicButton(
-            RESET_DPS,
-            self.entities.get("button_filter_reset"),
-        )
-        self.setUpMultiSensors(
-            [
-                {
-                    "dps": AQI_DPS,
-                    "name": "sensor_air_quality",
-                    "device_class": SensorDeviceClass.ENUM,
-                    "testdata": ("great", "excellent"),
-                    "options": ["excellent", "good", "severe", "poor"],
-                },
-                {
-                    "dps": COUNTDOWN_DPS,
-                    "name": "sensor_time_remaining",
-                    "unit": UnitOfTime.MINUTES,
-                    "device_class": SensorDeviceClass.DURATION,
-                },
-                {
-                    "dps": FILTER_DPS,
-                    "name": "sensor_filter_life",
-                    "unit": PERCENTAGE,
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "binary_sensor_problem",
-                "button_filter_reset",
-                "light",
-                "select_timer",
-                "sensor_air_quality",
-                "sensor_filter_life",
-                "sensor_time_remaining",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            FanEntityFeature.PRESET_MODE
-            | FanEntityFeature.TURN_ON
-            | FanEntityFeature.TURN_OFF,
-        )
-
-    def test_preset_modes(self):
-        self.assertCountEqual(
-            self.subject.preset_modes,
-            ["nature", "fresh", "strong", "smart", "sleep"],
-        )
-
-    def test_preset_mode(self):
-        self.dps[MODE_DPS] = "low"
-        self.assertEqual(self.subject.preset_mode, "nature")
-        self.dps[MODE_DPS] = "mid"
-        self.assertEqual(self.subject.preset_mode, "fresh")
-        self.dps[MODE_DPS] = "high"
-        self.assertEqual(self.subject.preset_mode, "strong")
-        self.dps[MODE_DPS] = "auto"
-        self.assertEqual(self.subject.preset_mode, "smart")
-        self.dps[MODE_DPS] = "sleep"
-        self.assertEqual(self.subject.preset_mode, "sleep")
-
-    async def test_set_preset_to_low(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {MODE_DPS: "low"},
-        ):
-            await self.subject.async_set_preset_mode("nature")
-
-    async def test_set_preset_to_auto(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {MODE_DPS: "auto"},
-        ):
-            await self.subject.async_set_preset_mode("smart")
-
-    async def test_set_preset_to_sleep(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {MODE_DPS: "sleep"},
-        ):
-            await self.subject.async_set_preset_mode("sleep")
-
-    def test_basic_bsensor_extra_state_attributes(self):
-        self.dps[ERROR_DPS] = 2
-        self.assertDictEqual(
-            self.basicBSensor.extra_state_attributes,
-            {"fault_code": 2},
-        )

+ 0 - 122
tests/devices/test_weau_pool_heatpumpv2.py

@@ -1,122 +0,0 @@
-from homeassistant.components.binary_sensor import BinarySensorDeviceClass
-from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
-
-from ..const import WEAU_POOL_HEATPUMPV2_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.binary_sensor import BasicBinarySensorTests
-from ..mixins.climate import TargetTemperatureTests
-from .base_device_tests import TuyaDeviceTestCase
-
-POWER_DPS = "1"
-MODE_DPS = "2"
-TEMPERATURE_DPS = "9"
-CURRENTTEMP_DPS = "10"
-FAULT_DPS = "20"
-UNKNOWN101_DPS = "101"
-UNKNOWN102_DPS = "102"
-UNKNOWN103_DPS = "103"
-UNKNOWN104_DPS = "104"
-
-
-class TestWeauPoolHeatpumpV2(
-    BasicBinarySensorTests,
-    TargetTemperatureTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("weau_pool_heatpump_v2.yaml", WEAU_POOL_HEATPUMPV2_PAYLOAD)
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=7.0,
-            max=60.0,
-        )
-        self.setUpBasicBinarySensor(
-            FAULT_DPS,
-            self.entities.get("binary_sensor_problem"),
-            device_class=BinarySensorDeviceClass.PROBLEM,
-            testdata=(4, 0),
-        )
-        self.mark_secondary(["binary_sensor_problem"])
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            ClimateEntityFeature.TARGET_TEMPERATURE
-            | ClimateEntityFeature.PRESET_MODE
-            | ClimateEntityFeature.TURN_OFF
-            | ClimateEntityFeature.TURN_ON,
-        )
-
-    def test_current_temperature(self):
-        self.dps[CURRENTTEMP_DPS] = 194
-        self.assertEqual(self.subject.current_temperature, 19.4)
-
-    def test_hvac_mode(self):
-        self.dps[POWER_DPS] = True
-        self.dps[MODE_DPS] = "eheat"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-        self.dps[MODE_DPS] = "ecool"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.COOL)
-        self.dps[MODE_DPS] = "sheat"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-        self.dps[MODE_DPS] = "scool"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.COOL)
-        self.dps[MODE_DPS] = "bheat"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-        self.dps[MODE_DPS] = "bcool"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.COOL)
-        self.dps[MODE_DPS] = "auto"
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT_COOL)
-        self.dps[POWER_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(
-            self.subject.hvac_modes,
-            [HVACMode.OFF, HVACMode.COOL, HVACMode.HEAT, HVACMode.HEAT_COOL],
-        )
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DPS: False},
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    async def test_set_cool(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DPS: True, MODE_DPS: "ecool"},
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.COOL)
-
-    async def test_set_heat(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {POWER_DPS: True, MODE_DPS: "eheat"},
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT)
-
-    def test_extra_state_attributes(self):
-        self.dps[UNKNOWN101_DPS] = 101
-        self.dps[UNKNOWN102_DPS] = 102
-        self.dps[UNKNOWN103_DPS] = 103
-        self.dps[UNKNOWN104_DPS] = True
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {
-                "unknown_101": 101,
-                "unknown_102": 102,
-                "unknown_103": 103,
-                "unknown_104": True,
-            },
-        )
-
-    def test_basic_bsensor_extra_state_attributes(self):
-        self.dps[FAULT_DPS] = 4
-        self.assertDictEqual(
-            self.basicBSensor.extra_state_attributes,
-            {"fault_code": 4, "description": "flow_fault"},
-        )

+ 0 - 134
tests/devices/test_wetair_wawh1210lw_humidifier.py

@@ -1,134 +0,0 @@
-from homeassistant.components.humidifier import HumidifierEntityFeature
-from homeassistant.components.humidifier.const import (
-    MODE_AUTO,
-    MODE_BOOST,
-    MODE_NORMAL,
-    MODE_SLEEP,
-)
-from homeassistant.const import PERCENTAGE
-
-from ..const import WETAIR_WAWH1210_HUMIDIFIER_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.light import BasicLightTests
-from ..mixins.lock import BasicLockTests
-from ..mixins.sensor import MultiSensorTests
-from ..mixins.switch import MultiSwitchTests, SwitchableTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH_DPS = "1"
-LIGHT_DPS = "5"
-SOUND_DPS = "8"
-HUMIDITY_DPS = "13"
-CURRENTHUMID_DPS = "14"
-UNKNOWN22_DPS = "22"
-PRESET_DPS = "24"
-IONIZER_DPS = "25"
-LOCK_DPS = "29"
-LEVEL_DPS = "101"
-
-
-class TestWetairWAWH1210LWHumidifier(
-    BasicLightTests,
-    BasicLockTests,
-    MultiSensorTests,
-    MultiSwitchTests,
-    SwitchableTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig(
-            "wetair_wawh1210lw_humidifier.yaml", WETAIR_WAWH1210_HUMIDIFIER_PAYLOAD
-        )
-        self.subject = self.entities.get("humidifier_humidifier")
-        self.setUpSwitchable(SWITCH_DPS, self.subject)
-        self.setUpBasicLight(LIGHT_DPS, self.entities.get("light_display"))
-        self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock"))
-        self.setUpMultiSensors(
-            [
-                {
-                    "dps": LEVEL_DPS,
-                    "name": "sensor_water_level",
-                    "unit": PERCENTAGE,
-                },
-            ]
-        )
-        self.setUpMultiSwitch(
-            [
-                {
-                    "dps": SOUND_DPS,
-                    "name": "switch_sound",
-                },
-                {
-                    "dps": IONIZER_DPS,
-                    "name": "switch_ionizer",
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "light_display",
-                "lock_child_lock",
-                "sensor_water_level",
-                "switch_sound",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(self.subject.supported_features, HumidifierEntityFeature.MODES)
-
-    def test_min_target_humidity(self):
-        self.assertEqual(self.subject.min_humidity, 30)
-
-    def test_max_target_humidity(self):
-        self.assertEqual(self.subject.max_humidity, 80)
-
-    def test_target_humidity(self):
-        self.dps[HUMIDITY_DPS] = 55
-        self.assertEqual(self.subject.target_humidity, 55)
-
-    def test_available_modes(self):
-        self.assertCountEqual(
-            self.subject.available_modes,
-            [MODE_AUTO, MODE_BOOST, MODE_NORMAL, MODE_SLEEP],
-        )
-
-    def test_mode(self):
-        self.dps[PRESET_DPS] = "AUTO"
-        self.assertEqual(self.subject.mode, MODE_AUTO)
-        self.dps[PRESET_DPS] = "MIDDLE"
-        self.assertEqual(self.subject.mode, MODE_NORMAL)
-        self.dps[PRESET_DPS] = "HIGH"
-        self.assertEqual(self.subject.mode, MODE_BOOST)
-        self.dps[PRESET_DPS] = "SLEEP"
-        self.assertEqual(self.subject.mode, MODE_SLEEP)
-
-    async def test_set_mode_to_auto(self):
-        async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: "AUTO"}
-        ):
-            await self.subject.async_set_mode(MODE_AUTO)
-
-    async def test_set_mode_to_normal(self):
-        async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: "MIDDLE"}
-        ):
-            await self.subject.async_set_mode(MODE_NORMAL)
-
-    async def test_set_mode_to_boost(self):
-        async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: "HIGH"}
-        ):
-            await self.subject.async_set_mode(MODE_BOOST)
-
-    async def test_set_mode_to_sleep(self):
-        async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: "SLEEP"}
-        ):
-            await self.subject.async_set_mode(MODE_SLEEP)
-
-    def test_extra_state_attributes(self):
-        self.dps[UNKNOWN22_DPS] = 22
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {"unknown_22": 22},
-        )

+ 0 - 221
tests/devices/test_wetair_wch750_heater.py

@@ -1,221 +0,0 @@
-from homeassistant.components.climate.const import (
-    PRESET_AWAY,
-    PRESET_BOOST,
-    PRESET_COMFORT,
-    ClimateEntityFeature,
-    HVACMode,
-)
-from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.const import UnitOfTemperature, UnitOfTime
-
-from ..const import WETAIR_WCH750_HEATER_PAYLOAD
-from ..helpers import assert_device_properties_set
-from ..mixins.climate import TargetTemperatureTests
-from ..mixins.light import DimmableLightTests
-from ..mixins.select import BasicSelectTests
-from ..mixins.sensor import BasicSensorTests
-from .base_device_tests import TuyaDeviceTestCase
-
-HVACMODE_DPS = "1"
-TEMPERATURE_DPS = "2"
-PRESET_DPS = "4"
-HVACACTION_DPS = "11"
-TIMER_DPS = "19"
-COUNTDOWN_DPS = "20"
-UNKNOWN21_DPS = "21"
-BRIGHTNESS_DPS = "101"
-
-
-class TestWetairWCH750Heater(
-    BasicSelectTests,
-    BasicSensorTests,
-    DimmableLightTests,
-    TargetTemperatureTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("wetair_wch750_heater.yaml", WETAIR_WCH750_HEATER_PAYLOAD)
-        self.subject = self.entities.get("climate")
-        self.setUpTargetTemperature(
-            TEMPERATURE_DPS,
-            self.subject,
-            min=10.0,
-            max=35.0,
-        )
-        self.setUpDimmableLight(
-            BRIGHTNESS_DPS,
-            self.entities.get("light_display"),
-            offval="level0",
-            tests=[
-                ("level1", 85),
-                ("level2", 170),
-                ("level3", 255),
-            ],
-        )
-        self.setUpBasicSelect(
-            TIMER_DPS,
-            self.entities.get("select_timer"),
-            {
-                "0h": "cancel",
-                "1h": "1h",
-                "2h": "2h",
-                "3h": "3h",
-                "4h": "4h",
-                "5h": "5h",
-                "6h": "6h",
-                "7h": "7h",
-                "8h": "8h",
-                "9h": "9h",
-                "10h": "10h",
-                "11h": "11h",
-                "12h": "12h",
-                "13h": "13h",
-                "14h": "14h",
-                "15h": "15h",
-                "16h": "16h",
-                "17h": "17h",
-                "18h": "18h",
-                "19h": "19h",
-                "20h": "20h",
-                "21h": "21h",
-                "22h": "22h",
-                "23h": "23h",
-                "24h": "24h",
-            },
-        )
-        self.setUpBasicSensor(
-            COUNTDOWN_DPS,
-            self.entities.get("sensor_time_remaining"),
-            unit=UnitOfTime.MINUTES,
-            device_class=SensorDeviceClass.DURATION,
-        )
-        self.mark_secondary(
-            [
-                "light_display",
-                "select_timer",
-                "sensor_time_remaining",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                ClimateEntityFeature.TARGET_TEMPERATURE
-                | ClimateEntityFeature.PRESET_MODE
-                | ClimateEntityFeature.TURN_OFF
-                | ClimateEntityFeature.TURN_ON
-            ),
-        )
-
-    def test_temperatre_unit_retrns_device_temperatre_unit(self):
-        self.assertEqual(self.subject.temperature_unit, UnitOfTemperature.CELSIUS)
-
-    def test_target_temperature_in_af_mode(self):
-        self.dps[TEMPERATURE_DPS] = 25
-        self.dps[PRESET_DPS] = "mod_antiforst"
-        self.assertEqual(self.subject.target_temperature, None)
-
-    async def test_legacy_set_temperature_with_preset_mode(self):
-        async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: "mod_antiforst"}
-        ):
-            await self.subject.async_set_temperature(preset_mode=PRESET_AWAY)
-
-    async def test_legacy_set_temperature_with_both_properties(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {TEMPERATURE_DPS: 25, PRESET_DPS: "mod_max12h"},
-        ):
-            await self.subject.async_set_temperature(
-                preset_mode=PRESET_BOOST, temperature=25
-            )
-
-    async def test_set_target_temperature_fails_in_anti_frost(self):
-        self.dps[PRESET_DPS] = "mod_antiforst"
-
-        with self.assertRaisesRegex(
-            AttributeError, "temperature cannot be set at this time"
-        ):
-            await self.subject.async_set_target_temperature(25)
-
-    def test_current_temperature_not_supported(self):
-        self.assertIsNone(self.subject.current_temperature)
-
-    def test_hvac_mode(self):
-        self.dps[HVACMODE_DPS] = True
-        self.assertEqual(self.subject.hvac_mode, HVACMode.HEAT)
-
-        self.dps[HVACMODE_DPS] = False
-        self.assertEqual(self.subject.hvac_mode, HVACMode.OFF)
-
-    def test_hvac_modes(self):
-        self.assertCountEqual(self.subject.hvac_modes, [HVACMode.OFF, HVACMode.HEAT])
-
-    async def test_turn_on(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {HVACMODE_DPS: True},
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.HEAT)
-
-    async def test_turn_off(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {HVACMODE_DPS: False},
-        ):
-            await self.subject.async_set_hvac_mode(HVACMode.OFF)
-
-    def test_preset_mode(self):
-        self.dps[PRESET_DPS] = "mod_free"
-        self.assertEqual(self.subject.preset_mode, PRESET_COMFORT)
-
-        self.dps[PRESET_DPS] = "mod_max12h"
-        self.assertEqual(self.subject.preset_mode, PRESET_BOOST)
-
-        self.dps[PRESET_DPS] = "mod_antiforst"
-        self.assertEqual(self.subject.preset_mode, PRESET_AWAY)
-
-    def test_preset_modes(self):
-        self.assertCountEqual(self.subject.preset_modes, ["comfort", "boost", "away"])
-
-    async def test_set_preset_mode_to_comfort(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "mod_free"},
-        ):
-            await self.subject.async_set_preset_mode(PRESET_COMFORT)
-
-    async def test_set_preset_mode_to_boost(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "mod_max12h"},
-        ):
-            await self.subject.async_set_preset_mode(PRESET_BOOST)
-
-    async def test_set_preset_mode_to_away(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {PRESET_DPS: "mod_antiforst"},
-        ):
-            await self.subject.async_set_preset_mode(PRESET_AWAY)
-
-    def test_extra_state_attributes(self):
-        self.dps[UNKNOWN21_DPS] = 21
-
-        self.assertDictEqual(
-            self.subject.extra_state_attributes,
-            {
-                "unknown_21": 21,
-            },
-        )
-
-    def test_light_icon(self):
-        self.assertEqual(self.dimmableLight.icon, None)
-
-    async def test_light_brightness_snaps(self):
-        async with assert_device_properties_set(
-            self.dimmableLight._device,
-            {BRIGHTNESS_DPS: "level1"},
-        ):
-            await self.dimmableLight.async_turn_on(brightness=100)

+ 0 - 56
tests/devices/test_woox_r4028_powerstrip.py

@@ -1,56 +0,0 @@
-"""Tests for the Woox R4028 powerstrip."""
-
-from homeassistant.components.switch import SwitchDeviceClass
-
-from ..const import WOOX_R4028_SOCKET_PAYLOAD
-from ..mixins.switch import MultiSwitchTests
-from .base_device_tests import TuyaDeviceTestCase
-
-SWITCH1_DPS = "1"
-SWITCH2_DPS = "2"
-SWITCH3_DPS = "3"
-SWITCHUSB_DPS = "7"
-TIMER1_DPS = "101"
-TIMER2_DPS = "102"
-TIMER3_DPS = "103"
-TIMERUSB_DPS = "105"
-
-
-class TestWooxR4028Powerstrip(
-    MultiSwitchTests,
-    TuyaDeviceTestCase,
-):
-    def setUp(self):
-        self.setUpForConfig("woox_r4028_powerstrip.yaml", WOOX_R4028_SOCKET_PAYLOAD)
-        self.setUpMultiSwitch(
-            [
-                {
-                    "dps": SWITCH1_DPS,
-                    "name": "switch_outlet_1",
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-                {
-                    "dps": SWITCH2_DPS,
-                    "name": "switch_outlet_2",
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-                {
-                    "dps": SWITCH3_DPS,
-                    "name": "switch_outlet_3",
-                    "device_class": SwitchDeviceClass.OUTLET,
-                },
-                {
-                    "dps": SWITCHUSB_DPS,
-                    "name": "switch_usb_switch",
-                    "device_class": SwitchDeviceClass.SWITCH,
-                },
-            ]
-        )
-        self.mark_secondary(
-            [
-                "time_timer_1",
-                "time_timer_2",
-                "time_timer_3",
-                "time_timer_usb",
-            ]
-        )

+ 0 - 62
tests/devices/test_zemismart_am25_blind.py

@@ -1,62 +0,0 @@
-"""Tests for the tilt position feature of AM25 roller blind."""
-
-from homeassistant.components.cover import CoverDeviceClass, CoverEntityFeature
-
-from ..const import AM25_ROLLERBLIND_PAYLOAD
-from ..helpers import assert_device_properties_set
-from .base_device_tests import TuyaDeviceTestCase
-
-COMMAND_DPS = "1"
-POSITION_DPS = "2"
-CURRENTPOS_DPS = "3"
-WORKSTATE_DP = "7"
-FAULT_DP = "12"
-DIRECTION_DP = "103"
-LIMITUP_DP = "104"
-LIMITDOWN_DP = "105"
-LIMITRESET_DP = "107"
-TILTPOS_DP = "109"
-
-
-class TestAM25Blinds(TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig(
-            "zemismart_am25_rollerblind.yaml",
-            AM25_ROLLERBLIND_PAYLOAD,
-        )
-        self.subject = self.entities["cover_blind"]
-        self.mark_secondary(
-            [
-                "binary_sensor_problem",
-                "select_direction",
-                "switch_limit_up",
-                "switch_limit_down",
-                "button_reset_limits",
-            ]
-        )
-
-    def test_device_class_is_blind(self):
-        self.assertEqual(self.subject.device_class, CoverDeviceClass.BLIND)
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            (
-                CoverEntityFeature.OPEN
-                | CoverEntityFeature.CLOSE
-                | CoverEntityFeature.SET_POSITION
-                | CoverEntityFeature.STOP
-                | CoverEntityFeature.SET_TILT_POSITION
-            ),
-        )
-
-    def test_current_cover_tilt_position(self):
-        self.dps[TILTPOS_DP] = 1
-        self.assertEqual(self.subject.current_cover_tilt_position, 10)
-
-    async def test_set_cover_tilt_position(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {TILTPOS_DP: 5},
-        ):
-            await self.subject.async_set_cover_tilt_position(50)

+ 0 - 88
tests/devices/test_zx_g30_alarm.py

@@ -1,88 +0,0 @@
-"""Tests for the ZX G30 Alarm Control Panel."""
-
-from homeassistant.components.alarm_control_panel import (
-    AlarmControlPanelEntityFeature as Feature,
-)
-from homeassistant.components.alarm_control_panel import (
-    AlarmControlPanelState,
-)
-
-from ..const import ZXG30_ALARM_PAYLOAD
-from ..helpers import assert_device_properties_set
-from .base_device_tests import TuyaDeviceTestCase
-
-ALARMSTATE_DP = "1"
-EXITDELAY_DP = "2"
-SIRENDURATION_DP = "3"
-SIRENTONE_DP = "4"
-TAMPER_DP = "9"
-VOICE_DP = "10"
-POWER_DP = "15"
-BATTERY_DP = "16"
-LOWBATT_DP = "17"
-NOTIFY_DP = "27"
-ENTRYDELAY_DP = "28"
-TICKDOWN_DP = "29"
-
-
-class TestZXG30Alarm(TuyaDeviceTestCase):
-    def setUp(self):
-        self.setUpForConfig("zx_g30_alarm.yaml", ZXG30_ALARM_PAYLOAD)
-        self.subject = self.entities["alarm_control_panel"]
-        self.mark_secondary(
-            [
-                "button_disarm",
-                "button_away_arm",
-                "button_home_arm",
-                "number_exit_delay",
-                "binary_sensor_tamper",
-                "switch_voice_prompt",
-                "binary_sensor_plug",
-                "binary_sensor_battery",
-                "switch_alarm_call",
-                "switch_alarm_sms",
-                "switch_alarm_notification",
-                "number_entry_delay",
-                "switch_tick_down",
-                "button_factory_reset",
-            ]
-        )
-
-    def test_supported_features(self):
-        self.assertEqual(
-            self.subject.supported_features,
-            Feature.ARM_AWAY | Feature.ARM_HOME,
-        )
-
-    def test_state(self):
-        self.dps[ALARMSTATE_DP] = "disarmed"
-        self.assertEqual(self.subject.alarm_state, AlarmControlPanelState.DISARMED)
-
-    async def test_arm_home(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {ALARMSTATE_DP: "home"},
-        ):
-            await self.subject.async_alarm_arm_home()
-
-    async def test_arm_away(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {ALARMSTATE_DP: "arm"},
-        ):
-            await self.subject.async_alarm_arm_away()
-
-    async def test_disarm(self):
-        async with assert_device_properties_set(
-            self.subject._device,
-            {ALARMSTATE_DP: "disarmed"},
-        ):
-            await self.subject.async_alarm_disarm()
-
-    async def test_arm_vacation_fails_when_not_supported(self):
-        with self.assertRaises(NotImplementedError):
-            await self.subject.async_alarm_arm_vacation()
-
-    async def test_trigger_fails_when_not_supported(self):
-        with self.assertRaises(NotImplementedError):
-            await self.subject.async_alarm_trigger()