๐Modules Settings
User defined settings for the modules that support them
SystemD
Not all services on a machine are needed to be controlled or monitored through a switch, so they need to be configured manually by adding this on your config.yaml file:
settings:
systemd:
- docker.service
- anydesk.service
Docker
If no configuration is provided, then all the available docker containers will be exposed. This can be configured to only show the ones in the included list or ignore the ones in the exclude list:
settings:
docker:
include:
- esphome
exclude: []
GPIO
This is only supported by Raspberry Pi and needs to be configured manually on your config.yaml file:
settings:
gpio:
inputs:
- name: Front Door
pin: 13
device_class: door
outputs:
- name: Siren
pin: 25
icon: mdi:bullhorn
IR Remote
This is only supported by Raspberry Pi and needs to be configured manually on your config.yaml file:
settings:
ir_remote:
receiver: 18
transmitter: 23
buttons:
- name: PC Speaker
data: [9084, 4360, 652, 462, 652, 1587, 652, 462, 652, 462, 652, 462, 652, 462, 652, 462, 652, 462, 652, 462, 652, 400, 652, 462, 652, 462, 652, 462, 652, 1587, 652, 462, 652, 1587, 652, 462, 652, 462, 652, 462, 652, 462, 652, 462, 652, 462, 652, 462, 652, 1587, 652, 1587, 652, 1587, 652, 1587, 652, 1587, 652, 1587, 652, 1587, 652, 1587, 652, 462, 652]
icon: mdi:speaker-wireless
In this example, the IR Receiver (TSOP38238) is connected to GPIO input pin 18 and an IR LED is connected to the GPIO input pin 23.
You also need to start the pigpio
daemon and it should start when the OS boots. This can be done with these commands:
sudo systemctl enable pigpiod
sudo systemctl start pigpiod
Keyboard Hotkeys
This is used to run remote commands to your Home Assistant instance using keyboard shortcuts. Pynput is used for the keys syntax and the monitoring of presses.
settings:
hotkeys:
- key: <ctrl>+<alt>+s
type: state # Shows a notification using zenity with the state of the entity
entity_id: light.myroom
- key: <ctrl>+<alt>+a
type: action # Perform an action on Home Assistant
service: light.toggle
entity_id: light.myroom
- key: <ctrl>+<alt>+z
type: conversation # Sends a predefined text to Home Assistant and displays a notification with the result
text: What is the water heater temperature?
- key: <ctrl>+<alt>+x # Same as conversation, but a zenity popup with an entry is displayd for the user to write
type: popup
- key: <ctrl>+<alt>+q # Creates a sensor on home assistant, without any further configuration
Bash
Using this option you can create sensors
, binary_sensors
, buttons
or switches
that run custom commands. These options are optional: unit, entity_category, update_interval.
settings:
bash:
allow_any_command: false
expose:
- name: Prune Docker
type: button
command: docker system prune -af
- name: Load 1minute
type: sensor
command: cat /proc/loadavg | awk '{print $1}'
unit: load
- name: WiFi Exists
type: binary_sensor
command: ip a | grep wlan0
- name: Microphone Mute
type: switch
command: amixer get Capture | grep "\[off\]"
command_on: amixer set Capture nocap
command_off: amixer set Capture cap
There are some optional options:
settings:
bash:
expose:
- name: ....
type: ....
command: ....
icon: mdi:script-text
entity_category: config # config or diagnostic
update_interval: 300 # Minimum is the update_interval
sensor_timeout: 10 # Timeout info command, defaults to 3 sec
command_timeout: 30 # Timeout control command, defaults to 120 sec
Disk usage
By default this module finds all connected drives and exposes them to Home assistant, but this can be changed by setting them manually on settings with the include_disks option:
settings:
disk_usage:
include_disks:
- /dev/sda
- /dev/sdb
Using the exclude_disks option it finds all connected drives, but excludes from exposing the ones in this configuration:
settings:
disk_usage:
exclude_disks:
- /dev/sda
- /dev/sdb
Mounts usage
Checks the usage of mounted volumes on the system. If autocheck is true
, it will use the Gnome GVFS to find volumes mounted by the file browser.
settings:
mounts:
autocheck: false
directories:
- /mnt/mymount
Last updated