Toggle switch
Last updated
Last updated
The Toggle Switch widget offers a sleek and minimalistic way to display boolean values, such as whether a light is on or off, a door is open or closed, a sensor is active or inactive, or any other binary condition. Its straightforward design ensures clear visibility, making it easy to monitor the status of your devices at a glance.
For advanced users, the widget can accept a boolean value set by a DataVista action card.
To add the toggle switch widget to your dashboard, follow these simple steps:
Open your Homey app and go to the Dashboards section.
Enter Edit Mode and select the "Add Widget" button.
Select "Apps" at the top and look for the app called "DataVista".
Look for the "Toggle switch" widget. You can easily identify it by the preview image (as shown below).
Once you find it, click on the widget preview to add it to your dashboard.
After adding it, you can customize the widget to display the state of specific devices or binary conditions based on your preferences.
The widget has the following configurable settings:
Datasource
Select either a DataVista boolean value*, device capability or Homey variable to use as the switch value.
Refresh Interval
When a device capability is selected, this determines how often the widget updates to reflect new values.
Overwrite name
If set, this value will replace the default name, which is the datasource name.
Color if true
Specifies the color to display when the widget's value is true
.
Color if false
Specifies the color to display when the widget's value is false
.
FA icon code if true
FA icon code if false
Show Icon
Enable to show the capability or device icon (if available), with priority given to the capability icon.
Overwrite Name
If set, this name will be displayed next to the toggle switch instead of the device and capability name.
To use a DataVista boolean value, you must first create a flow that sets this value using a DataVista action card. The flow needs to be run once initially in order to make the value visible and selectable in the widget settings. After running the flow, the value will appear at the top of the list in the Datasource setting.
If the switch is animating between on and off, it indicates that the datasource could not be found (or is no longer available). This typically happens when the selected datasource is removed. To resolve this issue, try reconfiguring the datasource setting and ensure the correct value is selected.
This usually happens when an incorrect unicode value is used. Ensure that the configured unicode value matches a valid free FontAwesome v6 icon (solid style).
Specifies the FontAwesome Unicode code for the icon to display when the widget's value is true
. It must be a free, solid icon from FontAwesome version 6. You can browse available icons .
Specifies the FontAwesome Unicode code for the icon to display when the widget's value is false
. It must be a free, solid icon from FontAwesome version 6. You can browse available icons .