Issue with an integration....but which one is it

Since today I have an issue with an integration but HA is not telling me which one it is.
Failed to restart Home Assistant
The system cannot restart because the configuration is not valid: Integration error: Sensors - Integration ‘Sensors’ not found. How can I see which is causing this?

Logger: homeassistant.components.websocket_api.http.connection
Source: components/hassio/init.py:705
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 5:14:35 PM (1 occurrences)
Last logged: 5:14:35 PM

[546836973888] The system cannot restart because the configuration is not valid: Integration error: Sensors - Integration ‘Sensors’ not found.
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py”, line 202, in handle_call_service
await hass.services.async_call(
File “/usr/src/homeassistant/homeassistant/core.py”, line 1738, in async_call
task.result()
File “/usr/src/homeassistant/homeassistant/core.py”, line 1775, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File “/usr/src/homeassistant/homeassistant/components/hassio/init.py”, line 705, in async_handle_core_service
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: The system cannot restart because the configuration is not valid: Integration error: Sensors - Integration ‘Sensors’ not found.

Errors started occurring without any change?
Why were you restarting or it restart in its own?

Update recently?

My guess would be badly formatted yaml in your config. Share your config perhaps?

Looks like you have Sensors: in your config when it should be sensor:

1 Like

I have only “sensor” in my configuration.yaml. I checked again and according to the system both configuration and automations.yaml are correct. The issue is new as I have been able to implement all kind of changes sofar.

When I try to reboot from the menu this is what I see

Failed to restart Home Assistant.

The system cannot restart because the configuration is not valid: Integration error: Sensor - Integration ‘Sensor’ not found.

The error message has not changed
Log Details (ERROR)

Logger: homeassistant.components.hassio
Source: components/hassio/init.py:694
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: October 8, 2022 at 7:45:39 PM (8 occurrences)
Last logged: 1:06:04 PM

  • The system cannot restart because the configuration is not valid: Integration error: Sensors - Integration ‘Sensors’ not found.
  • The system cannot restart because the configuration is not valid: Integration error: Sensor - Integration ‘Sensor’ not found.
  • The system cannot restart because the configuration is not valid: Invalid config for [sensor.template]: [sensor] is an invalid option for [sensor.template]. Check: sensor.template->sensor. (See ?, line ?). Integration error: Sensor - Integration ‘Sensor’ not found.
  • The system cannot restart because the configuration is not valid: Invalid config for [sensor.template]: [sensor] is an invalid option for [sensor.template]. Check: sensor.template->sensor. (See ?, line ?). Integration error: Sensors - Integration ‘Sensors’ not found.

Thanks for the help sofar

Did you check sensor.template?

Sounds like it’s currently running? You just cannot restart from UI vs does not restart /currently stopped.

EDIT

I was saying look at the template integration

I wonder if ‘template’ is a protected term for a sensor. Others may be able to confirm but you could try changing that entity id to something else. If you really want some help though, I suggest you share your config so we can see properly.

This is my configuration.yaml. I have remove passwords etc.
I rebooted my PI4 forcefully manually as I could not do that from within HA
Hopefully the 3 ticks will make things better legible

group: !include groups.yaml
automation: !include automations.yaml

homeassistant:
  packages: !include_dir_named packages


# Configure a default setup of Home Assistant (frontend, api, etc)
# default_config:mqtt
energy:

Sensor:
  - platform: mqtt
    name: “IsShellyMotionDetected”
    state_topic: "shellies/shellymotionsensor-60A423936760/status"
    value_template: "{{ value_json.motion }}"
  - platform: mqtt
    name: “IsShellyMotionVibrationDetected"
    state_topic: "shellies/shellymotionsensor-60A423936760/status"
    value_template: "{{ value_json.vibration }}"
  - platform: mqtt
    name: “ShellyMotionLux”
    state_topic: "shellies/shellymotionsensor-60A423936760/status"
    value_template: "{{ value_json.lux }}"
    unit_of_measurement: ‘lx’
  - platform: mqtt
    name: “ShellyMotionBattery”
    state_topic: "shellies/shellymotionsensor-60A423936760/status"
    value_template: "{{ value_json.bat }}"
    unit_of_measurement: '%'
    
nefiteasy:
  devices:
    - serial: 
      accesskey: 
      name: Nefit Easy
      min_temp: 15
      max_temp: 21
      temp_step: 0.5
      sensor:
        - year_total
        - status
        - supply_temperature
        - outdoor_temperature
        - system_pressure
        - active_program
        - hot_water_operation
      switches:
        - hot_water
        - holiday_mode
        - fireplace_mode
        - today_as_sunday
        - tomorrow_as_sunday
        - preheating
        - home_entrance_detection
        - weather_dependent
        - lockui

fastdotcom:
  scan_interval:
      minutes: 30

influxdb:
  host: a0d7b954-influxdb
  port: 8086
  database: homeassistant
  username: homeassistant
  password: 
  max_retries: 3
  default_measurement: state

# Example to show how to include only the listed domains and entities in the logbook
logbook:
  include:
    domains:
      - sensor
      - switch
      - binary_sensor
      - media_player

# Example configuration.yaml entry for the Telegram Bot
telegram_bot:
  - platform: polling
    api_key:
    allowed_chat_ids:
      - 84466437
  - platform: broadcast
    api_key: 
    allowed_chat_ids:
      - 84466437

# Example configuration.yaml entry for the notifier
notify:
  - name: HomeAssistant
    platform: telegram
    chat_id: 84466437
  - name: device_tracker
    platform: telegram
    chat_id: 84466437

# Removed 2022104 2320
apsystems_ecur:
  - host: 192.168.188.75
  - scan_interval: 10

# Example configuration.yaml entry
  - platform: buienradar
    name: ""
    # Force 'Meetstation Volkel' to be used:
    latitude: 52.076380
    longitude: 5.034930
    monitored_conditions:
    - stationname
    - barometerfc
    - barometerfcname
    - conditioncode
    - condition
    - conditiondetailed
    - conditionexact
    - symbol
    - feeltemperature
    - humidity
    - temperature
    - groundtemperature
    - windspeed
    - windforce
    - winddirection
    - windazimuth
    - pressure
    - visibility
    - windgust
    - precipitation
    - irradiance
    - precipitation_forecast_average
    - precipitation_forecast_total
    - rainlast24hour
    - rainlasthour
    
# taken from https://www.home-assistant.io/integrations/sensor.command_line
  - platform: glances
    name: BRAHMASYN
    host: 192.168.188.50
    resources:
      - 'disk_use_percent'
      - 'disk_use'
      - 'disk_free'
  - platform: glances
    host: localhost
    name: CoreOS
    version: 3
    resources:
    - 'disk_use'
    - 'disk_use_percent'
    - 'disk_free'
    - 'cpu_temp'
    - 'processor_load'
    - 'memory_use'
    - 'memory_use_percent'
    - 'memory_free'
  - platform: glances
    name: BRAHMASYN6
    host: 192.168.188.30
    port: 61209
    username: pi
    password: 
  - platform: glances
    name: CoreOS
    version: 3
    resources:
    - 'disk_use'
    - 'disk_use_percent'
    - 'disk_free'
    - 'cpu_temp'
    - 'processor_load'
    - 'memory_use'
    - 'memory_use_percent'
    - 'memory_free'
  - platform: command_line
    name: CPU Temperature
    command: "cat /sys/class/thermal/thermal_zone0/temp"
    unit_of_measurement: "°C"
    value_template: '{{ value | multiply(0.001) | round(1) }}'

  - platform: systemmonitor
    resources:
    - type: disk_use_percent
      arg: /home
    - type: memory_free
  - platform: systemmonitor
    resources:
    - type: disk_free
      arg: /home
    - type: memory_free
  - platform: systemmonitor
    resources:
    - type: processor_use
      arg: /home
    - type: memory_free
  - platform: systemmonitor
    resources:
    - type: last_boot
      arg: /home
    - type: memory_free
  # Github integration
  - platform: github
    access_token: ba86c5c88a4550ecbe615f974f174f2257a1aaf6
    repositories:
    - path: 'ksya/ha-nefiteasy/issues'
      name: Nefit Easy integration

# Berekening gasverbruik en electriciteitsverbruik per dag en maand (totalen, dus som van hoog- en laagtarief)
  - platform: template
    sensor:
      daily_energy_delivered:
        friendly_name: Daily Energy Delivered
        unit_of_measurement: kWh
        value_template: "{{ (states('sensor.daily_energy_delivered_offpeak')|float + states('sensor.daily_energy_delivered_peak')|float | round(2)) }}"
      monthly_energy_delivered:
        friendly_name: Monthly Energy Delivered
        unit_of_measurement: kWh
        value_template: "{{ (states('sensor.monthly_energy_delivered_offpeak')|float + states('sensor.monthly_energy_delivered_peak')|float | round(2)) }}"
      daily_energy_returned:
        friendly_name: Daily Energy Returned
        unit_of_measurement: kWh
        value_template: "{{ (states('sensor.daily_energy_returned_offpeak')|float + states('sensor.daily_energy_returned_peak')|float | round(2)) }}"
      monthly_energy_returned:
        friendly_name: Monthly Energy Returned
        unit_of_measurement: kWh
        value_template: "{{ (states('sensor.monthly_energy_returned_offpeak')|float + states('sensor.monthly_energy_returned_peak')|float | round(2)) }}"
      hourly_energy_returned:
        friendly_name: Hourly Energy Returned
        unit_of_measurement: kWh
        value_template: "{{ (states('sensor.hourly_energy_returned_offpeak')|float + states('sensor.hourly_energy_returned_peak')|float | round(2)) }}"

utility_meter:
### Connectix.nl Water Meter - berekeningen
#  water_hourly:
#    source: sensor.connectix_watermeter_totaal
#    cycle: hourly
#  water_daily:
#    source: sensor.connectix_watermeter_totaal
#    cycle: daily
#  water_monthly:
#    source: sensor.connectix_watermeter_totaal
#    cycle: monthly
# Berekening van uurwaarden voor electriciteit hoog- en laagtarief
  hourly_energy_delivered_offpeak:
    source: sensor.dsmr_reading_electricity_delivered_1
    cycle: hourly
  hourly_energy_delivered_peak:
    source: sensor.dsmr_reading_electricity_delivered_2
    cycle: hourly

  hourly_energy_returned_offpeak:
    source: sensor.dsmr_reading_electricity_returned_1
    cycle: hourly
  hourly_energy_returned_peak:
    source: sensor.dsmr_reading_electricity_returned_2
    cycle: hourly

# Berekening van dagwaarden voor electriciteit hoog- en laagtarief
  daily_energy_delivered_offpeak:
    source: sensor.dsmr_reading_electricity_delivered_1
    cycle: daily
  daily_energy_delivered_peak:
    source: sensor.dsmr_reading_electricity_delivered_2
    cycle: daily

  daily_energy_returned_offpeak:
    source: sensor.dsmr_reading_electricity_returned_1
    cycle: daily
  daily_energy_returned_peak:
    source: sensor.dsmr_reading_electricity_returned_2
    cycle: daily

# Berekening van maandwaarden voor electriciteit hoog- en laagtarief
  monthly_energy_delivered_offpeak:
    source: sensor.dsmr_reading_electricity_delivered_1
    cycle: monthly
  monthly_energy_delivered_peak:
    source: sensor.dsmr_reading_electricity_delivered_2
    cycle: monthly

  monthly_energy_returned_offpeak:
    source: sensor.dsmr_reading_electricity_returned_1
    cycle: monthly
  monthly_energy_returned_peak:
    source: sensor.dsmr_reading_electricity_returned_2
    cycle: monthly

# Berekening van dag- en maandwaarden voor gas
  daily_gas:
    source: sensor.dsmr_consumption_gas_delivered
    cycle: daily

  monthly_gas:
    source: sensor.gas_consumption
    cycle: monthly

### Connectix.nl Water Meter - sensoren
### 202200606 mqtt is handled differently
mqtt:
  sensor:
    - name: "Gasverbruik per uur"
      state_topic: "dsmr/reading/gas_hourly_usage"
      unit_of_measurement: 'm3'
    - name: "Electriciteitsverbruik per uur"
      state_topic: "dsmr/reading/electricity_hourly_usage"
      unit_of_measurement: 'kW'
#    - name: "connectix_watermeter_totaal"
#      state_topic: "watermeter/reading/current_value"
#      unit_of_measurement: "L"
#      force_update: true
#    - name: "Watermeter MAC Adres"
#      state_topic: "watermeter/smart_gateways/mac_address"
#    - name: "Watermeter Firmware versie van gateway"
#      state_topic: "watermeter/smart_gateways/running_firmware_version"
#    - name: "Watermeter Beschikbare firmware versie"
#      state_topic: "watermeter/smart_gateways/available_firmware_version"
#    - name: "Watermeter Firmware update beschikbaar"
#      state_topic: "watermeter/smart_gateways/update_available"
#    - name: "Watermeter WiFi Signaalsterkte (rssi)"
#      state_topic: "watermeter/smart_gateways/wifi_rssi"
#      unit_of_measurement: 'dB'
#    - name: "Watermeter startup time"
#      state_topic: "watermeter/smart_gateways/startup_time"
#    - name: "Watermeter Install firmware update?"
#      command_topic: "watermeter/smart_gateways/install_update"
#      payload_on: "yes"
#      payload_off: "no"    - name: "Gasverbruik per uur"

If you’re going to share YAML, please format it in a code block by including three backticks (```) above and below the YAML; otherwise, the YAML is basically unreadable.

Regardless, you have Sensor: a couple of lines below energy: in your config which needs to be sensor: (and actually, those should be moved to the mqtt: section anyway with the new format). It’s difficult to tell what the source of the other issues is without the YAML being formatted in a code block, so please edit your message accordingly.

1 Like

What @Tediore says - beat me to it!

1 Like

I have added the 3 ticks. Hope you see something out of the ordinary. This did happen out of the blue. I have been updating HA without any further issues so far

A few issues.

  1. Sensor: needs to be sensor:
  2. everything from - platform: buienradar to right above utility_meter: needs to be put directly under sensor:
  - platform: template
    sensor:

needs to be

  - platform: template
    sensors:

(but that format is now considered the legacy format, so you should consider changing them to the new format as shown here. To be fair though, I haven’t updated mine)

I will take a close look at this. Thanks for your comments!

This part is not needed anymore:

# Removed 2022104 2320
apsystems_ecur:
  - host: 192.168.188.75
  - scan_interval: 10

Configuration is done by integration settings.

HAEdwin,
aplogies for the late response. I have indeed removed these settings.
What is new is that sometimes the solar data is not read during the day but somewhere at night the entire number shows up in one go. I’ve had this several times

This is an exmple where during the data nothing is received yet somewhere in the evening everything shows up in one go. This was October 30, 2022. It is doing the same for today. For the day nothing is shown…

Not sure what is causing this. I have the latest software, etc.

Anyway…thanks for your reaction!

Regards,
Ron

I could be network related. Is the EMA site also running behind on data? If the ECU can’t post it’s data to EMA it will try to repair data in the early morning flusing the ECU’s databuffer to EMA. So maybe there are some sort of connection issues going on during daytime like a duplicate IP-address or something.

There was apparently an update of hacs and apsystems waiting. Updated all and the numbers showed up. Weird but it seems to have been solved. Thanks for your help

1 Like