core: Phoscon/deCONZ no longer getting current from Aqara smart plugs

The problem

There used to be two power entities for Aqara smart plugs, Power A and Power B. Now the Power A sensor no longer works, which I believe is the sensor for the total electric current.

What is version of Home Assistant Core has the issue?

core-2021.7.0b2

What was the last working version of Home Assistant Core?

core-2021.6.6

What type of installation are you running?

Home Assistant Core

Integration causing the issue

deCONZ

Link to integration documentation on our website

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2021-07-03 00:17:44 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/Users/homeassistant/homeassistant/lib/python3.9/site-packages/pydeconz/gateway.py", line 128, in session_handler
    self.event_handler(self.websocket.data)  # type: ignore
  File "/Users/homeassistant/homeassistant/lib/python3.9/site-packages/pydeconz/gateway.py", line 169, in event_handler
    device_class.process_raw({device_id: event})
  File "/Users/homeassistant/homeassistant/lib/python3.9/site-packages/pydeconz/api.py", line 40, in process_raw
    obj.update(raw_item)
  File "/Users/homeassistant/homeassistant/lib/python3.9/site-packages/pydeconz/api.py", line 126, in update
    async_signal_update()
  File "/Users/homeassistant/homeassistant/lib/python3.9/site-packages/homeassistant/components/deconz/sensor.py", line 166, in async_update_callback
    super().async_update_callback(force_update=force_update)
  File "/Users/homeassistant/homeassistant/lib/python3.9/site-packages/homeassistant/components/deconz/deconz_device.py", line 92, in async_update_callback
    self.async_write_ha_state()
  File "/Users/homeassistant/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 419, in async_write_ha_state
    self._async_write_ha_state()
  File "/Users/homeassistant/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 456, in _async_write_ha_state
    extra_state_attributes = self.extra_state_attributes
  File "/Users/homeassistant/homeassistant/lib/python3.9/site-packages/homeassistant/components/deconz/sensor.py", line 199, in extra_state_attributes
    attr[ATTR_CURRENT] = self._device.current
  File "/Users/homeassistant/homeassistant/lib/python3.9/site-packages/pydeconz/sensor.py", line 546, in current
    return self.raw["state"]["current"]

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 35 (11 by maintainers)

Most upvoted comments

I’m not sure how it would be an issue with anything other than Home Assistant. Going back to core-2021.6.6 fixes it. Going to core-2021.7.0b2 breaks it again.

Same here, version 2021.7.2 fixed the issue. Thank you !

I’m not sure where the code you needs starts and ends, but here are some blocks of code:

'22': {'config': {'on': True,
'reachable': True,
'temperature': 3500},
'ep': 1,
'etag': '66f1ceb4f98127c339624581ba5924bb',
'lastseen': '2021-07-07T19:29Z',
'manufacturername': 'LUMI',
'modelid': 'lumi.plug.maus01',
'name': 'Power 22',
'state': {'current': 0,
'lastupdated': '2021-07-07T19:29:45.032',
'power': -1,
'voltage': 0},
'swversion': '05-02-2018',
'type': 'ZHAPower',
'uniqueid': '00:15:8d:00:02:82:af:46-01-0b04'},
26': {'config': {'on': True,
'reachable': True,
'temperature': 3400},
'ep': 1,
'etag': '581db0add834b4ae0944bdaeb0d3b434',
'lastseen': '2021-07-07T19:30Z',
'manufacturername': 'LUMI',
'modelid': 'lumi.plug.maus01',
'name': 'Power 26',
'state': {'current': 0,
'lastupdated': '2021-07-07T19:27:38.545',
'power': -1,
'voltage': 0},
'swversion': '05-02-2018',
'type': 'ZHAPower',
'uniqueid': '00:15:8d:00:02:82:d3:56-01-0b04'},
'27': {'config': {'on': True,
'reachable': True,
'temperature': 3400},
'ep': 2,
'etag': '77ab6ddae6dd81469080ad62118d81b6',
'lastseen': '2021-07-07T19:30Z',
'manufacturername': 'LUMI',
'modelid': 'lumi.plug.maus01',
'name': 'Power 27',
'state': {'lastupdated': '2021-07-07T19:24:59.664',
'power': 1},
'swversion': '05-02-2018',
'type': 'ZHAPower',
'uniqueid': '00:15:8d:00:02:82:d3:56-02-000c'},