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

entity controller custom component injects invalid ulids into context objects #91249

Closed
digitalconverg opened this issue Apr 11, 2023 · 4 comments

Comments

@digitalconverg
Copy link

digitalconverg commented Apr 11, 2023

The problem

Shortly after upgrading to 2023.4.1 I noticed the log was full of the following errors.
Logger: homeassistant.components.recorder.models.context
Source: components/recorder/models/context.py:19
Integration: Recorder (documentation, issues)
First occurred: April 9, 2023 at 6:50:41 PM (133 occurrences)
Last logged: 4:29:35 PM

Error converting ulid ec_942a28_c3358c2c967db1328e9ca06d4e to bytes: ULID must be a 26 character string: ec_942a28_c3358c2c967db1328e9ca06d4e
Error converting ulid ec_942a28_cb92d2bbd75ed1797f3796e243 to bytes: ULID must be a 26 character string: ec_942a28_cb92d2bbd75ed1797f3796e243
Error converting ulid ec_942a28_2da6419fa91d627136104723fa to bytes: ULID must be a 26 character string: ec_942a28_2da6419fa91d627136104723fa
Error converting ulid ec_942a28_6ddbe1c58e036caf8b5394faa0 to bytes: ULID must be a 26 character string: ec_942a28_6ddbe1c58e036caf8b5394faa0
Error converting ulid ec_942a28_998f7b6dde3a125b19f6fe8c38 to bytes: ULID must be a 26 character string: ec_942a28_998f7b6dde3a125b19f6fe8c38
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/recorder/models/context.py", line 19, in ulid_to_bytes_or_none
return ulid_to_bytes(ulid)
File "src/ulid_transform/_ulid_impl.pyx", line 22, in ulid_transform._ulid_impl._ulid_to_bytes
ValueError: ULID must be a 26 character string: ec_942a28_a8efa180e6998bb1caefeaffb9

I do not have adaptive lighting integration installed as was reported in basnijholt/adaptive-lighting#493

What version of Home Assistant Core has the issue?

core-2023.4.2

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Recorder

Link to integration documentation on our website

https://www.home-assistant.io/integrations/recorder/

Diagnostics information

installation_type | Home Assistant OS dev | false hassio | true docker | true user | root virtualenv | false python_version | 3.10.10 os_name | Linux os_version | 5.15.84-v8 arch | aarch64

Example YAML snippet

recorder:
commit_interval: 30

Anything in the logs that might be useful for us?

2023-04-11 16:29:35.613 ERROR (Recorder) [homeassistant.components.recorder.models.context] Error converting ulid ec_942a28_998f7b6dde3a125b19f6fe8c38 to bytes: ULID must be a 26 character string: ec_942a28_998f7b6dde3a125b19f6fe8c38
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/recorder/models/context.py", line 19, in ulid_to_bytes_or_none
return ulid_to_bytes(ulid)
File "src/ulid_transform/_ulid_impl.pyx", line 22, in ulid_transform._ulid_impl._ulid_to_bytes
ValueError: ULID must be a 26 character string: ec_942a28_998f7b6dde3a125b19f6fe8c38

@bdraco
Copy link
Member

bdraco commented Apr 12, 2023

Do you have a custom component that might be using 'ec' as an abbreviation installed ?

@digitalconverg
Copy link
Author

Yes, Entity Controller https://github.com/danobot/entity-controller. Issue already logged with owner

@digitalconverg
Copy link
Author

Added exclusion for Recorder based on the entities for this component but the errors still occur

@bdraco
Copy link
Member

bdraco commented Apr 12, 2023

Please pursue the issue with the custom component. The change will need to be made there. The system isn't designed to have data injected in this manner.

danobot/entity-controller#297

@bdraco bdraco closed this as not planned Won't fix, can't repro, duplicate, stale Apr 12, 2023
@bdraco bdraco changed the title Recorder: Error converting ULID not related to Adaptive Lighting entity controller custom component injects invalid ulids into context objects Apr 12, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants