GPIO Inputs used in input board, presented as Event entity in Home Assistant. It works only with Home Assistant 2023.8 and newer!
Event entity sends mqtt message for actions single
, double
and long
presses.
event:
- id: IN_29
pin: P8_36
actions:
single:
- action: output
pin: light
action_output: toggle
{pin}
) - uniquely identifies this device in MQTT and Home Assistant.P9_33
.gpio
, allowed_values: ['gpio', 'gpio_pu', 'gpio_pd', 'gpio_input']
) - How to run this gpio. gpio means default gpio mode. gpio_pu = gpio pull up, gpio_pd = gpio pull down, gpio_input - to be checked.['new', 'old']
) - There are 2 detector algorithms in dev version. Old consumes more CPU, but we got feedback that it works for everyone. new is more optimized, but needed users to test it. To get it done we introduced this option.["button", "doorbell", "motion"]
) - Type of device to see in Home Assistant.['switch', 'sensor']
) - Type of device to send to Home Assistant. This kind indicate actions you can use.['mqtt', 'output', 'cover']
) - action type. Output and cover means that command is send directly to output relay or cover. This mode doesn’t need network to work. Mqtt mean that there is extra action send to mqtt. For example you can directly control second boneIO!output
or cover
.mqtt
action is chosen['toggle', 'open', 'close', 'stop', 'toggle_open', 'toggle_close']
) - action to perform on cover
type action. toggle
is actions between open/close. toggle_open
means actions between open/stop, toggle_close
means actions between close/stop.['toggle', 'on', 'off']
) - action to perform on output
type action.mqtt
.