test_mustool_mt15mt29_airbox.py 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. """Tests for Mustool MT15/MT29 Airbox, mainly for time entity."""
  2. from homeassistant.const import UnitOfTime
  3. from ..const import MUSTOOL_MT15MT29_AIRBOX_PAYLOAD
  4. from ..mixins.time import MultiTimeTests
  5. from .base_device_tests import TuyaDeviceTestCase
  6. class TestMustoolMT15MT29Airbox(MultiTimeTests, TuyaDeviceTestCase):
  7. __test__ = True
  8. def setUp(self):
  9. self.setUpForConfig(
  10. "mustool_mt15mt29_airbox.yaml", MUSTOOL_MT15MT29_AIRBOX_PAYLOAD
  11. )
  12. self.setUpMultiTime(
  13. [
  14. {
  15. "minute": "109",
  16. "name": "time_alarm_1",
  17. "testdata": {"minute": 600, "time": "10:00:00"},
  18. },
  19. {
  20. "minute": "110",
  21. "name": "time_alarm_2",
  22. },
  23. {
  24. "minute": "111",
  25. "name": "time_alarm_3",
  26. },
  27. ]
  28. )
  29. self.mark_secondary(
  30. [
  31. "sensor_battery",
  32. "binary_sensor_plug",
  33. "select_alarm_volume",
  34. "light_backlight",
  35. "number_co2_alarm_threshold",
  36. "number_sleep_timer",
  37. "number_timer",
  38. "number_alarm_1",
  39. "number_alarm_2",
  40. "number_alarm_3",
  41. "time_alarm_1",
  42. "time_alarm_2",
  43. "time_alarm_3",
  44. "select_temperature_unit",
  45. "number_co_alarm_threshold",
  46. "number_pm2_5_alarm_threshold",
  47. "number_formaldehyde_alarm_threshold",
  48. "switch_alarm_1",
  49. "switch_alarm_2",
  50. "switch_alarm_3",
  51. ]
  52. )