HA Update 2022.4.0 and errors

This morning I saw that the April update 2022.4.0 for HA was there so I ran the Check Home Assistant Configuration.
This what I normally do so as to avoid downgrading where possible.
These were the errors.
Edit I now have the full log below

INFO:homeassistant.util.package:Attempting install of colorlog==6.6.0
e[1mTesting configuration at /tmp/confige[0m
INFO:homeassistant.helpers.storage:Migrating core.entity_registry storage from 1.5 to 1.6
INFO:homeassistant.util.package:Attempting install of pycryptodome>=3.6.6
INFO:homeassistant.util.package:Attempting install of zeroconf==0.38.4
INFO:homeassistant.util.package:Attempting install of aiohttp_cors==0.7.0
INFO:homeassistant.util.package:Attempting install of pyhik==0.3.0
INFO:homeassistant.util.package:Attempting install of rflink==0.0.62
INFO:homeassistant.util.package:Attempting install of sqlalchemy==1.4.32
INFO:homeassistant.util.package:Attempting install of fnvhash==0.1.0
INFO:homeassistant.util.package:Attempting install of lru-dict==1.1.7
INFO:homeassistant.util.package:Attempting install of ephem==4.1.2
INFO:homeassistant.util.package:Attempting install of paho-mqtt==1.6.1
INFO:homeassistant.util.package:Attempting install of python-forecastio==1.4.0
INFO:homeassistant.util.package:Attempting install of psutil==5.8.0
INFO:homeassistant.util.package:Attempting install of pvo==0.2.2
WARNING:homeassistant.components.integration.sensor:The 'unit' option is deprecated, please remove it from your configuration
WARNING:homeassistant.components.integration.sensor:The 'unit' option is deprecated, please remove it from your configuration
WARNING:homeassistant.components.integration.sensor:The 'unit' option is deprecated, please remove it from your configuration
WARNING:homeassistant.components.integration.sensor:The 'unit' option is deprecated, please remove it from your configuration
WARNING:homeassistant.components.integration.sensor:The 'unit' option is deprecated, please remove it from your configuration
WARNING:homeassistant.components.integration.sensor:The 'unit' option is deprecated, please remove it from your configuration
WARNING:homeassistant.components.integration.sensor:The 'unit' option is deprecated, please remove it from your configuration
WARNING:homeassistant.components.integration.sensor:The 'unit' option is deprecated, please remove it from your configuration
WARNING:homeassistant.components.integration.sensor:The 'unit' option is deprecated, please remove it from your configuration
WARNING:homeassistant.components.integration.sensor:The 'unit' option is deprecated, please remove it from your configuration
INFO:homeassistant.util.package:Attempting install of hass-nabucasa==0.54.0
INFO:homeassistant.util.package:Attempting install of scapy==2.4.5
INFO:homeassistant.util.package:Attempting install of aiodiscover==1.4.8
INFO:homeassistant.util.package:Attempting install of home-assistant-frontend==20220405.0
INFO:homeassistant.util.package:Attempting install of PyNaCl==1.5.0
INFO:homeassistant.util.package:Attempting install of async-upnp-client==0.27.0
INFO:homeassistant.util.package:Attempting install of pyudev==0.22.0
INFO:homeassistant.util.package:Attempting install of pillow==9.0.1
INFO:homeassistant.util.package:Attempting install of PyTurboJPEG==1.6.6
INFO:homeassistant.util.package:Attempting install of pysensibo==1.0.9
INFO:homeassistant.util.package:Attempting install of aiofiles==0.6.0
INFO:homeassistant.util.package:Attempting install of mutagen==1.45.1
INFO:homeassistant.util.package:Attempting install of gTTS==2.2.4
e[1;37mFailed confige[0m
  e[1;31mGeneral Errors:e[0m e[31me[31m
    - Platform error fan.smartir - cannot import name 'ATTR_SPEED' from 'homeassistant.components.fan' (/usr/local/lib/python3.9/site-packages/homeassistant/components/fan/__init__.py)
e[0m
e[1;37mSuccessful config (partial)e[0m

I did not update from 2022.3.8 to 2022.04.0 Ns staying with 2022.3.8 until I can run the checker error free.

There has been an issue raised with SmarIR on Githib Unable to setup smartir fan in next HA version (2022.4.b04) · Issue #817 · smartHomeHub/SmartIR · GitHub

I don’t understand the warning about
WARNING:homeassistant.components.integration.sensor:The ‘unit’ option is deprecated, please remove it from your configuration

Can anyone enlighten me please?

Anywhere you have unit in your template sensors needs to be removed.

1 Like

Thanks for replying
I have a few entries like this

sensor 10:
  - platform: integration
    source: sensor.solarpower
    name: energy_solar
    method: left
    unit: kWh
    unit_prefix: k
    unit_time: h
    round: 2

So I have to remove the “unit: kWh”?
What about “unit_prefix: k” and similar?

I also have “unit_of_measurement”

  - platform: template
    sensors:
      exporting:
        friendly_name: "Current Energy Exporting"
        value_template: "{{ [0, (states('sensor.envoy_current_energy_production') | int - states('sensor.power_usage_3420') | int)] | max }}"
        unit_of_measurement: 'W'

      importing:
        friendly_name: "Current Energy Importing"
        value_template: "{{ [0, (states('sensor.power_usage_3420') | int - states('sensor.envoy_current_energy_production') | int)] | max }}"
        unit_of_measurement: 'W'
 
      solarpower:
        friendly_name: "Solar Power"
        value_template: "{{ states('sensor.envoy_current_energy_production')}}"
        unit_of_measurement: 'W'

I was reading that this term was depreciated so confused as to what I have to remove??

I assume that I would do this after I had updated to 2022.4.0?
Is there any before and after examples?

I don’t see those in the updated docs, so probably.

That is in the docs, so it should be okay.

Yes I commented out the “unit:” in 10 places in my configuration.yaml and now no warning errors.
Thank you.