Toggle
The toggle tile allows you to control devices that require two states to function, as for example an on-off switch, an open-close door, an active-inactive service and so on.
- Any toggle tile can work both as a sensor (i.e. only passively receiving a state) and as actuator. In the latter case, whenever the user presses the tile, the
on
payload will be sent if the current state isoff
and vice versa. If the state is not set or not recognized, theon
state will be be sent by default. -
Tip
You can override the default behavior when sending a payload from a unrecognized state via the dedicated tunable.
- Different icons and color can be set to be shown when the state is
on
oroff
. In theunknown
state, the tile's icon and color will be used instead. -
Warning
The state of the tile is determined by the value received on the
state topic
(input topic). If this topic is different from thecommand topic
(output topic) the tile's state will not be updated when a new value is sent. This may lead to unwanted behavior.
Tunables
payload_default_off
: overrides the default behavior and sends theoff
payload instead of theon
one when the tile's state isunknown
.