Toggle switch

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.

Adding the widget to your dashboard

To add the toggle switch widget to your dashboard, follow these simple steps:

  1. Open your Homey app and go to the Dashboards section.

  2. Enter Edit Mode and select the "Add Widget" button.

  3. Select "Apps" at the top and look for the app called "DataVista".

  4. Look for the "Toggle switch" widget. You can easily identify it by the preview image (as shown below).

  5. 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.

Toggle switch widget preview

Configuring the widget

The widget has the following configurable settings:

Setting
Description

Datasource

Select either a DataVista boolean value*, device capability or Homey variable to use as the switch value.

Refresh Interval

When a device capability or Homey variable is selected, this determines how often the widget updates to reflect new values.

Show name

If checked the name of the datasource will be displayed in the widget.

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

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 here.

FA icon code if false

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 here.

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 instead of the datasource name.

FAQ

Why is the switch animating between on and off?

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.

Why is my toggle icon showing as a square box?

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).

Last updated