2023.4: Custom template macros, and many more new entity dialogs!

After update, Simplisafe integration isnā€™t working

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/simplisafe/__init__.py", line 357, in async_setup_entry
    api = await API.async_from_refresh_token(
  File "/usr/local/lib/python3.10/site-packages/simplipy/api.py", line 154, in async_from_refresh_token
    await api.async_refresh_access_token()
  File "/usr/local/lib/python3.10/site-packages/simplipy/api.py", line 406, in async_refresh_access_token
    self._save_token_data_from_response(token_data)
  File "/usr/local/lib/python3.10/site-packages/simplipy/api.py", line 258, in _save_token_data_from_response
    self.refresh_token = token_data["refresh_token"]
KeyError: 'refresh_token'

And it isnā€™t prompting for a new auth code either.

Also wake on lan switches arenā€™t getting registered now and they have the following message:

This entity is no longer being provided by the wake_on_lan integration. If the entity is no longer in use, delete it in settings.
1 Like

I have a python script running as a command_line sensor, and import modules are now failing.

For example:

Traceback (most recent call last):
  File "/config/scripts/rubbish_day.py", line 34, in <module>
    import requests
ModuleNotFoundError: no module named 'requests'

I upgraded a couple of hours ago, the warning about the database upgrade has long since gone away, but my database is still churning like crazy.

These top process are all from my Home assistant container stack.

Is this normal? Itā€™s not like Iā€™m running on a raspberry Pi here either. I expected this to have calmed down by now.

It depends on the size of your database and hardware.

You can find the estimated size under Settings ā†’ System ā†’ Repairs ā†’ ā€¦ (upper right hand corner) ā†’ System Information ā†’ Recorder

Stats from an ODROID N2+ with EMMC

~ 1GiB with sqlite ~ 6 minutes
~ 12 GiB with sqlite ~ 17 minutes
~ 1GiB with MariaDB ~21 minutes
~ 4 GiB with MariaDB ~48 minutes
~ 80 GiB with MariaDB ~8 hours

Check your https://dev.mysql.com/doc/refman/8.0/en/show-processlist.html

2 Likes

It looks like your dnspython version is out of date

pip install --upgrade dnspython==2.3.0

My vision of a more info dialog :woman_shrugging: to each their own I guessā€¦

I still donā€™t have a clue where the information for setting custom more info dialogs went. Pretty sure once upon a time it was set in the customize yaml and all defined entities would use that custom more info dialog. If gone, I think it should be bought back.

Anyways, another update, another wrestling match. Challenge Accepted.

EDIT: On a positive note, I love the backend stuff when it comes to QOL changes, most notably jinja macros. I love anything that goes towards dynamic coding.

19 Likes

I used to have a number of entities generated using curl commands. After upgrading to 2023.4.0, I can see none of them seem to work. It does not give me any error either.

Is anyone else facing the same issue?

I donā€™t have any repairs available, but all the processes are during on all cylinders.

I couldnā€™t take the suspense anymore so I restarted my home assistant container. Now that Iā€™ve restarted I have a ā€œrunc initā€ process taking up a constant 60-70% of one core. Iā€™ve never seen that before

That never existed in core. Custom only.

Yes it is frustrating that custom card developers do not keep up and fix their cards. It happens release after release. Goddamn slackers.

3 Likes

there is a regression in command line sensors and also a quick fix suggested:

the fix works for me (command line sensor states are generated again and not unknown) but the PR was rejected (or rather a completly different implementation was suggested).

i worked around this by copying homeassistant/components/command_line to custom_components and changing line 141 in sensor.py as suggested until there is a fix.

Thanks for the reply-- but in what context? I am running HA in docker-composeā€¦ Wouldnā€™t this just be included in the image?

Yes it should be, but you might have a custom component that is pinning it to an older version

15 posts were split to a new topic: Yaml Custom UI tangent

Ah ok. Any idea what I might look for to identify the offending custom component? Iā€™m a Java developer-- my python-foo is weak :confused:

It seems like itā€™s consistently ā€œmigrating states context_idsā€ and ā€œmigrating entity_idsā€

Is this behaviour to be expected in a normal database upgrade?

app_1  | 2023-04-05 22:24:14.475 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: StatesContextIDMigrationTask()
app_1  | 2023-04-05 22:24:14.475 DEBUG (Recorder) [homeassistant.components.recorder.migration] Migrating states context_ids to binary format
app_1  | 2023-04-05 22:24:14.922 DEBUG (Recorder) [homeassistant.components.recorder.migration] Migrating states context_ids to binary format: done=False
app_1  | 2023-04-05 22:24:14.922 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EntityIDMigrationTask()
app_1  | 2023-04-05 22:24:14.923 DEBUG (Recorder) [homeassistant.components.recorder.migration] Migrating entity_ids
app_1  | 2023-04-05 22:24:15.383 DEBUG (Recorder) [homeassistant.components.recorder.migration] Migrating entity_ids done=False
app_1  | 2023-04-05 22:24:15.383 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: StatesContextIDMigrationTask()
app_1  | 2023-04-05 22:24:15.383 DEBUG (Recorder) [homeassistant.components.recorder.migration] Migrating states context_ids to binary format
app_1  | 2023-04-05 22:24:15.800 DEBUG (Recorder) [homeassistant.components.recorder.migration] Migrating states context_ids to binary format: done=False
app_1  | 2023-04-05 22:24:15.801 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EntityIDMigrationTask()
app_1  | 2023-04-05 22:24:15.801 DEBUG (Recorder) [homeassistant.components.recorder.migration] Migrating entity_ids

Yes its doing them in batches to avoid overloading the system. Its slower but it allows for online migration. I expect you have a very large database (or slow disk). Iā€™d let it run overnight and check it in the morning.

1 Like

Tile card feature development is agonizingly slow. The front end needs to mature way faster in general. The fact that I need custom button card and card mod for most UI tweaks is crazy. Why canā€™t I have a tile card that slides vertically? The popup UI has it, so wth? Why canā€™t I just not have an icon in tile card? Why canā€™t I change the width of sliders with a simple parameter change vs card mod? Why canā€™t I justā€¦use the slider UI without all the extras, for that matter?

2 Likes

So all in all, how to hide top bar on both web and Android companion app? I used to use minimalist-mobile theme, but today it broke, which is even worse for my LG clock 2 devices, where top bar eats 20% of space.

Looks like no one of HA devs uses any mods at all.

Yeah, my database is about 11Gb. Since the migration notification went away, I thought I could have expected that it would be completely finished. I guess Iā€™ll just wait and see.