Add configure_reporting() method to zha component (#16487)
* Add zha.configure_reporting() method. Binds a cluster and configures reporting for the specified attribute. * git add homeassistant/components/binary_sensor/zha.py * Refactor sensor.zha to use new 'configure_reporting() method. * Zha configure reporting - switch (#1) * use configure_reporting for zha switch * lint fixes * Rename variables/classes to properly reflect the content
This commit is contained in:
1 parent
1586d3000c
commit
f2203e52ef
4 files changed
+66
-24
No files matched your search
@@ -57,9 +57,9 @@ def make_sensor(discovery_info):
|
||||
|
||||
if discovery_info['new_join']:
|
||||
cluster = list(in_clusters.values())[0]
|
||||
yield from cluster.bind()
|
||||
yield from cluster.configure_reporting(
|
||||
sensor.value_attribute, 300, 600, sensor.min_reportable_change,
|
||||
yield from zha.configure_reporting(
|
||||
sensor.entity_id, cluster, sensor.value_attribute,
|
||||
reportable_change=sensor.min_reportable_change
|
||||
)
|
||||
|
||||
return sensor
|
||||
|
||||
Reference in new issue
Block a user