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

OK - my fault - sorry for the original post.

I use card-mod in my Themes to hide the menu button and I had forgotten. Doh!
But it is a shame the right swipe has gone because before you could have a minimal header and still get to the menu by the right swipe.

1 Like

After 2023.4.1 update, I had many log errors like this:

2023-04-08 14:57:05.933 ERROR (MainThread) [homeassistant.util.logging] Exception in _async_process_device_data when dispatching 'device_tracker_connected_device_registered': ({'ip': '', 'mac': '40:62:31:08:fd:11', 'host_name': None},)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/dhcp/__init__.py", line 376, in _async_process_device_data
self.async_process_client(ip_address, hostname, _format_mac(mac_address))
File "/usr/src/homeassistant/homeassistant/components/dhcp/__init__.py", line 157, in async_process_client
made_ip_address = make_ip_address(ip_address)
File "/usr/local/lib/python3.10/ipaddress.py", line 54, in ip_address
raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 address')
ValueError: '' does not appear to be an IPv4 or IPv6 address
2023-04-08 14:57:06.010 ERROR (MainThread) [homeassistant.helpers.event] Error while processing event <Event state_changed[L]: entity_id=device_tracker.brother_mfc_8890dw, old_state=None, new_state=<state device_tracker.brother_mfc_8890dw=home; source_type=router, ip=, mac=00:1b:a9:17:b3:5a, is_guest=False, note=, name=Brother MFC-8890DW, oui=BrotherI, friendly_name=Brother MFC-8890DW RX Brother MFC-8890DW @ 2023-04-08T10:57:05.950002-04:00>> for domain device_tracker
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 431, in _async_dispatch_domain_event
hass.async_run_hass_job(job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 593, in async_run_hass_job
hassjob.target(*args)
File "/usr/src/homeassistant/homeassistant/components/dhcp/__init__.py", line 318, in _async_process_device_event
self._async_process_device_state(event.data["new_state"])
File "/usr/src/homeassistant/homeassistant/components/dhcp/__init__.py", line 338, in _async_process_device_state
self.async_process_client(ip_address, hostname, _format_mac(mac_address))
File "/usr/src/homeassistant/homeassistant/components/dhcp/__init__.py", line 157, in async_process_client
made_ip_address = make_ip_address(ip_address)
File "/usr/local/lib/python3.10/ipaddress.py", line 54, in ip_address
raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 address')
ValueError: '' does not appear to be an IPv4 or IPv6 address

All of them have ValueError: '' does not appear to be an IPv4 or IPv6 address. While each of the message make reference to a components/dhcp, I donā€™t see a DHCP integration so I suspect this is from my UniFi Network Integration.

Do you have a Brother printer named Brother MFC-8890DW in your unifi client list?

Please report in a GitHub issue. That can be moved to a background task to avoid delaying shutdown

1 Like

Something is feeding invalid empty string ip addresses into the system.

Check the states panel in the developer tools to find the integration thatā€™s doing it and report it in a github issue so it can be fixed

After updating I see an error that recorder is taking more than 300 seconds to start. I thought I saw that data migration would take place at 2023.04.0 but this is now occurring post restart after updating from that build to 2023.04.1.
Iā€™m running MariaDB.
Some HA services are failing dependency checks, I assume because recorder isnā€™t available.

2023-04-08 11:48:56.230 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of default_config. Setup failed for dependencies: energy, history, logbook

2023-04-08 11:48:56.232 ERROR (MainThread) [homeassistant.setup] Setup failed for default_config: (DependencyError(...), 'Could not setup dependencies: energy, history, logbook')

I donā€™t see anything in the logs about a data migration or anything in mariadb logs that looks sus. Can someone help me out with other areas to check on whatā€™s up with recorder?

Check the logs for your Mariadb server. Itā€™s likely the problem is there

Another useful example to match the current new ā€œFan tileā€ design of Home Assistant with custom fanspeeds template could be:

fan:
  - platform: template
    fans:
      preset_fan:
        friendly_name: "Name your fan"
        value_template: "{{ states('fan.yourfan_name') }}"
        turn_on:
          - service: fan.turn_on
            target:
              entity_id: fan.yourfan_name
        turn_off:
          - service: fan.turn_off
            target:
              entity_id: fan.yourfan_name
        percentage_template: >
          {{ state_attr('fan.yourfan_name', 'percentage') }}
        speed_count: 3
        set_percentage:
          - service: fan.set_percentage
            target:
              entity_id: fan.yourfan_name
            data:
              percentage: >-
                {% if percentage == 100 %}
                  100
                {% elif percentage >= 66 %}
                  75
                {% elif percentage >= 33 %}
                  44
                {% else %}
                  20
                {% endif %}

A FYI. If you are using MQTT for device tracking using the mqtt_json then it is broken.
Something changed in the loading so it tries to start before MQTT and then dies and never recovers

Bug item raised mqtt_json device tracker broken - seems to try to start before MQTT integration has started and fails Ā· Issue #91093 Ā· home-assistant/core Ā· GitHub

It is actually a brilliant feature for testing location based automations. It is hard to physically move around in and out of zones. With this you can ā€¦ eh could ā€¦ enter coordinates via mqtt and have a test person fly from place to place.

Yes, I doā€¦

If itā€™s coming from UniFi, then you are correct that thatā€™s where the error is coming from.

Check the states panel in the developer tools to find the integration thatā€™s doing it and report it in a github issue so it can be fixed

The state panel does show a blank IP address. How do you link this to a specific integration causing the message?

source_type: router
ip: ''
mac: 00:1b:a9:17:b3:5a
is_guest: false
note: ''
name: Brother MFC-8890DW
oui: BrotherI
friendly_name: Brother MFC-8890DW RX Brother MFC-8890DW

straight from your error

What he said too :arrow_down:

The integration is UniFi Network sir, you can see this in your screenshot above.

@petro @TheHolyRoger Issue #91102 opened.

To the discussion on the Polymer message

I cannot understand why the communication path between developes is through the users logs instead of direct communication and as several pointed out - the message does not even mention which js file that contained the call.

I have now done it the hard way and found it by a combination of search and removing components one by one. Several components has license notes that refer to Polymer but contain no Polymer code. I can already see users raising bug reports against them. So now we have unhappy users and unhappy volunteer developers. I see no winners in this game.

I can only help with the little information I have

Here is my list of HACS installed custom frontend components. A screenshot as it would take me forever to type or copy paste

The only component that has Polymer content is the cover-position-preset-row
The rest are fine. At least they leave no log entry. So that can eliminate the hunting for the most popular custom components

I have raised a bug report for the cover-position-preset-row which is a feature I love.

2 Likes

I could not agree more

Itā€™s not through the logs. It was communicated in the blog post and on the developer website. It also happens to be in the logs.

HA announces things through the blog posts and then links the blog posts on all social media. What am I missing? How is that not good enough?

1 Like

Keep in mind that thereā€™s also a developers blog. Itā€™s the most recent blog post. This is the blog where developers (custom and non-custom) developers get their information.

I checked earlier and I donā€™t see anything unusualā€¦ I assume the couple connection errors are from contention during startup.

Version: '10.6.10-MariaDB'  socket: '/run/mysqld/mysqld.sock'  port: 3306  MariaDB Server
[09:46:40] INFO: Check data integrity and fix corruptions
mysql.column_stats                                 OK
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.global_priv                                  OK
mysql.gtid_slave_pos                               OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.index_stats                                  OK
mysql.innodb_index_stats                           OK
mysql.innodb_table_stats                           OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.proxies_priv                                 OK
mysql.roles_mapping                                OK
mysql.servers                                      OK
mysql.table_stats                                  OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.transaction_registry                         OK
homeassistant.event_data                           OK
homeassistant.events                               OK
homeassistant.recorder_runs                        OK
homeassistant.schema_changes                       OK
homeassistant.state_attributes                     OK
homeassistant.states                               OK
homeassistant.statistics                           OK
homeassistant.statistics_meta                      OK
homeassistant.statistics_runs                      OK
homeassistant.statistics_short_term                OK
sys.sys_config                                     OK
[09:46:40] INFO: Ensuring internal database upgrades are performed
[09:46:41] INFO: Ensure databases exists
[09:46:41] INFO: Create database homeassistant
[09:46:41] INFO: Ensure users exists and are updated
[09:46:41] INFO: Update user homeassistant
[09:46:41] INFO: Init/Update rights
[09:46:41] INFO: Granting all privileges to homeassistant on homeassistant
[09:46:42] INFO: Successfully send service information to Home Assistant.
2023-04-06  9:29:39 33 [Warning] Aborted connection 33 to db: 'homeassistant' user: 'homeassistant' host: '172.30.32.1' (Got timeout reading communication packets)
2023-04-06  9:29:40 31 [Warning] Aborted connection 31 to db: 'homeassistant' user: 'homeassistant' host: '172.30.32.1' (Got timeout reading communication packets)