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.

TypeError: async_update_entity() got an unexpected keyword argument 'device_id'

See original GitHub issue

I’m getting following errors on HA startup for all of the sensors based on entities (lights, media_player with fixed mode). A sensor based on daily_fixed_energy isn’t throwing it. It’s happening for sensors I’m grouping and not. HA version: 2021.12.0 power calculation version: 0.18.3

sensor:
  - platform: powercalc
    manufacturer: ikea
    model: LED1537R6
    entities:
      - entity_id: light.l10
      ...
  - platform: powercalc
    entity_id: media_player.tv
    standby_power: 18.6
    fixed:
      states_power:
        playing: 169
  - platform: powercalc
    name: fridge_energy
    daily_fixed_energy:
      value: 0.73

2022-02-22 22:26:55 DEBUG (MainThread) [custom_components.powercalc.sensor] Binding sensor.l10_power to device ebexxxxxxxxxxxxxxxxxxxxxxxx0
2022-02-22 22:26:55 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback create_individual_sensors.<locals>.<lambda>(<Event homeas...nt_started[L]>) at /config/custom_components/powercalc/sensor.py:438
Traceback (most recent call last):
File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/core.py", line 835, in _onetime_listener
self._hass.async_run_job(listener, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 452, in async_run_job
return self.async_run_hass_job(HassJob(target), *args)
File "/usr/src/homeassistant/homeassistant/core.py", line 433, in async_run_hass_job
hassjob.target(*args)
File "/config/custom_components/powercalc/sensor.py", line 438, in <lambda>
lambda _: bind_entities_to_devices(
File "/config/custom_components/powercalc/sensor.py", line 525, in bind_entities_to_devices
ent_reg.async_update_entity(entity.entity_id, device_id=device_id)
TypeError: async_update_entity() got an unexpected keyword argument 'device_id'

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
nikadaikacommented, Mar 21, 2022

Thanks, @bramstroker. I decided to update HA to the most recent version and deal with the breaking changes. It fixed the problem like you predicted.

0reactions
bramstrokercommented, Mar 25, 2022

@nikadaika that’s great. Just released v0.19.0 which also contains this fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: cuda() got an unexpected keyword argument ...
Hi,when I run the command sh ./train_minirts.sh --gpu 0,I got this problem. `Warning: argument ValueMatcher/grad_clip_norm cannot be added.
Read more >
view.py got an unexpected keyword argument topic_id #p
I'm trying to fix this view keep getting this error message, ''' Exception Type: TypeError Exception Value:
Read more >
TypeError: __init__() got an unexpected keyword argument ...
Hi, I have followed the steps given in the chapter to set up mflix app. ... TypeError: init() got an unexpected keyword argument...
Read more >
TypeError: Field.__init__() got an unexpected keyword ...
Dijango series part 1 section 3 (building a data model) after adding store & tags apps , if i tried to create a...
Read more >
TypeError: copy() got an unexpected keyword argument 'deep'
currently we have 2 prediction model and we setup the prediction model in the next recipe # setup efficiency function efficiency = lambda...
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