danobot / entity-controller

Home Assistant Entity and lighting controller for managing devices with timers, scripts, and sun-based time restrictions.
https://danobot.github.io/ec-docs/
GNU General Public License v3.0
289 stars 41 forks source link

UL Length incompatible with release 2023.4 #297

Closed robchandhok closed 1 year ago

robchandhok commented 1 year ago

Upon updating to 2023.4.0 (and .1 later) there are now a lot of these errors:

2023-04-08 11:50:33.049 ERROR (Recorder) [homeassistant.components.recorder.models.context] Error converting ulid ec_27d790_e4f2ce9dacca95da39232d3b6e to bytes: ULID must be a 26 character string: ec_27d790_e4f2ce9dacca95da39232d3b6e

It appears that CONTEXT_ID_CHARACTER_LIMIT is just incompatible, but I don't know enough about it to suggest the change.

See also where used:

https://github.com/danobot/entity-controller/blob/d2fd0a73c580f3ad8cc6d4498492c20b57678cc6/custom_components/entity_controller/__init__.py#L1562

See also this HA issue (closed) which resolved to the "adaptive lighting" custom component, not HA. https://github.com/home-assistant/core/issues/91019

digitalconverg commented 1 year ago

same issue reported as https://github.com/home-assistant/core/issues/91249

robchandhok commented 1 year ago

Correct. Since the recorder component won’t be changed, the custom component has to be updated.

digitalconverg commented 1 year ago

Changed the value in const.py from CONTEXT_ID_CHARACTER_LIMIT = 36 to 26 and it appears to have resolved the problem.

robchandhok commented 1 year ago

Seems right. Can you do a PR? but @danobot or someone will have to merge/release it.

ndbroadbent commented 1 year ago

I think this might be breaking some of my entity controller instances (but not all.) I might have to downgrade to 2023.3 until it's working again.


Sorry false alarm, it was something else. (I just moved to a new house and broke things!) In my case I'm using "packages" to organize my config into separate YAML files, and I had accidentally re-used the same top-level key, so one of my config hashes was getting overridden by a different one.

I did downgrade though. I SSH'd into my machine and ran: sudo ha core update --version 2023.3.6 So I'll still be following this issue and upgrade once it's working properly again without errors