Help to write quirk for Tempiro smart fuse

Hi,

I have just bought a Tempiro smart fuse (Smart Fuse - Tempiro) to get the energy metering for a specific fuse. But I can only control the switch and the energy consumption does not update.
Is there anyone out there who could help me build a quirk for this or point me in the right direction?
I have tried to get help from ChatGPT, but it´s hard when I don´t really understand the concept.

I have started to write a quirk now and are getting some values for the energy metering. However, the values are way off. Can anyone send me in the right direction, do I need more information from Tempiro in order to get the metering to show correct values? Here is the code that I have so far.

from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import Basic, PowerConfiguration, Identify, Groups, OnOff, Ota
from zigpy.zcl.clusters.smartenergy import Metering

class TempiroSmartPlug(CustomDevice):
    """Custom device representing Tempiro smart plugs."""

    signature = {
        "models_info": [("Tem", "ZHA-SmartPlug")],
        "endpoints": {
            1: {
                "profile_id": 0x0104,
                "device_type": 0x0051,
                "input_clusters": [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    OnOff.cluster_id,
                    Metering.cluster_id
                ],
                "output_clusters": [
                    PowerConfiguration.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    OnOff.cluster_id,
                    Metering.cluster_id
                ]
            },
        },
    }

    replacement = {
        "endpoints": {
            1: {
                "profile_id": zha.PROFILE_ID,
                "device_type": zha.DeviceType.SMART_PLUG,
                "input_clusters": [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    OnOff.cluster_id,
                    Metering.cluster_id
                ],
                "output_clusters": [
                    PowerConfiguration.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    OnOff.cluster_id,
                    Metering.cluster_id
                ]
            },
        },
    }

Hi Henrik!
Can you please provide your code to get the Tempiro Smart Fuse to work with zigbee2mqtt. I have not been able to get it supported so I cant even control the on of function.

Hello,

Could you share your progress with this smart fuse?

I want to buy it too. And want to know what to expect.

BTW, quite expensive device. 990 SEK.

Thanks in advance!

Hello, did somebody figure it out? Thanks