Help with a quirk

Hello everybody,

I’m new on home assistant, I started to work on it end of last year.

My system is working with zigbee’s devices. At the beginning, I installed zigbee2mqtt, but I merged to zha because it’s more stable for my installation and use less memories (the system haos is installed on a raspberry pi 3 b+).
But one device (OWON pc321) is not well recognized.

I took a lot of time to understand quirks. I finally wrote one which is reporting all attributes. But, there’s no any device.

If I install my device without the quirk, 2 entities are discovered.

But with my quirk, no one.

For the moment, I’m using zha toolkit, so I’m able to get attributes values, but it’s not the best.

Here’s my quirk :

import logging
import zigpy.types as t

from zigpy.profiles import zha
from zigpy.quirks import CustomCluster, CustomDevice
from zigpy.zcl.foundation import ZCLAttributeDef, ZCLCommandDef
from zigpy.zcl.clusters.general import (
    Basic,
    Identify,
    )
from zigpy.zcl.clusters.smartenergy import (
    Metering, 
    )
from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODELS_INFO,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
    SKIP_CONFIGURATION,
    )
    
from zhaquirks import Bus, LocalDataCluster


_LOGGER = logging.getLogger(__name__)

""" definitions cluster """

class SimpleMetering(CustomCluster):
    cluster_id = 0x0702
    name = "Owon Simple Metering dbl"
    ep_attribute = "simple_metering"

    POWER_L = 0x2000

    def __init__(self, *args, **kwargs):
        """Init electrical measurement cluster."""
        super().__init__(*args, **kwargs)
        self.endpoint.device.power_bus.add_listener(self)

    def power_reported(self, value):
        """Report consumption."""
        self._update_attribute(self.POWER_L, value)
        
    attributes: dict[int, ZCLAttributeDef] = {
        0x0000: ZCLAttributeDef("current_summ_delivered", type=t.uint48_t, access="r", mandatory=True),
        0x0017: ZCLAttributeDef("Inlet_temperature", type=t.uint24_t, access="r", mandatory=True),
        0x0200: ZCLAttributeDef("Status", type=t.bitmap8, access="r", mandatory=True),
        0x0300: ZCLAttributeDef("unit_of_measure", type=t.enum8, access="r", mandatory=True),
        0x0301: ZCLAttributeDef("multiplier", type=t.uint24_t, access="r", mandatory=True),
        0x0302: ZCLAttributeDef("divisor", type=t.uint24_t, access="r", mandatory=True),
        0x0303: ZCLAttributeDef("summation_formatting", type=t.bitmap8, access="r", mandatory=True),
        0x0304: ZCLAttributeDef("demand_formatting", type=t.bitmap8, access="r", mandatory=True),
        0x0306: ZCLAttributeDef("metering_device_type", type=t.bitmap8, access="r", mandatory=True),
        0x0400: ZCLAttributeDef("Instantaneous_Demand", type=t.uint24_t, access="rw", mandatory=True),
        0x1000: ZCLAttributeDef("report_map", type=t.bitmap8, access="rw", mandatory=True, is_manufacturer_specific=True),
        0x2000: ZCLAttributeDef("L1_phase_power", type=t.uint24_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x2001: ZCLAttributeDef("L2_phase_power", type=t.uint24_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x2002: ZCLAttributeDef("L3_phase_power", type=t.uint24_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x2100: ZCLAttributeDef("L1_phase_reactive_power", type=t.uint24_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x2101: ZCLAttributeDef("L2_phase_reactive_power", type=t.uint24_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x2102: ZCLAttributeDef("L3_phase_reactive_power", type=t.uint24_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x2103: ZCLAttributeDef("reactive_power_summation_of_the_3_phases", type=t.uint24_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x3000: ZCLAttributeDef("L1_phase_voltage", type=t.uint24_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x3001: ZCLAttributeDef("L2_phase_voltage", type=t.uint24_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x3002: ZCLAttributeDef("L3_phase_voltage", type=t.uint24_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x3100: ZCLAttributeDef("L1_phase_current", type=t.uint24_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x3101: ZCLAttributeDef("L2_phase_current", type=t.uint24_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x3102: ZCLAttributeDef("L3_phase_current", type=t.uint24_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x3103: ZCLAttributeDef("current_summation_of_the_3_phases", type=t.uint24_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x3104: ZCLAttributeDef("leakage_current", type=t.uint24_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x4000: ZCLAttributeDef("L1_phase_energy_consumption", type=t.uint48_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x4001: ZCLAttributeDef("L2_phase_energy_consumption", type=t.uint48_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x4002: ZCLAttributeDef("L3_phase_energy_consumption", type=t.uint48_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x4100: ZCLAttributeDef("L1_phase_reactive_energy_consumption", type=t.uint48_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x4101: ZCLAttributeDef("L2_phase_reactive_energy_consumption", type=t.uint48_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x4102: ZCLAttributeDef("L3_phase_reactive_energy_consumption", type=t.uint48_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x4103: ZCLAttributeDef("reactive_energy_summation_of_the_3_phases", type=t.uint48_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x5000: ZCLAttributeDef("the_latest_historical_record_time", type=t.uint32_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x5001: ZCLAttributeDef("the_oldest_historical_recorded_time", type=t.uint32_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x5002: ZCLAttributeDef("set_minimum_cycle_for_report", type=t.uint32_t, access="rw", mandatory=True, is_manufacturer_specific=True),
        0x5003: ZCLAttributeDef("set_maximum_cycle_for_report", type=t.uint32_t, access="rw", mandatory=True, is_manufacturer_specific=True),
        0x5004: ZCLAttributeDef("sent_historical_record_state", type=t.uint8_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x5005: ZCLAttributeDef("frequency", type=t.uint8_t, access="r", mandatory=True, is_manufacturer_specific=True),
        0x5006: ZCLAttributeDef("the_accumulative_threshold_of_energy", type=t.uint8_t, access="rw", mandatory=True, is_manufacturer_specific=True),
        0x5007: ZCLAttributeDef("report_mode", type=t.uint8_t, access="rw", mandatory=True, is_manufacturer_specific=True),
        0x5008: ZCLAttributeDef("Set_Z_percent_change_in_power", type=t.uint8_t, access="rw", mandatory=True, is_manufacturer_specific=True),
    } 
    expose = [
        0x2000, 0x2001, 0x2002
    ]


    server_commands: dict[int, ZCLCommandDef] = {
        0x20: ZCLCommandDef("get_history_record", {}, is_manufacturer_specific=True),
        0x21: ZCLCommandDef("stop_sending_historical_record", {}, is_manufacturer_specific=True),
    }
    
    client_commands: dict[int, ZCLCommandDef] = {
        0x20: ZCLCommandDef("sent_historical_record", {}, is_manufacturer_specific=True),
    }
    


class ClearMetering(CustomCluster):
    cluster_id = 0xFFE0
    ep_attribute = "clear_metering"

    attributes: dict[int, ZCLAttributeDef] = {}
    
    server_commands: dict[int, ZCLCommandDef] = {
        0x00: ZCLCommandDef("clear_measurement_data", {}, is_manufacturer_specific=True),
    }
    client_commands: dict[int, ZCLCommandDef] = {}
    

""" nouveau device Owon """

class Owon(CustomDevice):
    
    def __init__(self, *args, **kwargs):
        """Init."""
        self.voltage_bus = Bus()
        self.consumption_bus = Bus()
        self.power_bus = Bus()
        super().__init__(*args, **kwargs)
        
    signature = {
        #MODELS_INFO: [("Owon", "PC321")],
        ENDPOINTS: {
            # <SimpleDescriptor endpoint=1 profile=260 device_type=13
            # device_version=1
            # input_clusters=[0, 3, 1794]
            # output_clusters=[3]>
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.CONSUMPTION_AWARENESS_DEVICE,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Identify.cluster_id,
                    Metering.cluster_id,
                    ],
                OUTPUT_CLUSTERS: [Identify.cluster_id],
            },
        },
        "manufacturer": "OWON Technology Inc.",
    }
    replacement = {
        #SKIP_CONFIGURATION: True,
        ENDPOINTS: {
            # <SimpleDescriptor endpoint=1 profile=260 device_type=13
            # device_version=1
            # input_clusters=[0, 3, 1794]
            # output_clusters=[3]>
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.CONSUMPTION_AWARENESS_DEVICE,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Identify.cluster_id,
                    SimpleMetering,
                    ClearMetering,
                ],
                OUTPUT_CLUSTERS: [Identify.cluster_id],
            },
        },
    }

If someone would have an idea :blush:
Thanks

If someone is interrested, I found this solution :

  • I made the following quirk
  • I defined sensors because when the device is discovered it’s without entities
  • I made an automation to update my sensors

The quirk :

""" QUIRK FOR OWON PC321 Z                                                                    """
""" THIS QUIRK DOESN'T CREATE ENTITES WHEN THE DEVICE IS DISCOVERED                           """
""" TO MAKE IT RUNNING, YOU NEED TO CREATE SENSORS AND AN AUTOMATION. SEE CODE AT THE END     """

import logging
import zigpy.types as t

from typing import Dict
from zigpy.profiles import zha
from zigpy.quirks import CustomCluster, CustomDevice
from zigpy.zcl.foundation import ZCLAttributeDef, ZCLCommandDef
from zigpy.zcl.clusters.general import (
    Basic,
    Identify,
    )
from zigpy.zcl.clusters.smartenergy import Metering
from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODELS_INFO,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
    SKIP_CONFIGURATION,
    )



_LOGGER = logging.getLogger(__name__)


class Owon_PC321_Simple_Metering(CustomCluster, Metering):
    """ Owon PC321 CustomCluster """
    
    """ Import attributes but doesn't create entities """
    """ Needs to use ZHA Toolkit to be usefull """

    
    cluster_id = 0x0702
    ep_attribute: str = "smartenergy_metering"

    attributes = Metering.attributes.copy()
    attributes.update(
        {
        0x2000: ("phase_A_power", t.uint24_t, True),
        0x2001: ("phase_B_power", t.uint24_t, True),
        0x2002: ("phase_C_power", t.uint24_t, True),
        0x2100: ("phase_A_reactive_power", t.uint24_t, True),
        0x2101: ("phase_B_reactive_power", t.uint24_t, True),
        0x2102: ("phase_C_reactive_power", t.uint24_t, True),
        0x2103: ("reactive_power_summation_of_the_3_phases", t.uint24_t, True),
        0x3000: ("phase_A_voltage", t.uint24_t, True),
        0x3001: ("phase_B_voltage", t.uint24_t, True),
        0x3002: ("phase_C_voltage", t.uint24_t, True),
        0x3100: ("phase_A_current", t.uint24_t, True),
        0x3101: ("phase_B_current", t.uint24_t, True),
        0x3102: ("phase_C_current", t.uint24_t, True),
        0x3103: ("current_summation_of_the_3_phases", t.uint24_t, True),
        0x3104: ("leakage_current", t.uint24_t, True),
        0x4000: ("phase_A_energy_consumption", t.uint48_t, True),
        0x4001: ("phase_B_energy_consumption", t.uint48_t, True),
        0x4002: ("phase_C_energy_consumption", t.uint48_t, True),
        0x4100: ("phase_A_reactive_energy_consumption", t.uint48_t, True),
        0x4101: ("phase_B_reactive_energy_consumption", t.uint48_t, True),
        0x4102: ("phase_C_reactive_energy_consumption", t.uint48_t, True),
        0x4103: ("reactive_energy_summation_of_the_3_phases", t.uint48_t, True),
        }
    )

    server_commands: dict[int, ZCLCommandDef] = {
        0x20: ZCLCommandDef("get_history_record", {}, False, is_manufacturer_specific=True),
        0x21: ZCLCommandDef("stop_sending_historical_record", {}, False, is_manufacturer_specific=True),
    }
    
    client_commands: dict[int, ZCLCommandDef] = {
        0x20: ZCLCommandDef("sent_historical_record", {}, True, is_manufacturer_specific=True),
    }





class Owon_OC321_Clear_Metering(CustomCluster):
    cluster_id = 0xFFE0
    ep_attribute = "clear_metering"

    attributes: dict[int, ZCLAttributeDef] = {}
    
    server_commands: dict[int, ZCLCommandDef] = {
        0x00: ZCLCommandDef("clear_measurement_data", {}, is_manufacturer_specific=True),
    }
    client_commands: dict[int, ZCLCommandDef] = {}
    

""" New Device Owon PC321 Z """

class Owon_PC321(CustomDevice):
    
    signature = {
        #MODELS_INFO: [("Owon", "PC321")],
        ENDPOINTS: {
            # <SimpleDescriptor endpoint=1 profile=260 device_type=13
            # device_version=1
            # input_clusters=[0, 3, 1794]
            # output_clusters=[3]>
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.CONSUMPTION_AWARENESS_DEVICE,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Identify.cluster_id,
                    Metering.cluster_id,
                    ],
                OUTPUT_CLUSTERS: [Identify.cluster_id],
            },
        },
        "manufacturer": "OWON Technology Inc.",
    }
    replacement = {
        #SKIP_CONFIGURATION: True,
        ENDPOINTS: {
            # <SimpleDescriptor endpoint=1 profile=260 device_type=83
            # device_version=1
            # input_clusters=[0, 3, 1794, 65504]
            # output_clusters=[3]>
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.CONSUMPTION_AWARENESS_DEVICE,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Identify.cluster_id,
                    Owon_PC321_Simple_Metering,
                    Owon_OC321_Clear_Metering,
                ],
                OUTPUT_CLUSTERS: [Identify.cluster_id],
            },
        },
    }


""" REPORTING                                                                            """
""" TO HAVE ENTIIES REPORTING IT IS NEEDED TO CREATE SENSORS                             """
""" COPY THE FOLLOWING. DATAS ARE COPIE 'AS IS'. TO HAVE WELL FORMATTED DATAS, SEE BELOW """


"""
template:
    - sensor:
        - name: owon_power_phase_A
          unit_of_measurement: "W"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_power_phase_B
          unit_of_measurement: "W"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_power_phase_C
          unit_of_measurement: "W"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_reactive_power_phase_A
          unit_of_measurement: "W"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_reactive_power_phase_B
          unit_of_measurement: "W"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_reactive_power_phase_C
          unit_of_measurement: "W"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_reactive_power_summation_of_the_3_phases
          unit_of_measurement: "W"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_voltage_phase_A_brut
          unit_of_measurement: "dV"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_voltage_phase_B_brut
          unit_of_measurement: "dV"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_voltage_phase_C_brut
          unit_of_measurement: "dV"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_current_phase_A_brut
          unit_of_measurement: "mA"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_current_phase_B_brut
          unit_of_measurement: "mA"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_current_phase_C_brut
          unit_of_measurement: "mA"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_current_summation_of_the_3_phases_brut
          unit_of_measurement: "mA"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_leakage_current
          unit_of_measurement: "A"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_energy_consumption_phase_A
          unit_of_measurement: "kWh"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_energy_consumption_phase_B
          unit_of_measurement: "kWh"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_energy_consumption_phase_C
          unit_of_measurement: "kWh"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_reactive_energy_consumption_phase_A
          unit_of_measurement: "W"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_reactive_energy_consumption_phase_B
          unit_of_measurement: "W"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_reactive_energy_consumption_phase_C
          unit_of_measurement: "W"
          device_class: energy
          state_class: total_increasing
          state: 0
        - name: owon_reactive_energy_summation_of_the_3_phases
          unit_of_measurement: "W"
          device_class: energy
          state_class: total_increasing
          state: 0
"""
""" TO HAVE ENTIIES WELL FOMATTED, IT IS NEEDED TO CREATE FOLLOWING SENSORS """
"""
  - platform: template
    sensors:
      owon_voltage_phase_a:
        unit_of_measurement: 'V'
        value_template: "{{ (states('sensor.owon_voltage_phase_a_brut') | int / 10 | round(1)) }}"
        device_class: energy
      owon_voltage_phase_b:
        unit_of_measurement: 'V'
        value_template: "{{ (states('sensor.owon_voltage_phase_b_brut') | int / 10 | round(1)) }}"
        device_class: energy
      owon_voltage_phase_c:
        unit_of_measurement: 'V'
        value_template: "{{ (states('sensor.owon_voltage_phase_c_brut') | int / 10 | round(1)) }}"
        device_class: energy
      owon_current_phase_a:
        unit_of_measurement: 'A'
        value_template: "{{ (states('sensor.owon_current_phase_a_brut') | int / 1000 | round(1)) }}"
        device_class: energy
      owon_current_phase_b:
        unit_of_measurement: A
        value_template: "{{ (states('sensor.owon_current_phase_b_brut') | int / 1000 | round(1)) }}"
        device_class: energy
      owon_current_phase_c:
        unit_of_measurement: 'A'
        value_template: "{{ (states('sensor.owon_current_phase_c_brut') | int / 1000 | round(1)) }}"
        device_class: energy
"""




""" TO UPDATE THESE SENSORS AUTOMATICALLY                                  """
""" CREATE A NEW AUTOMATION AND COPY THE FOLLOWING. UPDATE IS EVERY MINUTE """

"""
alias: Owon PC321
description: Lecture Owon PC321 every minute
trigger:
  - platform: time_pattern
    hours: "*"
    minutes: /1
    seconds: "0"
condition: []
action:
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      state_id: sensor.owon_power_phase_A
      allow_create: false
      attribute: 8192
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 8193
      state_id: sensor.owon_power_phase_B
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 8194
      state_id: sensor.owon_power_phase_C
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 8448
      state_id: sensor.owon_reactive_power_phase_A
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 8449
      state_id: sensor.owon_reactive_power_phase_B
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 8450
      state_id: sensor.owon_reactive_power_phase_C
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 8451
      state_id: sensor.owon_reactive_power_summation_of_the_3_phases
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 12288
      state_id: sensor.owon_voltage_phase_A_brut
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 12289
      state_id: sensor.owon_voltage_phase_B_brut
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 12290
      state_id: sensor.owon_voltage_phase_C_brut
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 12544
      state_id: sensor.owon_current_phase_A_brut
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 12545
      state_id: sensor.owon_current_phase_B_brut
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 12546
      state_id: sensor.owon_current_phase_C_brut
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 12547
      state_id: sensor.owon_current_summation_of_the_3_phases_brut
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 12549
      state_id: sensor.owon_leakage_current
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 16384
      state_id: sensor.owon_energy_consumption_phase_A
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 16385
      state_id: sensor.owon_energy_consumption_phase_B
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 16386
      state_id: sensor.owon_energy_consumption_phase_C
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 16640
      state_id: sensor.owon_reactive_energy_consumption_phase_A
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 16641
      state_id: sensor.owon_reactive_energy_consumption_phase_B
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 16642
      state_id: sensor.owon_reactive_energy_consumption_phase_C
      allow_create: false
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 3c:6a:2c:ff:fe:d2:ef:73
      cluster: 1794
      attribute: 16643
      state_id: sensor.owon_reactive_energy_summation_of_the_3_phases
      allow_create: false
mode: single

"""
1 Like