Device Configuration's Automation View question

I have defined Automation actions this way

        "actions": [
            {
                "component": "main",
                "capability": "switch",
                "version": 1,
                "values": [
                    {
                        "enabledValues": [
				"on",
				"off"
				],
                        "alternatives": [
                            {
                                "key": "on",
                                "value": "Set to Motion Detected",
                                "type": "active"
                            },
                            {
                                "key": "off",
                                "value": "Set to No Motion",
                                "type": "inactive"
                            }
                        ],
                        "key": "{{enumCommands}}"
                    }
                ],
                "patch": [],
                "exclusion": []
            }
        ]

Is there any way to remove the Turn on or turn off selection from ST App Routine’s Action View?

Hi, @TapioX
Do you only want to remove “Turn on or turn off” but keep “Turn On” and “Turn Off” options?
I need to check with the engineering team because I believe that one is added by default to the UI.

Hi, @nayelyz

Yes I want only remove “Turn on or turn off ”

Thanks
I’m waiting for a reply.

Why not use the motionSensor capability instead?

        "component": "main",
        "capability": "motionSensor",

motionSensor capability does not support the use of automation actions. motionSensor capability does not have any commands.

Hi @h0ckeysk8er ,

Thank you for your patience. After consulting with the team, it appears that the “Turn on or turn off” option is part of the special UI of the switch capability in automations. Currently, there is no direct way to remove this option from the Action View.

However, the only potential solution at this time would be to create a custom capability that is copied from the switch capability.

Please let us know if you need any further assistance, and we’ll be happy to help!

Thanks @nayelyz and @Luis_Humberto_Medina for checking this up.

1 Like