Starting-up integrations issues

I have tons of issues because at every HA start or restart, HA waits for Synology and Asus (router) integrations. I wouldn’t mind if it would mean a few seconds or minutes, but sometimes that takes forever (even hours), and sometimes it messes a lot of other things. And in that time I can’t even start things like HACS and a lot of add-ons do not start. Is there a way to fix these, besides disabling Synology and Asus integration?

Thank you in advance!!

This is what my log looks like:

Blockquote

2021-08-19 15:24:39 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2021-08-19 15:24:40 WARNING (MainThread) [homeassistant.components.template.sensor] The 'entity_id' option near /config/configuration.yaml:41 is deprecated, please remove it from your configuration

2021-08-19 15:24:40 WARNING (MainThread) [homeassistant.components.template.sensor] The 'entity_id' option near /config/configuration.yaml:55 is deprecated, please remove it from your configuration

2021-08-19 15:24:41 WARNING (MainThread) [homeassistant.config_entries] Config entry 'GT-AX11000-6830' for upnp integration not ready yet: None; Retrying in background

2021-08-19 15:24:42 WARNING (MainThread) [homeassistant.components.select] Platform netatmo not ready yet: None; Retrying in background in 30 seconds

2021-08-19 15:24:53 WARNING (MainThread) [homeassistant.components.synology_dsm] Connection error during update, fallback by reloading the entry

2021-08-19 15:25:40 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: synology_dsm


Not the cause of your issues but you can easily fix these warnings:

You are using depreciated options in your legacy template sensors. If you paste an example of one of your template sensors I can show you what to do.

Hi tom_l. I think the errors are related to some templates I found on the forum. Here they are:

  - platform: template
    sensors:
      ups_uptime:
        entity_id:
          - sensor.apc_internet_battery_runtime
        value_template: >
          {%- set time = states('sensor.apc_ha_battery_runtime') | int %}
          {%- set minutes = ((time % 3600) // 60) %}
          {%- set minutes = '{}min'.format(minutes) if minutes > 0 else '' %}
          {%- set hours = ((time % 86400) // 3600) %}
          {%- set hours = '{}hr '.format(hours) if hours > 0 else '' %}
          {%- set days = (time // 86400) %}
          {%- set days = '{}d '.format(days) if days > 0 else '' %}
          {{ 'Less than 1 min' if time < 60 else days + hours + minutes }}
  - platform: template
    sensors:
      ups_uptime2:
        entity_id:
          - sensor.apc_nas_battery_runtime
        value_template: >
          {%- set time = states('sensor.apc_nas_battery_runtime') | int %}
          {%- set minutes = ((time % 3600) // 60) %}
          {%- set minutes = '{}min'.format(minutes) if minutes > 0 else '' %}
          {%- set hours = ((time % 86400) // 3600) %}
          {%- set hours = '{}hr '.format(hours) if hours > 0 else '' %}
          {%- set days = (time // 86400) %}
          {%- set days = '{}d '.format(days) if days > 0 else '' %}
          {{ 'Less than 1 min' if time < 60 else days + hours + minutes }}
  - platform: template
    sensors:
      instant_power:
        friendly_name: "Instant Power Consumption"
        unit_of_measurement: 'W'
        value_template: "{{(states('sensor.virtual_house_voltage_396')|float) * (states('sensor.virtual_current_amps_397')|float) + (states('sensor.virtual_power_factor_398')|float)}}"

Take a look at the new format of template sensors here-

  1. New Modern Format (recommended)
  1. Legacy Format (old)

Under on either the modern/legacy format, you’ll find configuration variable which lists all variable that are accepted by the template sensor (modern format has a different configuration variable compared to legacy format).

Just an example of the new modern format (recommended)-

template:
  - sensor:
      - name: "Instant Power Consumption"
        unit_of_measurement: "W"
        state: >-
          {{ (states('sensor.virtual_house_voltage_396')|float) * (states('sensor.virtual_current_amps_397')|float) + (states('sensor.virtual_power_factor_398')|float) }}

If you decided to go with the new modern format, the config should look like-

template:
#State-based Sensor
  - sensor:
      - name: "Hello"
        unit_of_measurement: "W"
        state: 

      - name: "Modern"
        unit_of_measurement: "W"
        state: 

      - name: "Format"
        unit_of_measurement: "W"
        state: 

#Binary Sensors
  - binary_sensor:
      - name: "Hello World"
        state:

      - name: "World Hello"
        state:

#Trigger-based Sensor
  - trigger:
      - platform: time_pattern
        # This will update every night
        hours: 0
        minutes: 0
    sensor:
      # Keep track how many days have past since a date
      - name: Home Assistant
        state: 

  - trigger:
      - platform: time_pattern
        # This will update every night
        hours: 0
        minutes: 0
    sensor:
      # Keep track how many days have past since a date
      - name: Hello Home Assistant
        state: 

See the difference?

  - platform: template
    sensors:
      ups_uptime:
        value_template: >
          {%- set time = states('sensor.apc_ha_battery_runtime') | int %}
          {%- set minutes = ((time % 3600) // 60) %}
          {%- set minutes = '{}min'.format(minutes) if minutes > 0 else '' %}
          {%- set hours = ((time % 86400) // 3600) %}
          {%- set hours = '{}hr '.format(hours) if hours > 0 else '' %}
          {%- set days = (time // 86400) %}
          {%- set days = '{}d '.format(days) if days > 0 else '' %}
          {{ 'Less than 1 min' if time < 60 else days + hours + minutes }}
  - platform: template
    sensors:
      ups_uptime2:
        value_template: >
          {%- set time = states('sensor.apc_nas_battery_runtime') | int %}
          {%- set minutes = ((time % 3600) // 60) %}
          {%- set minutes = '{}min'.format(minutes) if minutes > 0 else '' %}
          {%- set hours = ((time % 86400) // 3600) %}
          {%- set hours = '{}hr '.format(hours) if hours > 0 else '' %}
          {%- set days = (time // 86400) %}
          {%- set days = '{}d '.format(days) if days > 0 else '' %}
          {{ 'Less than 1 min' if time < 60 else days + hours + minutes }}
  - platform: template
    sensors:
      instant_power:
        friendly_name: "Instant Power Consumption"
        unit_of_measurement: 'W'
        value_template: "{{(states('sensor.virtual_house_voltage_396')|float) * (states('sensor.virtual_current_amps_397')|float) + (states('sensor.virtual_power_factor_398')|float)}}"

The error message told you what to do.

The 'entity_id' option ... is deprecated, please remove it from your configuration

Do the same for all your template sensors and template binary sensors.

1 Like

Thank you for your help!
It worked! :slight_smile: