0.56.0 killed all my automations

I just upgraded Hassbian to 0.56.0 and now none of my automations work. I narrowed it down to the fact that for some reason in 0.56.0 it is ignoring the names I have given devices in the configuration. so here is an example of the configuration for a light switch:

switch 4:
platform: tplink
scan_interval: 1
host: 192.168.170.132
name: SideDoor

Now when I look at the logs this is what it shows when I turn that switch on:
[homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state switch.unnamed_device_2=on; friendly_name=Side Door Switch …

So why is it calling it “switch.unnamed_device_2” now instead of “switch.sidedoor”? Note that this worked perfectly before I upgraded.

Edit: I should mention that all my automatons involve Tp-link switches/plugs

Getting the similar problem it would appear - [homeassistant.helpers.entity] Update for media_player.unnamed_device_4 fails.

Same here tplink switches stopped working as their entity ids show up as unnamed devices and not friendly names like before.

Looks there were two changes to HA relating to TP-link switches recently:
In 0.56: switch.tplink, light.tplink: bump the pyhs100 version and adapt to api changes (@rytilahti - #9454)
In 0.55: TP-Link Switch: Attribute names now uses underscores and unnecessary capitalization was removed. (@djchen - #9607)

Not sure which of these broke it because I never installed 0.55. How would one go about reporting this bug to the people that made these changes? I’m not familiar with the process there

Can you try:

switch_4:
  platform: tplink
  name: "side door" 
  host: 192.168.170.132
  scan_interval: 1

Just tried it and it made no difference unfortunately. Now says it is “switch.unnamed_device_5”. The number at the end seems to change every time home assistant is started

when you go to the developer tools and view the state, what does it say for switch.unnamed_device_5?

It just says “friendly_name: Side Door Switch” and the state is off
It seems to now be pulling the “friendly_name” from what I named it in the tp-link kasa app rather than what I named it in the configuration.

Also just to add to this, I downgraded to 0.55 and everything works perfectly. So the change that killed it was definitely this one

0.56: switch.tplink, light.tplink: bump the pyhs100 version and adapt to api changes (@rytilahti - #9454)

You’ll have to create an issue on the github and let rytilahti the contributor for the latest pull know

This worked fine in 0.55.

I think the problem is here, PR# 9454 in homeassistant/components/switch/tplink.py. This stuff was taken out in the init section:

-        # Use the name set on the device if not set
-        if name is None:
-            self._name = self.smartplug.alias
-        else:
-            self._name = name

and replaced with:

+        self._name = None

then later, this was added in the update routine:

+            if self._name is None:
+                self._name = self.smartplug.alias

So - what it looks like is happening is that the name set in configuration.yaml is always ignored. Maybe this can be fixed by rolling back the change in the init section…

This same issue is affecting multiple components, including Sonos and Nest - maybe more clues there as to what has happened:

Interesting. In any case I have created issue #10020. First time using GitHub actually :slight_smile:

All my Sonos devices have been renamed since the .56 update
media_player.unnamed_device playing
media_player.unnamed_device_2 playing
media_player.unnamed_device_3 playing
media_player.unnamed_device_5

1 Like

Looks like the 0.56 issues are stacking up on github. I was having some weird issues with aiohttp. I’m not going to bother with it until 56.1.

Same issue here with all my Sonos players since upgrading to .56

media_player.unnamed_device
media_player.unnamed_device_2
media_player.unnamed_device_3
media_player.unnamed_device_4

The issue with unnamed devices in 0.56.0 has been identified and will be fixed soon.

7 Likes

Confirmed 0.56.1 fixes the unnamed devices problem. But heads up for others with the tp-link problem, the name of the devices are now based on what you name them in Kasa and not based on what you name them in the configuration.yaml. So you’ll need to update your automations and groups to reflect the new names.

2 Likes

That seems to be a different bug that is also getting fixed …

1 Like

I’ve updated to 0.56.2 and my TP-Link switches are still unnamed. I’ve also noticed that on reboot the unnamed sequence of devices would be shuffled even though the switches are assigned static IPs by the router.

TP-Link component documentation is still not updated too.