Skip to content

[Help] Converting Zlinky_TIC quirk to a quirk v2 #3453

Closed
@blauret

Description

@blauret

This is issue is request for help. I hope we can have a conversation about how to convert an existing quirk into a quirk v2. I could not find existing issue related to that. I also hope documenting my steps here can help other developper during their conversion.

Following the PR #3448, @TheJulianJES suggested to convert the quirk for Zlinky_TIC into a quirk v2.

The proposed modification is to replace the signature for Fw 14.0 with

(
    QuirkBuilder(LIXEE, "ZLinky_TIC")
    .replaces(ZLinkyTICManufacturerCluster)
    .add_to_registry()
)

Looking at the log it does not look like it's working

2024-10-24 11:30:49.307 DEBUG (MainThread) [zha.application.discovery] Discovering entities for endpoint: 00:15:8d:00:05:be:83:47-1
2024-10-24 11:30:49.307 DEBUG (MainThread) [zha.application.discovery] 'button' platform -> 'IdentifyButton' using ['identify']
2024-10-24 11:30:49.307 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'Tier1SmartEnergySummation' using ['smartenergy_metering']
2024-10-24 11:30:49.307 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'Tier2SmartEnergySummation' using ['smartenergy_metering']
2024-10-24 11:30:49.307 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'Tier3SmartEnergySummation' using ['smartenergy_metering']
2024-10-24 11:30:49.307 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'Tier4SmartEnergySummation' using ['smartenergy_metering']
2024-10-24 11:30:49.307 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'Tier5SmartEnergySummation' using ['smartenergy_metering']
2024-10-24 11:30:49.307 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'Tier6SmartEnergySummation' using ['smartenergy_metering']
2024-10-24 11:30:49.307 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'Battery' using ['power']
2024-10-24 11:30:49.307 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'ElectricalMeasurementApparentPower' using ['electrical_measurement']
2024-10-24 11:30:49.307 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'ElectricalMeasurementRMSCurrent' using ['electrical_measurement']
2024-10-24 11:30:49.308 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'ElectricalMeasurementRMSVoltage' using ['electrical_measurement']
2024-10-24 11:30:49.308 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'ElectricalMeasurementFrequency' using ['electrical_measurement']
2024-10-24 11:30:49.308 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'ElectricalMeasurementPowerFactor' using ['electrical_measurement']
2024-10-24 11:30:49.308 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'SmartEnergySummationReceived' using ['smartenergy_metering']
2024-10-24 11:30:49.308 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'RSSISensor' using ['basic']
2024-10-24 11:30:49.308 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'LQISensor' using ['basic']
2024-10-24 11:30:49.308 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'PolledElectricalMeasurement' using ['electrical_measurement']
2024-10-24 11:30:49.308 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'PolledSmartEnergySummation' using ['smartenergy_metering']
2024-10-24 11:30:49.308 DEBUG (MainThread) [zha.application.discovery] 'update' platform -> 'FirmwareUpdateEntity' using ['ota']
2024-10-24 11:30:49.308 DEBUG (MainThread) [zha.zigbee.endpoint] Creating cluster handler for cluster id: 33 class: <class 'zha.zigbee.cluster_handlers.general.GreenPowerProxyClusterHandler'>
2024-10-24 11:30:49.308 DEBUG (MainThread) [zha.application.discovery] Discovering entities for endpoint: 00:15:8d:00:05:be:83:47-242
2024-10-24 11:30:49.308 DEBUG (MainThread) [zha.application.discovery] Discovering entities for device: 00:15:8d:00:05:be:83:47-LiXee ZLinky_TIC
2024-10-24 11:30:49.308 DEBUG (MainThread) [zha.application.discovery] Attempting to discover quirks v2 entities for device: 00:15:8d:00:05:be:83:47-LiXee ZLinky_TIC
2024-10-24 11:30:49.308 DEBUG (MainThread) [zha.application.discovery] Device: 00:15:8d:00:05:be:83:47-LiXee ZLinky_TIC does not expose any quirks v2 entities
2024-10-24 11:30:49.309 DEBUG (MainThread) [zha.application.gateway] [0xAC5D](LiXee ZLinky_TIC) restored as 'available', last seen: 0:03:54 ago, consider_unavailable_time: 7200 seconds
2024-10-24 11:30:49.309 DEBUG (MainThread) [zha.zigbee.endpoint] Creating cluster handler for cluster id: 0 class: <class 'zha.zigbee.cluster_handlers.general.BasicClusterHandler'>
2024-10-24 11:30:49.309 DEBUG (MainThread) [zha.zigbee.endpoint] Creating cluster handler for cluster id: 3 class: <class 'zha.zigbee.cluster_handlers.general.IdentifyClusterHandler'>
2024-10-24 11:30:49.309 DEBUG (MainThread) [zha.zigbee.endpoint] Creating cluster handler for cluster id: 32 class: <class 'zha.zigbee.cluster_handlers.general.PollControlClusterHandler'>
2024-10-24 11:30:49.309 DEBUG (MainThread) [zha.zigbee.endpoint] Creating cluster handler for cluster id: 4096 class: <class 'zha.zigbee.cluster_handlers.lightlink.LightLinkClusterHandler'>
2024-10-24 11:30:49.309 DEBUG (MainThread) [zha.zigbee.endpoint] Creating cluster handler for cluster id: 64599 class: <class 'zha.zigbee.cluster_handlers.ClusterHandler'>
2024-10-24 11:30:49.309 DEBUG (MainThread) [zha.zigbee.endpoint] Creating cluster handler for cluster id: 1 class: <class 'zha.zigbee.cluster_handlers.general.PowerConfigurationClusterHandler'>
2024-10-24 11:30:49.309 DEBUG (MainThread) [zha.application.discovery] Discovering entities for endpoint: 60:b6:47:ff:fe:fa:bd:6f-1
2024-10-24 11:30:49.309 DEBUG (MainThread) [zha.application.discovery] 'button' platform -> 'IdentifyButton' using ['identify']
2024-10-24 11:30:49.309 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'Battery' using ['power']
2024-10-24 11:30:49.309 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'RSSISensor' using ['basic']
2024-10-24 11:30:49.309 DEBUG (MainThread) [zha.application.discovery] 'sensor' platform -> 'LQISensor' using ['basic']
2024-10-24 11:30:49.310 DEBUG (MainThread) [zha.application.discovery] 'update' platform -> 'FirmwareUpdateEntity' using ['ota']

Although in HA it looks like the device is associated with my quirks v2:

image

So I'm a little confused by that line in the logs:

2024-10-24 11:30:49.308 DEBUG (MainThread) [zha.application.discovery] Device: 00:15:8d:00:05:be:83:47-LiXee ZLinky_TIC does not expose any quirks v2 entities

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions