hi there,
Im starting a new home assistant installation because my old installation is becomming too unorganized.
But I dont want to do everything from scratch so of couse I want to copy elements from my old installation to the new one.
THE PROBLEM:
If i copy an automation from my old install to the new one it does not work. If I make an automation in the new installation i get a different device_id for my switch (switch.k_ikea)
automation.yaml for my old install:
- id: '1649230104669'
alias: 'Box2: toggle k_ikea'
description: ''
trigger:
- platform: state
entity_id: binary_sensor.esp22_b7_gpio14
to: 'on'
condition: []
action:
- type: toggle
device_id: d4fb55321b27895cddd1ba57ee026617
entity_id: switch.k_ikea
domain: switch
mode: single
same automation in the new installation (via ui) gets a different device_id
automation.yaml for new install:
- id: '1649228719070'
alias: 'Box2: toggle k_ikea'
description: ''
trigger:
- platform: state
entity_id: binary_sensor.esp22_b7_gpio14
to: 'on'
condition: []
action:
- type: toggle
device_id: df0ababed560d611c362eb67795d2d5e
entity_id: switch.k_ikea
domain: switch
mode: single
THE QUESTION:
How to get around this problem with unique device_id’s in different installations of home assistant.
If I can get a list of device_id’s from the old and the new installation I can write som code to change it around (but there must be an easyer solution outthere)
note: I know i dont need the device_id if i use old fashioned yaml for my automations. But apprently this is not the case for using the UI (or maybe im doing something wrong)
br