2021.4: For our advanced users ❤️

I have roughly 8 lights and 8 switches. Really they are all switches but depending on the device type, some discover as lights depending on if they have dimmers. Its not that the integration is slow. I can watch the integration come up fast and the devices are all available when I lower the timeouts essentially reverting that commit I referenced above. All works just fine.

The interesting part is prior to upgrade there was no issue. Post-upgrade it seems HA is waiting on some ‘integration ready’ event before proceeding further so it just hangs the startup for 500 seconds. HA boots in 30-45 seconds and is ready prior to the upgrade. Post upgrade, it goes as far as I make that timeout. If I set that timeout to 3 hours, it would wait 3 hours to timeout.

Im not suprised that you don’t see this issue IF you don’t have any LIGHTS (HS220s for example). While booting, I can see the switches are ‘available’ immediate. Its the lights that wait for the timeout and then are ALL available.

Of course the integration isn’t the best but something in 2021.x HA release has magnified the issue on startup.

@checking12 I’m curious though. What model KASA switches do you have?

For anyone struggling with this. I again tried a manual definition instead of letting HA do the discovery.
in the configuration.yaml… I think I’ve fixed it. I turned off discovery and I placed all my lights/switches with the exception of H220s in the ‘switch’ definition. and the HS220’s in the ‘dimmer’ config. Like this:

HA just came up in 30 seconds.

  discovery: false
    - host: #HS220-kitchen-lights *
    - host: #HS220-master-bedroom *
    - host: #HS220-emersons-room *
    - host: #HS220-loft-overhead *
    - host: #HS220-loft-light *
    - host: #HS220-family-room-overhead *
    - host: #HS220-raleighs-room *
    - host: #HS220-master-bathroom *
    - host: #HS220-kitchen-pendants *
    - host: #HS220-kitchen-table *
    - host: #HS220-corys-room *
#  light:
    - host: #HS200-family-room-fan *
    - host: #HS103-raleigh-sound-machine *
    - host: #HS103-family-room-scents-plug *
    - host: #HS200-master-bedroom-fan *
    - host: #HS200-backyard-fan *
    - host: #HS103-office-scents-plug *
    - host: #HS103-utility-plug *
    - host: #HS200-backyard-flood *
    - host: #HS200-backyard-door *
    #- host: #KL430-kitchen-right *
    #- host: #KL430-kitchen-left *
    - host: #HS103-family-room-floor-light *
    - host: #HS103-family-room-table-lights *
    - host: #HS210-front-hallway *
    - host: #HS200-frontdoor-lights *
    - host: #HS210-stairs-hallway *

Contrary to many others, I haven’t been experiencing the constant issue of TP Link devices going unavailable but since I’ve upgraded only some but random ones will go unavailable until I reload the integration. From that point onwards, it’s stable. I have some LB130 and HS100 devices.

1 Like

Yeah I never have either. But I started to with this release. I think the manual definition helps here too btw. You may want to consider trying that.

ok, after updating to 2021.4.4/5 , 1 of 3 min_max sensors refuses…

on this config which has always been there:

  # https://www.home-assistant.io/components/sensor.min_max/
  - platform: min_max
    name: Mean indoor temp
    type: mean
      - sensor.temperatuur_living
##      - sensor.laundry_sensor_calibrated_temperature # te koud voor gemiddelde
      - sensor.dining_table_sensor_calibrated_temperature
      - sensor.auditorium_sensor_calibrated_temperature
      - sensor.frontdoor_sensor_calibrated_temperature
      - sensor.library_sensor_calibrated_temperature
      - sensor.dorm_sensor_calibrated_temperature
      -  etc etc

i have set logger to

  homeassistant.components.min_max.sensor: debug

but there is exactly nothing in the logs on min_max… not even ‘setting up domain min_max’


# https://www.home-assistant.io/components/sensor.min_max/
  - platform: min_max
    name: Mean Indoor lux
      - sensor.laundry_sensor_light_level
      - sensor.corridor_sensor_light_level
      - sensor.auditorium_sensor_light_level
      - sensor.library_sensor_light_level
      - etc etc
    type: mean
    round_digits: 2

works just fine, so I can be positive the platform/integration is live. All individual calibrates sensors are available and have a correct state.

Did anyone else notice different behavior om min_max?

Which manual definition are you referring to? My devices already use reserved DHCP IPs.

The Kasa app works fine. It’s just when HA starts that the logs say it can’t communicate with some devices.

I mean instead of letting HA do its think with the integration, I mean manually defining the IPs and type in the configuration.yaml like the paste above and turning off discovery.

Thanks, I’ve done that from day one already.

1 Like


Is the 4.5 removed? Should I downgrade?

Its weird. I had this happen too and ignored it and it went away. There’s some bug with the upgrader I think.

Nevermind this issue:
somehow the integration created a secondary mean_indoor_temp_2 sensor. Deleting the original (without the suffix) and restart made it reappear.

Still don’t understand why I don’t see any logging of the component though.

Has anyone else been having issues in HomeKit integration with locks? I installed 2021.4.4 and lost my lock from HomeKit. Upgraded to 4.5 and still no lock.
I have tried in selecting locks domain, going through the flow, reloading the integrations can then selecting the lock domain and selecting the entity on the include page but still have nothing come into Home.
My lock is Danalock, connected to HA via zigbee (using ZHA). The lock works fine from HA, just the entity won’t appear in Home.

EDIT. Found the answer on GitHub page - locks need to be setup in accessory mode (new bridge)

Update:- Blueprint Automation issue is being tacked by this issue :- Fix race when restarting script by emontnemery · Pull Request #49247 · home-assistant/core · GitHub

That PR isn’t specifically about Blueprints. It fixes an error reported in this Issue which can be replicated with a simple script. The situation is caused by any script using mode:restart.

Hello, I am having what I think is a memory leak issue since I installed 2021.4. My Raspberry Pi 4 4GB stops responding every few hours and I have to unplug and replug it before it works again. RAM usage sits at 8% at startup, but now after a few hours it’s at 35% and climbing. What can I do to identify the issue?

My Pi4 4GB is sitting happily around 40% and is quite stable. Maybe you have an addon using up the CPU usage? My CPU is sat around 10% and I have quite a few add-ons running including NodeRed.

This is running the latest HAOS but I was running supervised until a week ago and that had no issues either.

Unless it runs out of memory it shouldn’t be an issue.

CPU is sitting at 4% right now, RAM has come down again to 23%. How could I determine what is causing the crashes? I have looked at the logs but I don’t really know what I’m looking for.

Is it crashing or just getting busy ? Are you running off an SD card or preferably an SSD? Could be a corruption on the SD card if you are.

I’m on an SD card but it is quite big, 128GB and only a few months old so I don’t think it is worn out. Also the crashes started the day I updated to 2021.4. It is crashing or at least it looks like it, automations stop working and I can’t access the web portal.

look for errors in your logs and correct them.