Core: Automations with ZHA triggers don't work in 0.107

Created on 19 Mar 2020  路  39Comments  路  Source: home-assistant/core

The problem

After updating to 0.107 all my automations that were triggered by events from ZHA devices(mostly Xiaomi wall switches) stopped working.

HASS starts up with the following notificaiton:

The following integrations and platforms could not be set up:
 - automation

In log I see a bunch of similar lines:

[homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16).

Environment

  • Home Assistant release with the issue: 0.107.1
  • Last working Home Assistant release (if known): 0.106.0
  • Operating environment (Hass.io/Docker/Windows/etc.): ArchLinux repo installation, reproduced in Docker
  • Integration causing this issue: Automation
  • Link to integration documentation on our website: https://www.home-assistant.io/docs/automation/

Problem-relevant configuration.yaml

- alias: Toggle hall light on switch press
  trigger:
  - device_id: 323f65f38ef74ac0a74cb45b3469a774
    domain: zha
    platform: device
    subtype: button_1
    type: remote_button_short_press
  action:
  - service: light.toggle
    data:
      entity_id: light.ikea_of_sweden_tradfri_bulb_e27_ws_opal_1000lm_23de36fe_level_light_color_on_off

Traceback/Error logs

[homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16).

Additional information

zha

All 39 comments

Hey there @dmulcahey, @adminiuga, mind taking a look at this issue as its been labeled with a integration (zha) you are listed as a codeowner for? Thanks!

what specific model do you use for the device?
If you remove that automation from configuration, would automation load?

I need to know the specific device that the trigger is for. Also, we have guards that should raise appropriate exceptions to prevent the automation component from blowing up so I am a bit confused...

There must be a traceback associated with this?

@Adminiuga @dmulcahey the tricky thing here is that all the rest automations are working. If I remove all automations related to the wall switch - I get no error logs and no notification about broken automations.

The device model is lumi.remote.b286acn01

@dmulcahey no tracebacks, just the log line I mentioned

how was the automation originally created?

Manually in a yaml file. But I also can answer the other question: if create a similar automation using UI - I get the same result.

I've just rolled back the docker image to 0.106.6, same config is working fine

interesting...

Tomorrow I'll try to reproduce it in a more isolated env. Maybe it's some sort of interference with other config/devices/whatever

Hrm, in hassio I can't create automations from automations tab or from devices tab. Same works fine in venv

~hrm another question... Is the ZHA component itself even loaded? Or are there other tracebacks in the log?~ Missed the first response... I'm assuming that means ZHA is working.

on 107.1 can I have a screenshot of the lumi device in that ZHA config panel?

also, please post the automations.yaml file and the log file itself... It's hard to debug things with cherry picked info

yes, please enable Debug log level for

  • homeassistant.components.automation
  • homeassistant.components.zha
  • zigpy

can DM log to me or Dave on discord

in my tests on 107.1, I can only reproduce the problem if the device_id is wrong. But even the, the start is fine, it is the reload where it fails.

Try 0.107.2 it has a fix which might fix your issue too

0.107.3 now

The speed you guys release new versions is freaking mad馃槅

But... did it fix the issue @zhulik ? :)

Haven't checked it yet, sorry.

Ok, I've just pulled the 107.3 docker image. Same situation:

home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16). 
home-assistant   | 2020-03-20 22:16:51 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]:  (See /config/configuration.yaml, line 16).

Each line is related to an automation with a ZHA trigger.

Please provide what we asked for previously

@dmulcahey a screenshot of the ZHA panel with the device: https://i.postimg.cc/13G7FYmt/Screenshot-20200320-222333.png. There is a lot of logs when the debug options are switched on. I'll ping you in Discord

Thanks

i think we know what the problem is. Fix gonna be interesting

@Adminiuga can you provide some details? I'm really curious

the problem is with ZHA loading the devices after the ZHA platform is setup, but automation tries to validate those prior the zha device gets actually loaded

@Adminiuga thanks! Feel free to reach me if you need help with testing

@Adminiuga seems like you're right: after reloading the automations using the server control UI they started working.

thanks for confirming.
Are you running Hass, Docker or Venv?

@Adminiuga currently I'm running home assistant core in docker: image: homeassistant/home-assistant:0.107.3

Can you modify files of the "core" container?
Trying to think of a way to test it

Tell me what exactly I need to modify and I'll figure it out

Would need to modify homeassistant/components/zha files. I think people were running something like docker exec -ti homeassistant_container_name /bin/bash to run a shell inside the container.

@Adminiuga no problem, I can do it

side question: what hardware are you running this one?
For some reason I can't seem to reproduce on Pi3B running "Home Assistant"

@Adminiuga a celeron-based pc from 2013.

Was this page helpful?
0 / 5 - 0 ratings