Sonoff integration - Entities instead of Devices

I’ve installed the official Sonoff integration and with the fix on github everything is working fine.

The only issue I have is that all the items are imported as Entities not as devices.
So in the automation I’m not able to select them:

I’ve found a workaround creating a Scene with and Entity but is not feasible for 30+ switches I have and different possible values… is hundreds on Scenes just for that

What am I doing wrong?

this is the Entity
image

thank you for the help… sorry still quite a newbiew :slight_smile:

You don’t need to use device triggers. Use thinks like state trigger instead.

In fact, I’d recommend against using devices in your automations. You can easily change entity_id of an entity, but you cannot change device_id of a device. That means that if you decide to replace the device with a new one, you’ll need to manually modify all of your automations instead of just changing the new entity’s entity_id.

1 Like

+1 on this, setting up automations based on device triggers had caused some issues earlier for me. Even though entity names did not changed, a change in device ID broke my automations.

@ondras12345 @anon63427907 Ok, I think this is a good idea on the trigger part but how can I manage the action part? I’m not able to select an entity and the property. I need a “dummy” scene to do it.
It’s very complex

Just call a service like switch.turn_on?

- service: switch.turn_on
  target:
    entity_id: switch.your_switch
1 Like