When I turn "Bed Light" on

Turn a device on or off from its details: its "Turn on" or "Turn off" button when it has them (a device that does not report its state), else its Toggle; wait for the app to say the device is so, then close the details. A device that is so already is left as it is.

Examples

When I turn "Bed Light" on
When I turn "Bed Light" off
And we turn "Decorative Lights" off
When I turn "Webship test switch" on
And I turn "Living Room Fan" on

Pattern

When(/^(?:I |we )?turn "([^"]*)" (on|off)$/, …)

Part of @webship-js/home-assistant-steps (github.com/webship/home-assistant-steps), a step pack for Webship-js 2.0.x.