Hey folks,
I’m crossposting from reddit, since the forums seem to be a more sensible place to ask this question. I’m unsure about what exactly constitutes a “device” in HA. Let me elaborate with an example.
I’m using homeassistant for some time now and I’m slowing adding my own appliances, in particular DIY ESP8266-based things. I’m connecting these devices via MQTT + autodiscovery. So far, all my (physical) devices were single-purpose, single-location, so no issue arose. Now, I’m adding a shutter controller which resides in the electrical cabinet (I’m not sure whether this is the correct word, I’m not a native) and switches several relays controlling shutters at various locations in my house.
Here comes the question: How do I map this scenario correctly into HAs device registry? I’m unsure about the definition of “device” (see Device Registry), since the controller (ESP) and the shutters are in distinct locations. I see three options sort of compatible with the documentation:
- Each shutter motor (which is just a dumb device) is a separate device + a single entity
- Each shutter is a different device + I add the ESP chip as
via_device
without any entity attached to it. (or rather 1.b) - The ESP is the device, the shutter motors only are entities.
The docs don’t seem to be too clear on this topic. In practice probably all of these options work, but I’m a bit obsessed with doing things the “right way”
EDIT: Made the title a bit clearer.