You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I would like to add an implementation for Ikea Vindstyrka sensor, as you can see below. My problem is the cluster is not reporting with others. I would like to "force" it to update the sensor value (as the device is USB powered). Do you have an idea ?
Thank you in advance
"""Device handler for IKEA of Sweden VINDSTYRKA Air quality sensor."""fromtypingimportFinalfromzigpy.quirks.v2importCustomCluster, QuirkBuilderfromzigpy.quirks.v2.homeassistant.sensorimportSensorDeviceClass, SensorStateClassimportzigpy.typesastfromzigpy.zcl.foundationimportZCLAttributeDef, BaseAttributeDefsfromzhaquirks.ikeaimportIKEAMODEL="VINDSTYRKA"MEASURED_VALUE_ID=0x0000MIN_MEASURED_VALUE_ID=0x0001MAX_MEASURED_VALUE_ID=0x0002TOLERANCE_ID=0x0003CLUSTER_REVISION_ID=0xFFFDREPORTING_STATUS_ID=0xFFFEclassVOCIndex(CustomCluster):
"""VOC index value as reported by the Senserion SEN54 inside VINDSTYRKA."""cluster_id: Final[t.uint16_t] =0xFC7Ename: Final="VOC Index"ep_attribute: Final="voc_index"classAttributeDefs(BaseAttributeDefs):
measured_value: Final=ZCLAttributeDef(id=MEASURED_VALUE_ID, type=t.uint16_t, access="rp", mandatory=True)
min_measured_value: Final=ZCLAttributeDef(id=MIN_MEASURED_VALUE_ID, type=t.uint16_t, access="rp", mandatory=True)
max_measured_value: Final=ZCLAttributeDef(id=MAX_MEASURED_VALUE_ID, type=t.uint16_t, access="rp", mandatory=True)
tolerance: Final=ZCLAttributeDef(id=TOLERANCE_ID, type=t.uint16_t, access="rp", mandatory=True)
cluster_revision: Final=ZCLAttributeDef(id=CLUSTER_REVISION_ID, type=t.uint16_t, access="rp", mandatory=True)
reporting_status: Final=ZCLAttributeDef(id=REPORTING_STATUS_ID, type=t.uint16_t, access="rp", mandatory=True)
(
QuirkBuilder(IKEA, MODEL)
.replaces(VOCIndex)
.sensor(VOCIndex.AttributeDefs.measured_value.name, VOCIndex.cluster_id)
.add_to_registry()
)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I would like to add an implementation for Ikea Vindstyrka sensor, as you can see below. My problem is the cluster is not reporting with others. I would like to "force" it to update the sensor value (as the device is USB powered). Do you have an idea ?
Thank you in advance
Beta Was this translation helpful? Give feedback.
All reactions