Commit Graph

9 Commits (b5bd91096359c9cd7f070bac8015b2ae084d6488)

Author SHA1 Message Date
Joost Lekkerkerker 82e0fc5f4e
Use parametrize in drop connect binary sensor tests (#107111) 2024-01-08 10:38:44 +01:00
Jan Bouwhuis 5c82c39936
Reorganize drop_connect tests (#107148) 2024-01-04 17:48:31 +01:00
Jan Bouwhuis 6a02cadc13
Rework drop_connect switch, select and coordinator tests and cleanup fixtures (#107119)
* Refactor drop_connect switch and select tests

* Update coordinator tests, cleanup fixtures
2024-01-04 16:17:48 +01:00
Jan Bouwhuis 10f5ce2dc0
Refactor drop tests for binary_sensor (#107090) 2024-01-04 13:12:11 +01:00
Jan Bouwhuis 5508bb3ef9
Refactor drop sensor tests (#106965)
* Refactor drop sensor tests

* Setup the config entry instead of the component
2024-01-04 10:43:04 +01:00
Patrick Frazer 771409579a
Add select platform to drop_connect integration (#106309)
* Add select platform to drop_connect integration

* Fix select test

* Fix minor issues

* Make function definition more specific

* Revert change to switch.py for inclusion in separate PR

* Improve typing

* Add translation keys for select options

* Fix set function typing

* Remove redundant value check

* Remove args that match defaults
2023-12-24 15:03:10 +01:00
Patrick Frazer c126022d4f
Add switches to drop_connect integration (#106264)
* Add switches to drop_connect integration

* Let device update state

* Simplify icon property

* Use constants for icon names

* Add simulated responses from devices

* Use keyed form for switch value

* Clean up properties
2023-12-23 16:39:31 +01:00
Patrick Frazer c41173bb29
Add binary sensors to drop_connect integration (#106248) 2023-12-22 19:26:52 +01:00
Patrick Frazer fce1b6d248
Add DROP integration (#104319)
* Add DROP integration

* Remove all but one platform for first PR

* Simplify initialization of hass.data[] structure

* Remove unnecessary mnemonic 'DROP_' prefix from DOMAIN constants

* Remove unnecessary whitespace

* Clarify configuration 'confirm' step description

* Remove unnecessary whitespace

* Use device class where applicable

* Remove unnecessary constructor and change its elements to class variables

* Change base entity inheritance to CoordinatorEntity

* Make sensor definitions more concise

* Rename HA domain from drop to drop_connect

* Remove underscores from class and function names

* Remove duplicate temperature sensor

* Change title capitalization

* Refactor using SensorEntityDescription

* Remove unnecessary intermediate dict layer

* Remove generated translations file

* Remove currently unused string values

* Use constants in sensor definitions

* Replace values with constants

* Move translation keys

* Remove unnecessary unique ID and config entry references

* Clean up DROPEntity initialization

* Clean up sensors

* Rename vars and functions according to style

* Remove redundant self references

* Clean up DROPSensor initializer

* Add missing state classes

* Simplify detection of configured devices

* Change entity identifiers to create device linkage

* Move device_info to coordinator

* Remove unnecessary properties

* Correct hub device IDs

* Remove redundant attribute

* Replace optional UID with assert

* Remove redundant attribute

* Correct coordinator initialization

* Fix mypy error

* Move API functionality to 3rd party library

* Abstract device to sensor map into a dict

* Unsubscribe MQTT on unload

* Move entity device information

* Make type checking for mypy conditional

* Bump dropmqttapi to 1.0.1

* Freeze dataclass to match parent class

* Fix race condition in MQTT unsubscribe setup

* Ensure unit tests begin with invalid MQTT state

* Change unit tests to reflect device firmware

* Move MQTT subscription out of the coordinator

* Tidy up initializer

* Move entirety of MQTT subscription out of the coordinator

* Make drop_api a class property

* Remove unnecessary type checks

* Simplify some unit test asserts

* Remove argument matching default

* Add entity category to battery and cartridge life sensors
2023-12-22 14:24:08 +01:00