**Is your feature request related to a problem? Please describe.**
I can not ca…pture any used energy measurements in my home assistant instance's history due to missing energy reporting. I also miss the feature to be able to get the device temperature, set the power outage memory setting, turn the indicator led on and off on the device, and set the operation mode to coupled/decoupled.
**Describe the solution you'd like**
An added attribute publishing the _sum of consumed energy_ (kWh) as well as an _instantaneous power measurement_. Moreover, a _device temperature_ report, being able to set the _power outage memory_, enable/disable the _indicator led_, and choosing the _operation mode._
<details>
<summary>Device signature</summary>
```yaml
{
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=11264, maximum_outgoing_transfer_size=100, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0x0000",
"in_clusters": [
"0x0000",
"0x0002",
"0x0003",
"0x0004",
"0x0005",
"0x0006",
"0x0009",
"0x0012",
"0x0702",
"0xfcc0"
],
"out_clusters": [
"0x000a",
"0x0019"
]
},
"2": {
"profile_id": 260,
"device_type": "0x0000",
"in_clusters": [
"0x0000",
"0x0003",
"0x0004",
"0x0005",
"0x0006",
"0x0012",
"0xfcc0"
],
"out_clusters": []
},
"21": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x000c"
],
"out_clusters": []
},
"31": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x000c"
],
"out_clusters": []
},
"41": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x0012"
],
"out_clusters": []
},
"42": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x0012"
],
"out_clusters": []
},
"51": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x0012"
],
"out_clusters": []
},
"61": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x0012"
],
"out_clusters": []
},
"242": {
"profile_id": 41440,
"device_type": "0x0061",
"in_clusters": [],
"out_clusters": [
"0x0021"
]
}
},
"manufacturer": "LUMI",
"model": "lumi.switch.n2aeu1",
"class": "zhaquirks.xiaomi.aqara.opple_switch.XiaomiOpple2ButtonSwitchFace2"
}
```
</details>
<details>
<summary>Diagnostic information</summary>
```yaml
{
"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2023.3.1",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.10.10",
"docker": true,
"arch": "x86_64",
"timezone": "Europe/Stockholm",
"os_name": "Linux",
"os_version": "5.15.90",
"supervisor": "2023.01.1",
"host_os": "Home Assistant OS 9.5",
"docker_version": "20.10.22",
"chassis": "vm",
"run_as_root": true
},
"custom_components": {
"pyscript": {
"version": "1.3.3",
"requirements": [
"croniter==1.3.4",
"watchdog==2.1.6"
]
},
"spotcast": {
"version": "v3.6.30",
"requirements": []
},
"reversotts": {
"version": "1.0.2",
"requirements": [
"pyttsreverso==0.4"
]
},
"hacs": {
"version": "1.31.0",
"requirements": [
"aiogithubapi>=22.10.1"
]
},
"nodered": {
"version": "1.1.3",
"requirements": []
}
},
"integration_manifest": {
"domain": "zha",
"name": "Zigbee Home Automation",
"after_dependencies": [
"onboarding",
"usb"
],
"codeowners": [
"@dmulcahey",
"@adminiuga",
"@puddly"
],
"config_flow": true,
"dependencies": [
"file_upload"
],
"documentation": "https://www.home-assistant.io/integrations/zha",
"iot_class": "local_polling",
"loggers": [
"aiosqlite",
"bellows",
"crccheck",
"pure_pcapy3",
"zhaquirks",
"zigpy",
"zigpy_deconz",
"zigpy_xbee",
"zigpy_zigate",
"zigpy_znp"
],
"requirements": [
"bellows==0.34.9",
"pyserial==3.5",
"pyserial-asyncio==0.6",
"zha-quirks==0.0.93",
"zigpy-deconz==0.19.2",
"zigpy==0.53.2",
"zigpy-xbee==0.16.2",
"zigpy-zigate==0.10.3",
"zigpy-znp==0.9.3"
],
"usb": [
{
"vid": "10C4",
"pid": "EA60",
"description": "*2652*",
"known_devices": [
"slae.sh cc2652rb stick"
]
},
{
"vid": "1A86",
"pid": "55D4",
"description": "*sonoff*plus*",
"known_devices": [
"sonoff zigbee dongle plus v2"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*sonoff*plus*",
"known_devices": [
"sonoff zigbee dongle plus"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*tubeszb*",
"known_devices": [
"TubesZB Coordinator"
]
},
{
"vid": "1A86",
"pid": "7523",
"description": "*tubeszb*",
"known_devices": [
"TubesZB Coordinator"
]
},
{
"vid": "1A86",
"pid": "7523",
"description": "*zigstar*",
"known_devices": [
"ZigStar Coordinators"
]
},
{
"vid": "1CF1",
"pid": "0030",
"description": "*conbee*",
"known_devices": [
"Conbee II"
]
},
{
"vid": "10C4",
"pid": "8A2A",
"description": "*zigbee*",
"known_devices": [
"Nortek HUSBZB-1"
]
},
{
"vid": "0403",
"pid": "6015",
"description": "*zigate*",
"known_devices": [
"ZiGate+"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*zigate*",
"known_devices": [
"ZiGate"
]
},
{
"vid": "10C4",
"pid": "8B34",
"description": "*bv 2010/10*",
"known_devices": [
"Bitron Video AV2010/10"
]
}
],
"zeroconf": [
{
"type": "_esphomelib._tcp.local.",
"name": "tube*"
},
{
"type": "_zigate-zigbee-gateway._tcp.local.",
"name": "*zigate*"
},
{
"type": "_zigstar_gw._tcp.local.",
"name": "*zigstar*"
},
{
"type": "_slzb-06._tcp.local.",
"name": "slzb-06*"
}
],
"is_built_in": true
},
"data": {
"ieee": "**REDACTED**",
"nwk": 38020,
"manufacturer": "LUMI",
"model": "lumi.switch.n2aeu1",
"name": "LUMI lumi.switch.n2aeu1",
"quirk_applied": true,
"quirk_class": "zhaquirks.xiaomi.aqara.opple_switch.XiaomiOpple2ButtonSwitchFace2",
"manufacturer_code": 4447,
"power_source": "Mains",
"lqi": 255,
"rssi": -52,
"last_seen": "2023-03-03T20:31:21",
"available": true,
"device_type": "Router",
"signature": {
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=11264, maximum_outgoing_transfer_size=100, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0x0000",
"in_clusters": [
"0x0000",
"0x0002",
"0x0003",
"0x0004",
"0x0005",
"0x0006",
"0x0009",
"0x0012",
"0x0702",
"0xfcc0"
],
"out_clusters": [
"0x000a",
"0x0019"
]
},
"2": {
"profile_id": 260,
"device_type": "0x0000",
"in_clusters": [
"0x0000",
"0x0003",
"0x0004",
"0x0005",
"0x0006",
"0x0012",
"0xfcc0"
],
"out_clusters": []
},
"21": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x000c"
],
"out_clusters": []
},
"31": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x000c"
],
"out_clusters": []
},
"41": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x0012"
],
"out_clusters": []
},
"42": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x0012"
],
"out_clusters": []
},
"51": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x0012"
],
"out_clusters": []
},
"61": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x0012"
],
"out_clusters": []
},
"242": {
"profile_id": 41440,
"device_type": "0x0061",
"in_clusters": [],
"out_clusters": [
"0x0021"
]
}
}
},
"active_coordinator": false,
"entities": [
{
"entity_id": "button.lumi_lumi_switch_n2aeu1_identify_2",
"name": "LUMI lumi.switch.n2aeu1"
},
{
"entity_id": "switch.lumi_lumi_switch_n2aeu1_switch_3",
"name": "LUMI lumi.switch.n2aeu1"
},
{
"entity_id": "switch.lumi_lumi_switch_n2aeu1_switch_4",
"name": "LUMI lumi.switch.n2aeu1"
}
],
"neighbors": [
{
"device_type": "Coordinator",
"rx_on_when_idle": "On",
"relationship": "Parent",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x0000",
"permit_joining": "Unknown",
"depth": "0",
"lqi": "114"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xDCC0",
"permit_joining": "Unknown",
"depth": "1",
"lqi": "125"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xF263",
"permit_joining": "Unknown",
"depth": "1",
"lqi": "111"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xAB74",
"permit_joining": "Unknown",
"depth": "1",
"lqi": "71"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xE61F",
"permit_joining": "Unknown",
"depth": "1",
"lqi": "73"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x3683",
"permit_joining": "Unknown",
"depth": "1",
"lqi": "93"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xD265",
"permit_joining": "Unknown",
"depth": "1",
"lqi": "94"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xE117",
"permit_joining": "Unknown",
"depth": "1",
"lqi": "94"
}
],
"routes": [
{
"dest_nwk": "0x0000",
"route_status": "Validation_Underway",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0x0000"
},
{
"dest_nwk": "0xF263",
"route_status": "Active",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0xF263"
},
{
"dest_nwk": "0xAB74",
"route_status": "Discovery_Underway",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0xFFFE"
},
{
"dest_nwk": "0xE61F",
"route_status": "Active",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0xE61F"
},
{
"dest_nwk": "0xBC9A",
"route_status": "Discovery_Underway",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0xFFFE"
},
{
"dest_nwk": "0x3683",
"route_status": "Discovery_Underway",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0xFFFE"
},
{
"dest_nwk": "0xE117",
"route_status": "Validation_Underway",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0xE117"
},
{
"dest_nwk": "0xD265",
"route_status": "Active",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0xD265"
},
{
"dest_nwk": "0xDCC0",
"route_status": "Discovery_Underway",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0xFFFE"
}
],
"endpoint_names": [
{
"name": "ON_OFF_SWITCH"
},
{
"name": "ON_OFF_SWITCH"
},
{
"name": "ON_OFF_LIGHT"
},
{
"name": "ON_OFF_LIGHT"
},
{
"name": "ON_OFF_LIGHT"
},
{
"name": "ON_OFF_LIGHT"
},
{
"name": "ON_OFF_LIGHT"
},
{
"name": "ON_OFF_LIGHT"
},
{
"name": "unknown 97 device_type of 0xa1e0 profile id"
}
],
"user_given_name": null,
"device_reg_id": "8ed3bc9d22587e221a4c605666085ea0",
"area_id": null,
"cluster_details": {
"1": {
"device_type": {
"name": "ON_OFF_SWITCH",
"id": 0
},
"profile_id": 260,
"in_clusters": {
"0x0000": {
"endpoint_attribute": "basic",
"attributes": {
"0x0006": {
"attribute_name": "date_code",
"value": "01-29-2021"
}
},
"unsupported_attributes": {}
},
"0x0002": {
"endpoint_attribute": "device_temperature",
"attributes": {},
"unsupported_attributes": {}
},
"0x0003": {
"endpoint_attribute": "identify",
"attributes": {},
"unsupported_attributes": {}
},
"0x0004": {
"endpoint_attribute": "groups",
"attributes": {},
"unsupported_attributes": {}
},
"0x0005": {
"endpoint_attribute": "scenes",
"attributes": {},
"unsupported_attributes": {}
},
"0x0006": {
"endpoint_attribute": "on_off",
"attributes": {
"0x0000": {
"attribute_name": "on_off",
"value": 0
}
},
"unsupported_attributes": {
"0x4003": {
"attribute_name": "start_up_on_off"
}
}
},
"0x0009": {
"endpoint_attribute": "alarms",
"attributes": {},
"unsupported_attributes": {}
},
"0x0012": {
"endpoint_attribute": "multistate_input",
"attributes": {},
"unsupported_attributes": {}
},
"0x0702": {
"endpoint_attribute": "smartenergy_metering",
"attributes": {},
"unsupported_attributes": {
"0x0300": {
"attribute_name": "unit_of_measure"
},
"0x0301": {
"attribute_name": "multiplier"
},
"0x0302": {
"attribute_name": "divisor"
},
"0x0303": {
"attribute_name": "summation_formatting"
},
"0x0304": {
"attribute_name": "demand_formatting"
},
"0x0306": {
"attribute_name": "metering_device_type"
}
}
},
"0xfcc0": {
"endpoint_attribute": "opple_cluster",
"attributes": {},
"unsupported_attributes": {}
}
},
"out_clusters": {
"0x000a": {
"endpoint_attribute": "time",
"attributes": {},
"unsupported_attributes": {}
},
"0x0019": {
"endpoint_attribute": "ota",
"attributes": {},
"unsupported_attributes": {}
}
}
},
"2": {
"device_type": {
"name": "ON_OFF_SWITCH",
"id": 0
},
"profile_id": 260,
"in_clusters": {
"0x0000": {
"endpoint_attribute": "basic",
"attributes": {},
"unsupported_attributes": {}
},
"0x0003": {
"endpoint_attribute": "identify",
"attributes": {},
"unsupported_attributes": {}
},
"0x0004": {
"endpoint_attribute": "groups",
"attributes": {},
"unsupported_attributes": {}
},
"0x0005": {
"endpoint_attribute": "scenes",
"attributes": {},
"unsupported_attributes": {}
},
"0x0006": {
"endpoint_attribute": "on_off",
"attributes": {
"0x0000": {
"attribute_name": "on_off",
"value": 0
}
},
"unsupported_attributes": {
"0x4003": {
"attribute_name": "start_up_on_off"
}
}
},
"0x0012": {
"endpoint_attribute": "multistate_input",
"attributes": {},
"unsupported_attributes": {}
},
"0xfcc0": {
"endpoint_attribute": "opple_cluster",
"attributes": {
"0x0009": {
"attribute_name": "mode",
"value": 1
}
},
"unsupported_attributes": {}
}
},
"out_clusters": {}
},
"21": {
"device_type": {
"name": "ON_OFF_LIGHT",
"id": 256
},
"profile_id": 260,
"in_clusters": {
"0x000c": {
"endpoint_attribute": "analog_input",
"attributes": {},
"unsupported_attributes": {}
}
},
"out_clusters": {}
},
"31": {
"device_type": {
"name": "ON_OFF_LIGHT",
"id": 256
},
"profile_id": 260,
"in_clusters": {
"0x000c": {
"endpoint_attribute": "analog_input",
"attributes": {},
"unsupported_attributes": {}
}
},
"out_clusters": {}
},
"41": {
"device_type": {
"name": "ON_OFF_LIGHT",
"id": 256
},
"profile_id": 260,
"in_clusters": {
"0x0012": {
"endpoint_attribute": "multistate_input",
"attributes": {},
"unsupported_attributes": {}
}
},
"out_clusters": {}
},
"42": {
"device_type": {
"name": "ON_OFF_LIGHT",
"id": 256
},
"profile_id": 260,
"in_clusters": {
"0x0012": {
"endpoint_attribute": "multistate_input",
"attributes": {},
"unsupported_attributes": {}
}
},
"out_clusters": {}
},
"51": {
"device_type": {
"name": "ON_OFF_LIGHT",
"id": 256
},
"profile_id": 260,
"in_clusters": {
"0x0012": {
"endpoint_attribute": "multistate_input",
"attributes": {},
"unsupported_attributes": {}
}
},
"out_clusters": {}
},
"61": {
"device_type": {
"name": "ON_OFF_LIGHT",
"id": 256
},
"profile_id": 260,
"in_clusters": {
"0x0012": {
"endpoint_attribute": "multistate_input",
"attributes": {},
"unsupported_attributes": {}
}
},
"out_clusters": {}
},
"242": {
"device_type": {
"name": "unknown",
"id": 97
},
"profile_id": 41440,
"in_clusters": {},
"out_clusters": {
"0x0021": {
"endpoint_attribute": "green_power",
"attributes": {},
"unsupported_attributes": {}
}
}
}
}
}
}
```
</details>
<details>
<summary>Additional logs</summary>
```
Paste any additional debug logs here.
Don't remove the extra line breaks outside the ``` marks.
```
</details>
**Additional context**
Here is a screenshot of how it looks in ZHA right now. I am using the SkyConnect adapter.
![Screenshot from 2023-03-03 20-33-24](https://user-images.githubusercontent.com/30905949/222810778-5ab5fb48-891c-45a5-9952-496d4f201901.png)
Here is a screenshot of how the same switch looks inside Z2M and what attributes it exposes.
![Screenshot from 2023-03-03 20-34-26](https://user-images.githubusercontent.com/30905949/222810791-935996a1-1e35-45fc-99cf-91da96401299.png)