Frequent Crashing and lots of ‘noise’ in log

Looking for assistant in tracking down why my HaOS installation is crashing multiple times a day. This is a very new installation, as I am new to HA. I am not sure what type of information would be helpful to track this down but wiling to provide anything if I can get an assist.

HaOS LXC installed on Proxmox host.

Home Assistant 2023.3.6
Supervisor 2023.03.2
Operating System 9.5
Frontend 20230309.1 - latest

N5105 CPU with 16GB RAM
512GB NvME + 2TB SSD for Proxmox storage

I see tons of errors…. Here are the majority of them that seem to be consistently happening right before most of the crashes)

  • for HA trying to reach my Elgato Key Light with a static IP (really hating that light right now, cant’ get it to work with ANYTHING right)
  • MQTT error stating [homeassistant.components.mqtt.client] Can’t decode payload for ESPresense sensors
  • WARNING (MainThread) [homeassistant.components.template.trigger] Error initializing ‘template’ trigger for ‘Vent Fan Control Humidity - Master Bath Shower’: ValueError: Template error: float got invalid input ‘unknown’ when rendering template ‘{{ (states(‘sensor.master_bath_temphumidity_sensor_humidity’)|float - states(‘sensor.master_bath_average_humidity’)|float)|abs < 9 }}’ but no default was specified

Happy to post logs to get assistance sorting this out, just let me know what I should post.

Some more information. Here is one of errors in full and the automation config portion that needs to be corrected with you fine people’s help. Now to be clear the automation WORKS and I love that it turns on the fan as it is supposed to, just trying to clear up the errors I’m seeing and hopefully prevent the crashes that seem to be becoming more frequent.

Automation


- alias: Vent Fan Control Humidity - Room
  description: Turns on at 10% difference, off under 9%
  id: 9dd2b878-ca59-11ed-afa1-0242ac120002
  trigger:
    - id: 'on'
      platform: template
      value_template: "{{ (states('sensor.room_temphumidity_humidity')|float - states('sensor.room_average_humidity')|float)|abs > 10 }}"
    - id: 'off'
      platform: template
      value_template: "{{ (states('sensor.room_temphumidity_humidity')|float - states('sensor.room_average_humidity')|float)|abs < 9 }}"
  action:
    - service: 'switch.turn_{{ trigger.id }}'
      entity_id: switch.room_vent_fan_switch

Error


Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 576, in async_render_to_info
    render_info._result = self.async_render(variables, strict=strict, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 460, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ (states('sensor.room_temphumidity_humidity')|float - states('sensor.oom_average_humidity')|float)|abs > 10 }}' but no default was specified
2023-03-26 20:47:04.817 WARNING (MainThread) [homeassistant.components.template.trigger] Error initializing 'template' trigger for 'Vent Fan Control Humidity - Room': ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ (states('sensor.room_temphumidity_humidity')|float - states('sensor.room_average_humidity')|float)|abs < 9 }}' but no default was specified
2023-03-26 20:47:04.818 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template("{{ (states('sensor.room_temphumidity_humidity')|float - states('sensor.room_average_humidity')|float)|abs < 9 }}")
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1771, in forgiving_float_filter
    return float(value)
ValueError: could not convert string to float: 'unknown'

During handling of the above exception, another exception occurred:

I’ve removed the Elgato integration and the system still crashed earlier today. Also removed the HTTP entry I had in place to allow the reverse proxy on my Synology to pass traffic to HA correctly. I’m pruning all the error branches I can, so any help would be appreciated.

I don’t think that any automation you set up in HA is causing a crash - that would be very unlikely.

But for your automation it seems that one of the sensors has no value (unknown), hence it cannot be converted to a float and the template cannot render. Check under the developer tools what value the sensor currently has.

Like the error message says: no default was specified. If you don’t want unknown sensor values to throw errors, give the float filter a default value like this:

value_template: "{{ (states('sensor.room_temphumidity_humidity')|float(0) - states('sensor.room_average_humidity')|float(0))|abs > 10 }}"

I’ve chosen 0 for the default here, but you can use whatever you want. Read more here: