Zombie automation will not go away

I have an automation that I have deleted from the UI and automation.yaml but it keeps resurrecting itself like a zombie.

The Setup
I am using a blueprint :video_game: ZHA, deCONZ, Zigbee2MQTT - Ikea E1743 On/Off Switch & Dimmer Universal blueprint - all actions + double click events - control lights, media players and more with Hooks.

What I do
When I create an automation with this blueprint and only choose the first two items, that I"m using ZHA and choose which device is the controller. Everything is fine.

The Problem
But, when I add the first automation then the zombie returns. By zombie, I mean that I see an error in the logs that has text and actions from an automation I deleted weeks ago for that blueprint.
Here is that log:

Logger: homeassistant.components.automation
Source: components/automation/__init__.py:628
Integration: Automation (documentation, issues)
First occurred: May 6, 2021, 8:36:00 AM (4 occurrences)
Last logged: 3:13:51 PM

Blueprint Controller - IKEA E1743 On/Off Switch & Dimmer generated invalid automation with inputs OrderedDict([('integration', 'ZHA'), ('controller_device', '24092ae49411026bba2401479195a7f1'), ('action_button_up_short', [OrderedDict([('service', 'input_boolean.turn_off'), ('target', OrderedDict([('entity_id', 'input_boolean.guest_mode')]))]), OrderedDict([('service', 'notify.alexa_media'), ('data', OrderedDict([('message', 'Guest mode off.'), ('data', OrderedDict([('target', ['media_player.alexa_media_living_room_echo_dot', 'media_player.alexa_media_family_room_echo_dot'])]))]))])]), ('action_button_up_long', [OrderedDict([('service', 'input_boolean.turn_off'), ('target', OrderedDict([('entity_id', 'input_boolean.guest_mode')]))]), OrderedDict([('service', 'notify.alexa_media'), ('message', 'Guest mode off.'), ('data', OrderedDict([('type', 'tts')])), ('target', ['media_player.alexa_media_living_room_echo_dot', 'media_player.alexa_media_family_room_echo_dot'])])]), ('action_button_down_short', [OrderedDict([('service', 'input_boolean.turn_on'), ('target', OrderedDict([('entity_id', 'input_boolean.guest_mode')]))]), OrderedDict([('service', 'notify.alexa_media'), ('message', 'Guest mode on for 30 minutes.'), ('data', OrderedDict([('type', 'tts')])), ('target', ['media_player.alexa_media_living_room_echo_dot', 'media_player.alexa_media_family_room_echo_dot'])]), OrderedDict([('delay', OrderedDict([('hours', 0), ('minutes', 29), ('seconds', 0), ('milliseconds', 0)]))]), OrderedDict([('service', 'notify.alexa_media'), ('message', 'Guest mode will turn off in 1 minute. Press the green button to add 30 minutes.'), ('data', OrderedDict([('type', 'tts')])), ('target', ['media_player.alexa_media_living_room_echo_dot', 'media_player.alexa_media_family_room_echo_dot'])]), OrderedDict([('delay', OrderedDict([('hours', 0), ('minutes', 1), ('seconds', 0), ('milliseconds', 0)]))]), OrderedDict([('service', 'input_boolean.turn_off'), ('target', OrderedDict([('entity_id', 'input_boolean.guest_mode')]))])]), ('action_button_down_long', [OrderedDict([('service', 'input_boolean.turn_on'), ('target', OrderedDict([('entity_id', 'input_boolean.guest_mode')]))]), OrderedDict([('service', 'notify.alexa_media'), ('message', 'Guest mode on. Remember to press the red button when you leave.'), ('data', OrderedDict([('type', 'tts')])), ('target', ['media_player.alexa_media_living_room_echo_dot', 'media_player.alexa_media_family_room_echo_dot'])])])]): expected a dictionary for dictionary value @ data['action'][1]['choose'][1]['sequence'][2]['repeat']['sequence'][1]['target']. Got None extra keys not allowed @ data['action'][1]['choose'][1]['sequence'][2]['repeat']['sequence'][1]['message']. Got None
Blueprint Controller - IKEA E1743 On/Off Switch & Dimmer generated invalid automation with inputs OrderedDict([('integration', 'ZHA'), ('controller_device', '24092ae49411026bba2401479195a7f1'), ('action_button_up_short', [OrderedDict([('service', 'input_boolean.turn_off'), ('target', OrderedDict([('entity_id', 'input_boolean.guest_mode')]))]), OrderedDict([('service', 'notify.alexa_media'), ('message', 'Guest mode off.'), ('data', OrderedDict([('type', 'tts')])), ('target', ['media_player.alexa_media_living_room_echo_dot', 'media_player.alexa_media_family_room_echo_dot'])])]), ('action_button_up_long', [OrderedDict([('service', 'input_boolean.turn_off'), ('target', OrderedDict([('entity_id', 'input_boolean.guest_mode')]))]), OrderedDict([('service', 'notify.alexa_media'), ('message', 'Guest mode off.'), ('data', OrderedDict([('type', 'tts')])), ('target', ['media_player.alexa_media_living_room_echo_dot', 'media_player.alexa_media_family_room_echo_dot'])])])]): expected a dictionary for dictionary value @ data['action'][1]['choose'][0]['sequence'][0]['choose'][0]['sequence'][0]['default'][4]['default'][1]['target']. Got None expected a dictionary for dictionary value @ data['action'][1]['choose'][0]['sequence'][0]['default'][1]['default'][1]['target']. Got None extra keys not allowed @ data['action'][1]['choose'][0]['sequence'][0]['choose'][0]['sequence'][0]['default'][4]['default'][1]['message']. Got None extra keys not allowed @ data['action'][1]['choose'][0]['sequence'][0]['default'][1]['default'][1]['message']. Got None

Here is the automation that I created with the blueprint:

- id: '1620677465985'
  alias: 'Button: Ikea on/off Guest Mode'
  description: ''
  use_blueprint:
    path: EPMatt/ikea_e1743.yaml
    input:
      integration: ZHA
      controller_device: 24092ae49411026bba2401479195a7f1
      action_button_up_short:
      - service: input_boolean.turn_off
        target:
          entity_id: input_boolean.guest_mode
      - service: notify.alexa_media
        message: Guest mode off.
        data:
          type: tts
        target:
        - media_player.alexa_media_living_room_echo_dot
        - media_player.alexa_media_family_room_echo_dot
      action_button_up_long:
      - service: input_boolean.turn_off
        target:
          entity_id: input_boolean.guest_mode
      - service: notify.alexa_media
        message: Guest mode off.
        data:
          type: tts
        target:
        - media_player.alexa_media_living_room_echo_dot
        - media_player.alexa_media_family_room_echo_dot

Now… take a look at the log in the first error message (line 7) and you’ll see a reference to a message Guest mode will turn off in 1 minute. Press the green button to add 30 minutes. that is sent to media_player.alexa_media. Now look at the automation above. That’s not in there!

I did used to have that message in an old version of the Automation, but I deleted it and have restarted many times since then.

Also, when I add an action to the blueprint automation and save the automation, the UI shows the automation greyed out. But, before I add an action it is not greyed out.


Also, notice the name in the screenshot is different from the alias in the above blueprint automation Button: Ikea on/off Guest Mode.

What I’ve tried
I’ve tried restarting, I’ve tried removing blueprint automation from the UI and the automations.yaml and restarting.

I’m at a loss
I’m really not sure where to look to find this zombie automation that keeps reappearing.

Can anyone take a look at this?

if you have access to the HA file system (and it looks like you do), and you are running it on some form of linux, try something like:

grep "press the green button" *.yaml
grep "press the green button" */*.yaml
grep "press the green button" */*/*.yaml
etc

to search for yaml files with the text in it. Not pretty (you could use grep -r to recurse but then you’d need to find out which directory the file is in if it isn’t in the main directory).

Once you find the file (assuming you do), check the file permissions - is it RW by the account that runs HA?

What is you delete the Blueprint itself?

No luck on finding the file via grep. I tried using the “Terminal & SSH” add-on.

sorry - no other ideas… was hoping you would find a file with the text…

I have some of those as well. If I grep for the name they only appear to exist in the database itself.
I probably created thos by deleting old automations too quickly.

Anyone an idea how to get rid of those?

1 Like

I had the same thing. Clicked on the “info” icon and in the left bottom of the popup there was an remove link. Worked for me.