Open ddetton opened 1 year ago
I'm also looking to do this, as I have it currently working with my A/V setup, but my lighting is on a separate controller running D3. I guess we could duplicate and change the name?
Success! Here's what I did:
Works great on my end, was able to integrate my lights!
Nice! I'll be trying this out with four separate domains: lights, thermostats, binary sensors, media. I'll let you know how it goes.
I am trying to get this to work but having a problem. I created four additional folders called crestron-lights, crestron-tstats, crestron-binary-sensors and crestron-media-player. I made the changes to manifest.py and const.py to match each folder name. I added each custom component to the configuration.yaml. When I go to Developer Tools and Check Configuration, I get this:
Is this expected and should I go ahead and restart HA?
Yes, fully restart HA (reloading YAMLs is not enough).
I changed from a single instance of a custom integration called crestron to four separate custom integrations called crestron_lights, crestron_climate, crestron_sensors and crestron_media_players. After an HA reboot, all appear to be working. Initially, it was not working and I could not figure out why. After much trial and error, I discovered that the domain (folder name/platform name) can not have a dash in it. After changing the dash to an underscore and specifying that platform on each entity, all was well. Now I see that you used an underscore in your custom integration. Not sure why I used a dash initially. Thanks for figuring this out. It will make the management of the interface much easier.
Ha, I didn't even know about the dash, got lucky! Glad it's working!
@georgesak Thank you for documenting this process.
I ended up doing this with quite a few domains and it was a bit annoying as source would quickly get out of sync. I wrote a quick bash script which clones my repo, moves the component folder, and updates const.py and manifest.json automatically. The gist can be found here if anyone is interested.
Awesome, thanks for automating that! I wish there was a cleaner way, but I couldn't find any.
Does this component support multiple instances inside a single HA instance? The use case is that I would like to use a pair of xsigs (digitals and analog/serial) for each type of device. For example, I want all my lights in one pair of xsigs, all my thermostats in another pair or xsigs and all my media players in another pair of xsigs. Then I would have a crestron entry in the HA configuration.yaml for each one, each listening on a different port. It would make this much easier to manage on the Crestron side.