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] assert self.hass is not None after upgrading to HA 0.112.0

See original GitHub issue

Environment

  • ShellyForHASS release with the issue: 0.1.8
  • Last working ShellyForHASS release (if known): It worked great with ShellyForHASS 0.1.8 and Home assistant 0.111.x
  • Home Assistant Core release with the issue: 0.112.0
  • Operating environment (Home Assistant/Supervised/Docker/venv): Home Assistant running on rPi

Describe the bug

Something seems to have changed in HA 0.112.0 regarding the hass object. I get this error below in the Shelly component.

Steps to Reproduce

Upgrade to HA 0.112.0 and start Home Assistant.

Expected behavior

Screenshots

Traceback/Error logs

2020-07-02 13:17:53 ERROR (Thread-261) [pyShelly] Error update device status: 5A3890 SHRGBW2, , Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyShelly/block.py", line 132, in update_status_information
    dev.update_status_information(status)
  File "/usr/local/lib/python3.7/site-packages/pyShelly/powermeter.py", line 96, in update_status_information
    self._update(self.state, info_values=self.info_values)
  File "/usr/local/lib/python3.7/site-packages/pyShelly/device.py", line 115, in _update
    self.raise_updated()
  File "/usr/local/lib/python3.7/site-packages/pyShelly/device.py", line 125, in raise_updated
    callback(self)
  File "/config/custom_components/shelly/device.py", line 53, in _updated
    self.schedule_update_ha_state(True)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 416, in schedule_update_ha_state
    assert self.hass is not None
AssertionError

Additional context

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:25 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
chemelli74commented, Aug 13, 2020

Is this expected to be fixed with the new release with CoAP protocol update and shelly 1.8 firmware?

Nothing related to protocol or firmware. Plugin needs to be updated to follow HA best practice to create entity interfaces.

Simone

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bountysource
[BUG] assert self.hass is not None after upgrading to HA 0.112.0. ... Help and Information. Frequently Asked Questions · Bugs and Feature Requests...
Read more >
python - assert self.selection is not None, "Field %s without ...
It throws an error of (assert self.selection is not None, "Field %s without selection" % self) (AssertionError: Field ...
Read more >
Dr. Warren E. Farb Part II - Dr. Do - Institute of Public Utilities
This report was prepared for The National Regulatory Research. Institute (NRRI) under contract No. EC-77-C-Ol-8683 with the U.s..
Read more >
Full text of "Financial Times , 1996, UK, English"
Mr Hezschel Post, chief execu- tive, said the bank was not try- ing to weed ... shelved all Investment plans in pastern Ger-...
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