Commit Graph

62 Commits (63646a19ccf8a6c0557317811e912a609b7b312c)

Author SHA1 Message Date
Robert Svensson 3ad3f4e2ba
Simplify signalling for updating available property of deCONZ entities (#58078) 2021-10-20 14:59:36 +02:00
Robert Svensson edefa9f4f4
Assign entity category diagnostics to deCONZ battery sensors (#58077) 2021-10-20 09:11:17 +02:00
Robert Svensson 750dd9186e
Improve deCONZ signal strings (#57140) 2021-10-07 12:48:27 +02:00
Robert Svensson 59b1433e5c
Additional place to use isinstance rather than do a string compare (#57094) 2021-10-05 09:17:45 +02:00
Robert Svensson 1c1bb057d7
CLIPGenericFlag should be deCONZ sensor not binary sensor (#56901) 2021-10-01 17:10:01 +02:00
Robert Svensson 369412547a
Use native unit of measurement in deCONZ sensors (#56897) 2021-10-01 16:50:09 +02:00
Robert Svensson f224ab6d67
Use isinstance to verify class in deCONZ integration (#56794)
* Don't enable any variants of the daylight sensor entities by default

* Use isinstance rather than doing ZHATYPE compare

* Accidentally removed an import
2021-09-29 21:19:21 +02:00
Robert Svensson 8db0bd3c0e
Fix state_class for deCONZ power sensors (#56586)
* Fix state_class for power sensors
Rewrite entity descriptions for binary sensor and sensor platforms

* Remove icon if device_class is specified
2021-09-25 20:54:55 +02:00
Robert Svensson 539ef31046
Reflect changes to pydeconz v84 (#56361)
Mostly snake case conversions and typing
But also a change in retry mechanism
Added a more complete set_* call to most types to remove the direct relation to rest API of deCONZ
2021-09-18 09:05:08 +02:00
Franck Nijhof 4c5d5a8f5a
Update deCONZ to use new state classes (#54729) 2021-08-17 08:34:41 +02:00
Erik Montnemery 41f3c2766c
Move temperature conversions to entity base class (2/8) (#54468) 2021-08-11 18:57:12 +02:00
Robert Svensson edf0e0bd08
Add energy device class to deCONZ consumption sensors (#53731) 2021-07-29 16:16:08 -07:00
Robert Svensson 6352d8fb0e
Use more attr instead of properties in deCONZ integration (#52098) 2021-06-23 21:40:34 +02:00
Erik Montnemery b169a8dbda
Mark battery, humidity and pressure sensors as STATE_CLASS_MEASUREMENT (#50924)
* Mark battery, humidity and pressure sensors as STATE_CLASS_MEASUREMENT

* Fix deconz battery sensor
2021-05-24 11:36:42 +02:00
Erik Montnemery 73d7a754e8
Mark temperature sensors as STATE_CLASS_MEASUREMENT (#50889)
* Mark temperature sensors as STATE_CLASS_MEASUREMENT

* Fix broadlink tests

* Tweak Hue changes
2021-05-21 11:44:34 +02:00
Robert Svensson 58ad3b61f7
Entities for secondary temperature values created by certain Xiaomi devices in deCONZ (#49724)
* Create sensors for secondary temperature values created by certain Xiaomi devices

* Fix tests
2021-04-27 08:43:06 +02:00
Robert Svensson 3b64c574e3
Replace local listener implementation to using config_entry.on_unload in deCONZ (#49494) 2021-04-20 08:20:57 -10:00
Robert Svensson 34245c3add
Add alarm control panel support to deCONZ integration (#48736)
* Infrastructure in place

* Base implementation

* Add alarm event

* Add custom services to alarm control panel

* Add service descriptions

* Increase test coverage

* Simplified to one entity service with an options selector

* Remove everything but the essentials

* Add library with proper support

* Fix stale comments
2021-04-20 17:34:11 +02:00
Robert Svensson c80f34a754
Add support for ZHADoorLock locks to deCONZ integration(#48516) 2021-03-31 09:36:06 +02:00
Erik Montnemery 9e9ba53f0e
Move SensorEntity last in the inheritance tree (#48230) 2021-03-22 20:05:13 +01:00
Erik Montnemery 23b562386f
Migrate integrations d-e to extend SensorEntity (#48211) 2021-03-22 12:52:29 +01:00
Erik Montnemery 6c084ae6ce
Update integrations a-e to override extra_state_attributes() (#47756) 2021-03-11 16:51:03 +01:00
Robert Svensson 6b0c569a70
Normally there should only be one battery sensor per device from deCONZ. (#46761)
With these Danfoss devices each endpoint can report its own battery state.
2021-02-25 09:54:46 +01:00
Robert Svensson ac2c01d20c
deCONZ improve options updating entities (#42320) 2020-12-02 16:21:27 +01:00
Robert Svensson 8c0b39eb9c
No update before adding entity in deCONZ (#41948) 2020-10-16 17:14:26 +02:00
Robert Svensson 552856203b
Clean deCONZ tests to depend less on integration code (#41015) 2020-10-02 11:20:33 +02:00
Robert Svensson c2ed743237
Improve deCONZ platforms (#40986)
* Use platform domain imports with the list of supported platforms

* Remove legacy async_setup_platform from platforms
2020-10-01 19:06:20 +02:00
Robert Svensson 082f866620
Improve deCONZ state updates (#40601) 2020-09-30 17:24:30 +02:00
Robert Svensson 66a8edb11e
deCONZ fix comments from #40265 (#40640)
* Use set not list

* Events are not entities

* Don't await unload_events

* Remove checks of entities content in tests

* List to set comprehension

* Why is it so hard to remember that sets arent parenthesis...
2020-09-27 11:02:45 +02:00
Robert Svensson 203c556ba3
Improve tracking of existing entities in deconz (#40265)
* Store all entities in dict

* Use stored unique id to select if to create entity or not

* Remove unnecessary init

* Change so same physical sensor doesnt try to create multiple battery sensors
Change so groups get created properly

* Add controls in tests that entities are logged correctly
2020-09-25 22:49:28 +02:00
springstan 6c8e0e20fb
Add and use light lux constant in entire code base (#40171) 2020-09-23 20:48:01 +02:00
Robert Svensson fb7fb0ea78
deCONZ - move event handling (#40424)
* Working draft

* Remove event references in sensor
2020-09-22 19:55:10 +02:00
springstan d2b1918e9c
Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
Robert Svensson 37f7d262d7
Change deCONZ sensor device classes (#36352)
* Change vibration type to vibration instead of motion

* Also replace icon and unit of measurement
2020-06-02 16:17:21 +02:00
Paulus Schoutsen aaa1d06809
Directly call async_write_ha_state (#33508)
* Directly call async_write_ha_state

* Address comments

* Fix tests
2020-04-01 14:19:51 -07:00
springstan f1a0ca7cd3
Add and use percentage constant (#32094)
* Add and use percentage constant

* Fix pylint error and broken test
2020-02-28 11:46:48 -08:00
Robert Svensson e695bb55c8
deCONZ - Race condition on slower systems (#32274)
When battery sensors gets created before other platforms loading deconz sensors gets created first the other platform would not create entities related to those battery sensors
2020-02-27 20:48:01 +01:00
Robert Svensson b5df2ba853
deCONZ - Directly reflect changes to config entry options (#31661)
* Directly reflect changes to config entry options

* Remove print

* Add tests

* Add title to config options
2020-02-18 13:24:25 -08:00
Robert Svensson fce9697591
deCONZ - Revert from using disabled_by when setting options (#31446)
* Revert from using disabled_by when setting options

* Remove signalling for changed options

* Evaluate allow group option earlier when adding a group
2020-02-04 16:37:01 -08:00
Robert Svensson 883b8f21ce
deCONZ - Library cleanup (#31410)
* Follow library changes

* Bump dependency to v70

* Fix test
2020-02-02 19:07:20 +01:00
Robert Svensson 36675fe4fa
deCONZ - New light level sensor attribute (#31255) 2020-01-29 07:40:42 +01:00
Robert Svensson c9db21ffac Fix service device refresh calling state update (#30920) 2020-01-17 15:33:46 -08:00
Robert Svensson 0d48d682dc
deCONZ - Make sensors sorted on creation for deterministic order (#30569)
* Make sensors sorted on creation for deterministic order

* Martins comment
2020-01-08 09:30:02 +01:00
Robert Svensson 536b201472
WIP deCONZ - Support Fyrtur/Kadrilj battery sensors (#30403)
* Sensor.binary is None means unsupported sensor
* Don't create ordinary sensor on ZHABattery type
2020-01-03 15:15:32 +01:00
Robert Svensson e9dc404de1 Allow battery value of 0 as well as make sure to not create a battery tracker if one already exist (#30155) 2019-12-22 22:58:22 +01:00
springstan 89c7629215 Move imports to top for deconz (#29489) 2019-12-04 21:17:18 -08:00
Robert Svensson 557e585e56
deCONZ - Support creating battery sensor when reported (#27538) 2019-11-01 22:31:22 +01:00
Robert Svensson 886d8bd6e2 deCONZ rewrite sensor tests (#26679)
* Improve binary sensor tests

* Fix sensor tests

* Improve readability of binary sensor

* Fix climate tests
Fix sensor platform not loading climate devices as sensors

* Add test to verify adding new sensor after start up
2019-09-18 10:07:32 -07:00
Robert Svensson 41c9ed5d51
deCONZ - battery sensor instead of battery attribute (#26591)
* Allow all sensors to create battery sensors
* Neither binary sensor, climate nor sensor will have battery attributes
2019-09-14 19:15:18 +02:00
Robert Svensson fb1acfccc9
deCONZ - create deconz_events through sensor platform (#26592)
* Move event creation into sensor platform where it belongs
* Fixed the weird failing test observed during device automation PR
2019-09-14 00:16:37 +02:00