Hey,
I’ve been trying to follow this template to get my Lifx lights to dim when I play media using VLC on my desktop computer. I’ve tested the scenes and they work properly but I’m unsure how to connect my Pi to my desktop PC so that it listens to my computer to see if any media is being played.
# Example for my telnet one
media_player:
- platform: vlc_telnet
name: speaker_1
host: IP_ADDRESS
password: PASSWORD
OR
media_player:
- platform: vlc
name: speaker_1
arguments: '--alsa-audio-device=hw:0,0'
scene:
- name: Bedroom normal
entities:
light.bedroom_lights:
state: on
transition: 2
brightness_pct: 100
light.bedroom_lights_2:
state: on
transition: 2
brightness_pct: 100
- name: Bedroom dim
entities:
light.bedroom_lights:
state: on
transition: 2
brightness_pct: 20
light.bedroom_lights_2:
state: on
transition: 2
brightness_pct: 20
automation:
- alias: "Media player paused/stopped"
trigger:
- platform: state
entity_id: media_player.speaker_1
from: 'playing'
to: 'idle'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
service: scene.turn_on
entity_id: light.bedroom_lights
action:
service: scene.turn_on
entity_id: light.bedroom_lights_2
- alias: "Media player playing"
trigger:
- platform: state
entity_id: media_player.speaker_1
to: 'playing'
from: 'idle'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
service: scene.turn_on
entity_id: scene.bedroom_normal