I consider myself a power user of HA and i’d like to get further under the covers in general and start to do some custom front-end and perhaps back end development. I’m a long time developer (C++, Java, Python, plus lots others) and very comfortable with large scale architecture. I’ve read all the developer and other documentation that I believe is out there.
For the life of me i still can’t figure out what a “platform” is or how to think about it conceptually. I fully get the nuances of integrations, devices, and entities/state objects. But in reading the documentation I still can’t figure out what a platform is and how it fits into the architecture. For instance I have the following in my configuration.yaml…
- platform: switch
name: Barn Flood Light
So light is one of the native integrations and i’m defining one of my entities of type “switch” domain (switch.barn_flood_light) as an entity that uses the light integration? What is the switch platform doing in this example?
Sorry for the basic question and if i’ve missed a document somewhere I am happy to do more homework.
Yep been all over that and read it a few times…doesn’t really explain platforms though. Maybe i’m too old school OO developer/architect. Or maybe its just not written well but I can’t make any sense of it for platforms…
Think of the switch platform as the blueprint for the light integration. This blueprint helps the switch platform create the light entity. All the code for the switch platform resides in the switch integration.
The light integration says “Hey switch platform, make me this light, here’s the configuration”. Then the switch integration pops out a light entity.
Ok i’m getting there and i appreciate the help and patience. So can you describe this on an example of a less standard integration/platform. What about this example where I have the media_player integration (i assume?) and the platform is my bluesound streamer. Some code/component somewhere needs to manage the talking to/from the bluesound device. Is that the “bluesound” platform? Interestingly that device is not listed in my devices but it does show up as an entity.