Kinda difficult and/or annoying to create a simple automation when I only have options for a Device and not an Entity. Is there a reason a Squeezebox being a physical device is not a Device?
Donât get too hung up on devices. Most triggers and conditions are (numeric) state triggers/conditions and must actions are performed by services that work on entities. Advantage of services is you can use a list of entities, which you cannot do with device actions. Also templating is supported on services, but rarely on devices.
All I want to do is something simple like âpush this button - turn the device on/offâ but when the Automation setup in the UI doesnât give an option for Entity, only Device you canât do it simply. How is this a good design? Yet another thing OpenHAB does better and keeping me from fully jumping ship.
The UI will do service: light.turn_on, entity: light.bedroom just fine. And all buttons I know are devices.
The problem with devices actions is that some of my lights have 90 actions I can perform on them, so that is not exactly fun to do from the gui either. Just takes some getting used to to pick service.
Ah, still complaining about HA and comparing it to OpenHAB I see. And still hung up on devices. I suggest you take time to learn about home assistant services as thatâs how everything turns on and off. The UI does give you this option. Hereâs what it looks like.
Call Service gets the job done in this case. Sill a bit convoluted if you ask me.
I found it as you posted. And yes, Iâm still comparing. The more I learn the better off I can be to help others at some point.
I will give it to you that the dashboard UI is all about entities, and automations take a different approach. On top of that automations put the not so useful device option in there as the first pick, while it is not the best option in most cases. Add to that that templating is all about creating entities too. You cannot even create devices outside an integration. So it is weird, but once you know what option to pick itâs not a deal breaker anymore.
My most used options are:
- Button triggers: device
- Other triggers and conditions: (numerical) state
- Actions: service.
It is rarely something different. âRealâ event triggers I try to avoid, since they are way too hard to remember.
Specifically for Squeezebox I use service calls,
random albums, tracks, radio and more according to the documentation and it works great including TTS voice notification. Start, stop, pause and more. I canât allow the integration of LMS Squeezebox in HA, it works reliably.
The automation editor defaults to device for both trigger and action, which leads to people to think device is the only option. Those people need to learn what dropdowns are for.
It isnât about the drop down. Itâs about the fact that most other hardware are classified as Device where as a Squeezebox is an Entity. In the drop down there wasnât an Entity option so it wasnât clear the âCall Serviceâ was the intended target. Just looking for continuity.
Kinda historical, there werenât originally devices in HA, only entities. The squeezebox integration predates devices. No one has changed it. I imagine it is not a priority.
Once you get used to the idea, services are great, and are right at the heart of HA.
Long may it NOT be a device.
Itâs easy to see what an automation is doing in the YAML editor - when itâs entities. But if an automation is doing things with devices, or triggering on devices - then you just get a device ID in the YAML, which is of no help to humans.
But why devices are there in automations and entities are not (while they are the things you control from the UI), remains a mystery. It is one of the things that stump new users, me included. And I used to be a professional developer.
Then again, adding yet another way of doing things is also not great. So I learned to accept it.
Entities are there.
Not as a trigger type, condition type or action type. That is what confuses a lot of people because that is what they expect. But device is there, but I guess almost half my entities are not linked to a device.
Thatâs because entity does not make sense there. Get with the programme.
So device does? And if so why does controlling entities in the dashboard make sense? And why are devices not the main controls in the dashboards, if that is the default in scripts and automations? I know how it is all supposed to work, but that does not mean it is intuitive or even consistent. It is not.
Iâm sorry, your spot on replies are not elitist enough. /humor