|Proconductor: Home Assistant Community|
Availability: included in thepersonale HUB Home Assistant
Type: components Home Assistant
Implementation difficulties: elementary
The "Input Boolean" component di Home Assistant allows to define in domotics of entity that remind of "switches", only in this case they are virtual: these entities have only two possible states: “on" and "off"
This element it is convenient especially when defining automations: it is useful to be able to use the status of these entities both as a trigger for automations, script and more, or use it as condition of one or more automations (ie: execute an automation, when it triggers, only if - for example - a certain "boolean input" is "off" or "on").
Define an entity "Input Number" it's very simple. An example of configuration in configuration.yaml is the following:
input_boolean: avoid_vacuum: name: Inibizione aspirapolvere initial: off
|input_boolean||Defines the configuration block relating to the "Input Boolean" (multiple can be defined).|
|name||(String, optional) defines the name of the entity|
|initial||(Boolean, optional) starting position when starting Home Assistant of the entity ("true"Or"false“).|
|icon||(String, optional) the icon to associate with the entity.|
If the "Recorder" component is active, the boxes / sliders maintain, even after a restart of Home Assistant, the last recorded status, as long as the variable "initial” no is valued.
The one to follow is an example of automation in which a input_boolean is used as condition of an automation. Upon activation of an occupancy sensor ("binary_sensor.motion_garage"), In case theinput_boolean named "input_boolean.notify_home"Is active, then automation profollows e prosees to send a notifies Pushbullet:
automation: alias: Arriving home trigger: platform: state entity_id: binary_sensor.motion_garage to: 'on' condition: condition: state entity_id: input_boolean.notify_home state: 'on' action: service: notify.pushbullet data: title: "Domotica" message: "Ciao, sono a casa!"
|ATTENZIONE: remember that there is on our FORUM community an ad hoc section dedicated to Home Assistant, for any doubt, question, information on the specific merit of these components.|