Device_id important?

In some automations it has

device_id: 91a3256852a8az9ecf3468fb9360
entity_id: light.library_light

When I change the base light.library_light, the device_id changes, but the automations will have the old one.

Does it matter? Since there’s no easy way to search all instances of it.

Seems like it matters, but annoyingly there’s no way to show what is wrong or right. Watchman doesn’t check it.

It shows like it’s working, but if you open the device is empty.

image

Makes no sense to use 2 things to name an item.

That’s not the only issue with them. Solution: Don’t use device triggers, conditions or actions.

1 Like

I see. SO I’ll try to change from


type: turn_on
device_id: 18e1age096bew23404e
entity_id: light.hallway_light
domain: light
brightness_pct: 35

to


service: light.turn_on
data:
  brightness_pct: 35
target:
  entity_id: light.hallway_light

Everything is via a service then?
And I guess it’s all manual changeover?

I’m interested to know why there are service: .turn_on
rather than just everything.turn_on

There is a service to turn anything on, homeassistant.turn_on. Likewise for off and toggle. This is handy if you are changing more than one entity and they are from different domains (e.g. a light and a switch).

Is there a service for this?


      switch: sensor.smart_knob_living_action
      button_rotate_right:
        - device_id: 1a039dzsg4bbecb35wab
          domain: light
          entity_id: light.living_room_light
          type: brightness_increase

tbh it doesn’t seem to work well.

- service: light.turn_on
  target:
    entity_id: light.library_light
  data:
    brightness_step_pct: 10