Hi - I am new to HA and a novice linux user
I have a raspberry pi I use for network monitoring in the same location as my sound system. I would like to use a Flic button to make the pi play a doorbell sound over the sound system - using the mini jack connection in the pi.
I have installed flic linux sdk and HA using the raspberry pi guide.
The Flic button is recognised in the HA interface and registering button presses, but I have trouble with the automation setup to make it play a sound.
The HA-user can play a sound from terminal using the command
mpg123 /home/homeassistant/.homeassistant/mp3/Doorbell_16.mp3
My configuration.yaml
# add flic button
binary_sensor:
platform: flic# Play mp3-file on pi
switch:
platform: command_line
switches:
mp3_play:
command_on: mpg123 /home/homeassistant/.homeassistant/mp3/Doorbell_16.mp3
My automations.yaml
- id: ‘1525642466888’
alias: Doorbell
trigger:
- entity_id: binary_sensor.flic_80e4da72f202
from: ‘off’
platform: state
to: ‘on’
condition:action:
- service: switch.turn_on
entity_id: switch.mp3_play
Thanks for any help