Back
Button widget Button press. 2Smart Cloud Switching.

Toggle 2Smart Cloud sensor when Button widget is pressed

Connect

How this automation works

Control your 2Smart Cloud sensor instantly with a single tap. This Applet runs whenever you press the Button widget, toggling the selected sensor between its on and off states. Ideal for quick smart home control or manual overrides for connected devices. Note: Install the IFTTT app and add the Button widget to your home screen.

If
Button widget icon
Realtime trigger
Realtime Applets run after the trigger service notifies IFTTT of a new trigger event. Since IFTTT is notified proactively of new trigger events, realtime Applets normally run within a few seconds of a trigger event occurring.
This trigger fires every time you press the button.
ShareURL Latitude Longitude LocationMapURL LocationMapImageURL OccurredAt
Then
2Smart Cloud icon
Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action will switch the state of the sensor to the opposite.
sensor

Services used in this Applet

Create your own Button widget and 2Smart Cloud workflow

Create custom workflows effortlessly by selecting triggers, queries, and actions. With IFTTT, it's simple: “If this” trigger happens, “then that” action follows. Streamline tasks and save time with automated workflows that work for you.

20 triggers, queries, and actions

Button press

Realtime trigger
Realtime Applets run after the trigger service notifies IFTTT of a new trigger event. Since IFTTT is notified proactively of new trigger events, realtime Applets normally run within a few seconds of a trigger event occurring.
This trigger fires every time you press the button.

Color value changed

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when the color value of the selected sensor is changed.

Enum value changed

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when the value of the selected enum sensor is changed.

Set any value for string or numeric sensor

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when value of the selected sensor is changed.

Set conditional value

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when numeric sensor is changed to conditional value.

Set specific value for digital and string sensors

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when the value of the selected string or numeric sensor is changed to specific

Status changed

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when the device status changes.

Status offline

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when the device goes offline.

Status online

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when the device comes online.

Switched

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when the state of the selected sensor is reversed.

Turned off

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when the selected sensor is disabled.

Turned on

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when the selected sensor is enabled.

List sensors and values

Pro plus icon
Query
A query lets your Applet retrieve extra data that isn't included in the trigger, so that your automation can include more complete or useful information.
This query returns a list of user devices sensors and their values

Disabling

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action will disable the selected sensor.

Enabling

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action will enable the selected sensor.

Setting color value

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action will allow choosing a color for the sensor.

Setting enum value

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action will allow choosing a value of the enum type sensor.

Setting numeric value

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action will allow setting a value of the numeric type sensor.

Setting string value

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action will allow setting a value of the string type sensor.

Switching

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action will switch the state of the sensor to the opposite.

Button press

Realtime trigger
Realtime Applets run after the trigger service notifies IFTTT of a new trigger event. Since IFTTT is notified proactively of new trigger events, realtime Applets normally run within a few seconds of a trigger event occurring.
This trigger fires every time you press the button.

Color value changed

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when the color value of the selected sensor is changed.

Disabling

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action will disable the selected sensor.

Enabling

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action will enable the selected sensor.

Enum value changed

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when the value of the selected enum sensor is changed.

List sensors and values

Pro plus icon
Query
A query lets your Applet retrieve extra data that isn't included in the trigger, so that your automation can include more complete or useful information.
This query returns a list of user devices sensors and their values

Set any value for string or numeric sensor

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when value of the selected sensor is changed.

Set conditional value

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when numeric sensor is changed to conditional value.

Set specific value for digital and string sensors

Polling trigger
Polling Applets run after IFTTT reaches out to the trigger service and finds a new trigger event. These trigger checks occur every 5 minutes for Pro and Pro+ users, and every hour for Free users.
This trigger fires when the value of the selected string or numeric sensor is changed to specific

Setting color value

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action will allow choosing a color for the sensor.

Setting enum value

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action will allow choosing a value of the enum type sensor.

Setting numeric value

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action will allow setting a value of the numeric type sensor.

Build an automation in seconds!

You can add delays, queries, and more actions in the next step!

More on Button widget and 2Smart Cloud

About Button widget

Make buttons and control other services with a single tap. This service creates widgets that you can use from the home screen of your Android or iOS device.

Explore Button widget

More integrations with Button widget

About 2Smart Cloud

Manage 2Smart Cloud IoT devices and configure their integration with other services.

Explore 2Smart Cloud

More integrations with 2Smart Cloud

IFTTT helps all your apps and devices work better together

Get started for free