DNS settings not persistent

Hello,

I have issue with DNS on supervised HA install. For some reason after the latest updates to the latest 2022.5.3 my ESPHome device stopped working. Problem is that ESPHome can’t resolve local name of my device.
When I run ha dns info command I get this:
image
I was trying to edit dns.json, coredns.json but after command ha dns restart or reboot my changes are gone and files are reverted back. I also tried to manually add a record to hosts file at /usr/share/hassio/dns/ but again after the reboot this file was reverted. Finally I found that if I add a record to the hosts file in hassio_dns docker container then it works, but again after reboot/restart changes are gone. I do not understand why those file are reverted back after reboot…
My RPi has no problem to resolve local dns name. I think that the problem is in empty locals list of DNS servers.
Is there a way how to configure it? Or is there a way how to make those changes persistent? I have no idea how to define local dns, I hope that somebody know how to do it.

The way to configure it is :
Settings → System → Network → IPV4
Or just click this “my” link !

This does not work either, I get this error message:
image

and in the log I get this:

22-05-09 21:19:51 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/aiohttp.py", line 121, in sentry_app_handle
    reraise(*_capture_exception(hub))
  File "/usr/local/lib/python3.9/site-packages/sentry_sdk/_compat.py", line 54, in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/aiohttp.py", line 111, in sentry_app_handle
    response = await old_handle(self, request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 139, in system_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 205, in token_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/utils.py", line 65, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/api/network.py", line 218, in interface_update
    await asyncio.shield(self.sys_host.network.apply_changes(interface))
  File "/usr/src/supervisor/supervisor/host/network.py", line 184, in apply_changes
    settings = get_connection_from_interface(interface)
  File "/usr/src/supervisor/supervisor/dbus/network/setting/generate.py", line 126, in get_connection_from_interface
    "ssid": Variant("ay", interface.wifi.ssid.encode("UTF-8")),
AttributeError: 'NoneType' object has no attribute 'ssid'

You are running an unsupported Supervised install. Rasbian is a derivative of Debian and thus not supported. Please reconsider your choices.

Hmm OK, even if I think that I’m not the only one with this setup, but OK. I have RPi 3B+ and as far as I know Raspbian is official OS distribution, so what else I should use? Which HA supported installation can be used instead of Supervised install?

I using such setup for several years and I was happy. I had no problems at all… Now with the latest updates I facing with this…

Posting this as a workaround as I have the same issue with a Supervised install on Diet-Pi 9.1 (Debian 12).

Just found an even quicker way is to add the line as init_commands in “Advanced SSH & Web Terminal”
It will then restore the DNS when the add on starts. No need for the SSHCommand, automation etc.