0.105: Safe mode, Headers & Footers, New Zones Editor, Garmin, Sighthound

I see this error returning in my logging:

> Error handling message: Unknown error
> Traceback (most recent call last):
>   File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 20, in _handle_async_response
>     await func(hass, connection, msg)
>   File "/usr/src/homeassistant/homeassistant/components/search/__init__.py", line 49, in websocket_search_related
>     msg["id"], searcher.async_search(msg["item_type"], msg["item_id"])
>   File "/usr/src/homeassistant/homeassistant/components/search/__init__.py", line 89, in async_search
>     getattr(self, f"_resolve_{search_type}")(search_id)
>   File "/usr/src/homeassistant/homeassistant/components/search/__init__.py", line 163, in _resolve_entity
>     for entity in automation.automations_with_entity(self.hass, entity_id):
>   File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 136, in automations_with_entity
>     if entity_id in automation_entity.referenced_entities:
>   File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 321, in referenced_entities
>     for entity_id in _trigger_extract_entities(conf):
>   File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 581, in _trigger_extract_entities
>     return [sun.ENTITY_ID]
> AttributeError: module 'homeassistant.components.automation.sun' has no attribute 'ENTITY_ID'

Any idea what might be wrong?

That’s… weird. Can you open an issue and tag me. It should not behave like this, we import the sun at the top of the file from components module.

That’s great to know! I’m excited for this :smiley:

+1 It’s a shame states is going to be removed, I’d rather it just gets depreciated. It’s not like HA doesn’t already use quite a bit of space with it’s 1000+ included components! :smiley:

I suggest the tileboard UI, it’s a bit fiddly to set up but works far better than both ‘states’ or ‘lovelace’ UI for me on older devices. :slight_smile:

Thank you @balloob, issue has been created:

https://github.com/home-assistant/home-assistant/issues/31511

I had that error as well, sudo apt-get install libudev-dev fixed it. Found the fix in this thread.

Is there documentation on the correct way to deploy this? I have it seemingly working (post above), but have an error in the frontend which I would like to correct.

Expected a value of type `{entity,name,icon} | entity-id` for `entities.0.state_color` but received `true`.

I can not seem to find any reference to it on the blog post other than what I have quoted. Am I missing something?

I’ve checked the Lovelace changelog HERE, and there is no config listed, and also the entities card page HERE, again, nothing mentioned about state_color.

2 Likes

Did you read the docs @balloob pointed you to? It tells you how to create a group and it is NOT via the gui.

Deprecated would mean they still have to support it. Removing it doesn’t

Plus I think there is a lovelace card out there that can add all entities if I am not mistaken

1 Like

I guess removing states UI is best in the long run, and I’m glad I’ve got a version or two to fix my config before states is gone!

Yes sir, I ultimately found the answer on discord. Two different Raspis that no longer had libudev-dev installed. Glad it worked out. Thanks

FYI zwave users, if you’re running on a Pi it’s going to take a minute for openzwave to compile.

1 Like

would like to know how to add state_color as well

type: entities
state_color: true
entities:
...

where do I put that?

In your lovelace configuration for the card. If you’re using auto-generated UI, it is not an option to change.

@iantrich can you confirm is this is correct as a per entity entry?

Expected a value of type undefined for state_color but received true.

is this normal for it to respond like that?

yes, that is correct or you can apply it to the full card

the UI editor does not support that configuration yet. It will default to yaml mode if added. I’ll get that sorted in an upcoming release