These are automation ideas that are really useful when Working From Home
Pause media playback when I am on the phone
When my phone is ringing or I am in a call, the media will be paused. This works on any application that I might be using like messenger, viber, etc…
alias: Incoming call billy
description: ""
mode: single
trigger:
- platform: state
entity_id:
- sensor.redmi_note_8_pro_audio_mode
to: ringing
- platform: state
entity_id:
- sensor.redmi_note_8_pro_audio_mode
to: in_call
- platform: state
entity_id:
- sensor.redmi_note_8_pro_audio_mode
to: in_communication
condition:
- condition: or
conditions:
- condition: state
entity_id: media_player.desktop_linux
state: playing
action:
- service: media_player.media_pause
data: {}
target:
entity_id:
- media_player.desktop_linux
Web Camera turns on Light
When I need to use the web camera, the light at my room turns on automatically so that people can see me better.
My Logitech speakers can be controlled via infrared, so when my PC turns on or off, a power command is sent through Broadlink RM Mini 3 remote.
alias: MyPC state change
description: "Turns on or off the speakers of my 🖥 "
mode: single
trigger:
- platform: state
entity_id: switch.my_pc
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: switch.my_pc
state: "on"
sequence:
- service: media_player.turn_on
data: {}
target:
entity_id: media_player.logitech
default:
- service: media_player.turn_off
data: {}
target:
entity_id: media_player.logitech
Notify on Hikvision Line Crossing event
My hikvision camera can recognize when someone has crossed a line that I’ve configured on the camera, so I get a notification on my desktop when this happens.
This is used when you share a video link like youtube. It checks if the media player is available, pauses if something is playing, opens the link on your browser and presses the "f" button to activate the full screen.