Components Home Assistant "Input Boolean"

1 minutes of reading
Proconductor: Home Assistant Community
Availability: included in thepersonale HUB Home Assistant
Category: software
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"

Home Assistant - Input Boolean
examples of Input Boolean implementation.

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:

  name: Inibizione aspirapolvere
  initial: off


input_booleanDefines 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“).
Default: "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 "initialno is valued.

Automation examples

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:

  alias: Arriving home
    platform: state
    entity_id: binary_sensor.motion_garage
    to: 'on'
    condition: state
    entity_id: input_boolean.notify_home
    state: 'on'
    service: notify.pushbullet
      title: "Domotica"
      message: "Ciao, sono a casa!"

Home Assistant Official LogoATTENZIONE: 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.

Please comment below