Device automations
This PR introduces support for Device Automations. It enables a set of predefined triggers that can be used when creating automations. Currently Light+x key sequences on Beo Remote is supported. More keys and sequences can be added in a follow-up PR. Note the Device Triggers are enabled on the gateway device only. Not on the media-player devices.
Two Device Actions are also introduced. "All_Standby" and Virtual Button can now be selected in GUI in the automation editor.
In order to use features for string substitution that are built into frontend the key "subtype" was added to the mlgw events. This is change should be backward compatible.
Thanks for working on this!
Question for you: it was already possible to listen to events to catch the button presses. What does the triggers improvement add to that? I can see how it might be easier to use it in automations because it provides all the dropdown menus with options, but is there any other benefit?
Correct. Device triggers and actions are not giving any real new functionality. It is just a way to simplify for users. You don't have to look up parameters for events or services. Just select what you want in the menus.
Got it. Will look into this on the weekend. Thank you for the contribution.
It would be great if we can get all the beo4 keys to be included in the patch so that we have full support.
I think this is ready for review now. Basically it adds GUI to triggers, actions and services for the mlgw device. Nothing is remove so good old yaml will still work as before.
-
Device triggers are now enabled for light-control events. The GUI in automation triggers support all key combinations that Beo4 can send. There are lots of combinations in the docs from B&O but only a subset is sent from the remote (or passed on by mlgw?). To reduce clutter in the list box, only working key combinations are listed. If you want to trigger on other combinations e.g. LIGHT+Radio, you can use the yaml mode as before.
-
Device actions are enabled for the mlgw device. GUI is added for virtual_button and all_standby.
Thanks @astrandb for the contribution! I have some time next weekend, will review then. At first glance, this addresses my main concern and supports all light actions on the Beo4.