Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All entities become state unknown when one or more entities are set to disabled #234

Closed
cbornemann opened this issue Jun 21, 2024 · 13 comments
Assignees
Labels
bug Something isn't working confirmed Issue is confirmed, root cause is known testing Fix available, waiting for feedback

Comments

@cbornemann
Copy link

cbornemann commented Jun 21, 2024

After install some entities of the mower becomes state unknown, when i rename the id of the state sensor or when i add the new lawn-mower-control via the configuration checkbox.

Installed Version: 5.7.0
HA-Version: 2024.6.3

Screenshot_20240621_193206_io homeassistant companion android

Error-log says:

Logger: homeassistant
Quelle: helpers/entity.py:965
Erstmals aufgetreten: 19:01:55 (10 Vorkommnisse)
Zuletzt protokolliert: 19:15:27

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/config/custom_components/indego/__init__.py", line 495, in _initial_update
    self.set_online_state(False)
  File "/config/custom_components/indego/__init__.py", line 658, in set_online_state
    self.entities[ENTITY_MOWER_STATE_DETAIL].set_cloud_connection_state(online)
  File "/config/custom_components/indego/mixins.py", line 83, in set_cloud_connection_state
    self.async_schedule_update_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1254, in async_schedule_update_ha_state
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 997, in async_write_ha_state
    self._async_verify_state_writable()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 965, in _async_verify_state_writable
    raise RuntimeError(f"Attribute hass is None for {self}")
RuntimeError: Attribute hass is None for <entity unknown.unknown=unknown>

Reinstallation of Indego gives error:

Logger: homeassistant.util.package
Quelle: util/package.py:55
Erstmals aufgetreten: 19:46:02 (2 Vorkommnisse)
Zuletzt protokolliert: 19:46:06

Invalid requirement 'git+https://github.com/jm-73/[email protected]'

For the moment, i go back to 5.6.1. Here are all entities working perfectly.

@kimzeuner
Copy link
Contributor

Not sure if it is the solution but maybe you can have at look at this issue from beta version #226

@cbornemann
Copy link
Author

Not working for me, i have try it.

@sander1988
Copy link
Owner

sander1988 commented Jun 22, 2024

The "invalid requirement" warning can be ignored. I have already checked it.

The runtime error causes the behavior you describe.

Can you explain what you mean with "renaming the id"?

@cbornemann
Copy link
Author

When i change the entity-id. But the problem occures randomly at one of the entities.

@sander1988
Copy link
Owner

The entity id of which entity? Please provide details, so I can try to do the exact same thing in my setup.

@cbornemann
Copy link
Author

cbornemann commented Jun 22, 2024

Now i have reinstalled the integration.

Then i have rename the entity-id´s, all works fine:

1

But when i reload now the integration, all entities become these states:

2

3

I don´t know, before update of 5.7.0 all works fine.

Is the problem, that i disable the entity "state detail" and some other that i don´t need?

@cbornemann
Copy link
Author

Okay the problem entities are: mower_state_detail and runtime_total.

When i disable one of these entities and reload the integration, the integration crashed.

@sander1988
Copy link
Owner

I guess disabling the entity is the problem here. Can you re-enable and restart HA?

@sander1988
Copy link
Owner

I have tested it. Caused by disabling one or more entities. It breaks updating the state update call.

Workaround: Do not disable entities; you can use the hide toggle for now.

@sander1988 sander1988 added the bug Something isn't working label Jun 22, 2024
@sander1988 sander1988 self-assigned this Jun 22, 2024
@cbornemann
Copy link
Author

Thank you, thats it!

@sander1988 sander1988 changed the title All entities become state unknown All entities become state unknown when one or more entities are set to disabled Jun 22, 2024
@sander1988
Copy link
Owner

Thank you for confirming! We try to fix this in the next release. But workaround should be ok for now.

@sander1988 sander1988 added the confirmed Issue is confirmed, root cause is known label Jun 22, 2024
sander1988 added a commit that referenced this issue Jun 30, 2024
sander1988 added a commit that referenced this issue Jun 30, 2024
@sander1988
Copy link
Owner

Please test with pre-release 5.7.1 to see if the issue has been resolved.

@sander1988 sander1988 added the testing Fix available, waiting for feedback label Jun 30, 2024
@cbornemann
Copy link
Author

Problem is fixed with 5.7.2! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed Issue is confirmed, root cause is known testing Fix available, waiting for feedback
Projects
None yet
Development

No branches or pull requests

3 participants