question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Aqara plug (lumi.plug.maeu01) generates errors post-2022.2

See original GitHub issue

Describe the bug I use this plug with HA 2022.2.3, where it’s been updated to use the quirk for lumi.plug.mmeu01 after this pull.

There are errors popping up in the log after this update.

Logger: homeassistant.util.logging
Source: util/logging.py:105
First occurred: 4:34:56 PM (16 occurrences)
Last logged: 4:55:26 PM

Exception in async_state_changed when dispatching 'LUMI lumi.plug.maeu01_54:ef:44:10:00:0e:52:9d_available_entity': () Traceback (most recent call last): 
 File  "/usr/src/homeassistant/homeassistant/components/zha/entity.py", line 107, in async_state_changed self.async_write_ha_state() 
 File  "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 530, in async_write_ha_state self._async_write_ha_state() 
 File  "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 563, in _async_write_ha_state state = self._stringify_state() 
 File  "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 536, in _stringify_state if (state := self.state) is None: 
 File  "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 371, in state value = self.native_value 
 File  "/usr/src/homeassistant/homeassistant/components/zha/sensor.py", line 175, in native_value return self.formatter(raw_state) 
 File  "/usr/src/homeassistant/homeassistant/components/zha/sensor.py", line 472, in formatter return self._channel.summa_formatter(value) 
 File  "/usr/src/homeassistant/homeassistant/components/zha/core/channels/smartenergy.py", line 196, in _formatter_function return self._summa_format.format(value).lstrip() AttributeError: 'NoneType' object has no attribute 'format'

To Reproduce Steps to reproduce the behavior: unknown

Additional context

{
  "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": "0x0051",
      "in_clusters": [
        "0x0000",
        "0x0002",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x0009",
        "0x0702",
        "0x0b04"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "21": {
      "profile_id": 260,
      "device_type": "0x0009",
      "in_clusters": [
        "0x000c"
      ],
      "out_clusters": [
        "0x0004",
        "0x000c"
      ]
    },
    "242": {
      "profile_id": 41440,
      "device_type": "0x0061",
      "in_clusters": [],
      "out_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "LUMI",
  "model": "lumi.plug.maeu01",
  "class": "zhaquirks.xiaomi.aqara.plug_mmeu01.Plug"
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:165 (9 by maintainers)

github_iconTop GitHub Comments

7reactions
dmulcaheycommented, Apr 22, 2022

Great now we know what the issue is. Xiaomi devices are such a pain in the ass!

3reactions
husjoncommented, Apr 21, 2022

Summation is working as expected.

Happy to help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Aqara Plug (SP-EUC01 / lumi.plug.maeu01) not updating
The plug can be turned on or off from HA (so it's communicating), but no state updates are received / processed by HA....
Read more >
Hub M2 - Aqara
Aqara Hub M2 helps you more conveniently control plug, lights, curtain, air conditioner, fan, etc. For more details about the sub-devices that are...
Read more >
Message d'erreur erroné dans les logs deconz
voici la santé de mon jeedom, ainsi que les logs de http.error ... 'manufacturername': 'LUMI', 'modelid': 'lumi.plug.maeu01', 'name': 'Smart plug - Bureau', ...
Read more >
Can't get power monitoring on Aqara smart plug - Bug reports
I've got a aqara smart plug with energy monitoring, in theory. it shows up as plug.lumi.maus01 I'm using a conbee ii with deconz...
Read more >
How to Reset the Aqara Smart Plug - YouTube
If you find that your Aqara Smart Plug isn't responding for some reason, you may just need to perform a factory reset and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found