[quote=“a-lurker, post:10, topic:200515”]
I can, but it will be for Vera only at this time. Does that work for you?
Does that mean it will not work with openLuup and / or AltUI?[/quote]
OK. I think I’ve got everything sorted. It’s in the AltAppStore. Additional files are installed for openLuup.
The current Github master release also has my effort at support for tri-state switches, but there’s no UI yet to create one. So, to create a tri-state switch, you do this:
[ol][li]Add a new virtual switch on the Switchboard control panel; it will be created as a binary switch;[/li]
[li]Go into the control panel for the new switch, Advanced tab to get to its attributes;[/li]
[li]Convert the switch by setting its “device_json” attribute to [tt]D_TriStateSwitch1.json[/tt] and its “model” attribute to [tt]Switchboard Virtual Tri-state Switch[/tt]. I recommend copy-paste, as the particular/peculiar capitalization is important.[/li]
[li]Reload Luup and hard-refresh your browser.[/li][/ol]
The new switch should then have a three-button UI, and clicking on the switch icon in the Switchboard control/status panel should roll it through off-on-void states. The values and actions are the same as those used for the old Virtual Switch plugin (specifically target/status “2” is the void/third state).
There is a bug in current ALTUI that affects the UI for the tri-state switch type, so void state is not accessible here on ALTUI. I’ve made amg0 aware and he’ll get to it when he’s able; it’s not critical.
Also note that both UI7 and ALTUI require page refreshes when you change visibility to get a display consistent with settings. It’s just a thing you need to do.
Edit: fix filename (2019-02-18)