Media
Misc automations specifically for the media players (ex. Apple TV).
Abadoned Players
Turn of a media player that has been paused for an hour.
Usage Ideas
- Turn off TV, receiver, and more when no one is watching.
[{"id":"dcd2e6cc.6afd98","type":"server-state-changed","z":"1e9b59fe.085ace","name":"Media Paused","server":"a77b5e9d.0c69","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"media_player.living_room","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"paused","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":120,"y":320,"wires":[["bab50b64.30aa3"],["3f051fff.ea55b8"]]},{"id":"3f051fff.ea55b8","type":"change","z":"1e9b59fe.085ace","name":"Stop Timer","rules":[{"t":"set","p":"payload","pt":"msg","to":"stop","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":380,"wires":[["bab50b64.30aa3"]]},{"id":"bab50b64.30aa3","type":"stoptimer","z":"1e9b59fe.085ace","duration":"1","units":"Hour","payloadtype":"num","payloadval":"0","name":"","x":470,"y":320,"wires":[["108b8c1f.8d1b34"],[]]},{"id":"108b8c1f.8d1b34","type":"api-call-service","z":"1e9b59fe.085ace","name":"Turn off player","server":"a77b5e9d.0c69","version":1,"debugenabled":false,"service_domain":"media_player","service":"turn_off","entityId":"media_player.living_room","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":660,"y":320,"wires":[[]]},{"id":"a77b5e9d.0c69","type":"server","z":"","name":"Home Assistant","addon":true}]
Alarm Clock
Play music at 80% volume, every weekday at 7am.
[{"id":"576e5b32.88e7c4","type":"inject","z":"1e9b59fe.085ace","name":"7AM Weekdays","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 07 * * 1,2,3,4,5","once":false,"onceDelay":0.1,"x":150,"y":480,"wires":[["1a2edbb7.82048c"]]},{"id":"1a2edbb7.82048c","type":"api-call-service","z":"1e9b59fe.085ace","name":"Set Volume to 80%","server":"a77b5e9d.0c69","version":1,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.living_room","data":"{\"volume_level\":\".8\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":370,"y":480,"wires":[["437b451e.825c4c"]]},{"id":"437b451e.825c4c","type":"api-call-service","z":"1e9b59fe.085ace","name":"Play MP3","server":"a77b5e9d.0c69","version":1,"debugenabled":false,"service_domain":"media_player","service":"play_media","entityId":"media_player.living_room","data":"{\"media_content_id\":\"https://file-examples.com/wp-content/uploads/2017/11/file_example_MP3_700KB.mp3\",\"media_content_type\":\"music\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":560,"y":480,"wires":[[]]},{"id":"a77b5e9d.0c69","type":"server","z":"","name":"Home Assistant","addon":true}]
Showtime Start
Turn the light off when media starts playing.
Usage Ideas
- Turn off room lights when Plex starts playing
[{"id":"8679a26a.81346","type":"api-call-service","z":"1e9b59fe.085ace","name":"Turn off light","server":"a77b5e9d.0c69","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.living_room_lamp","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":310,"y":80,"wires":[[]]},{"id":"cb42bdbf.927698","type":"server-state-changed","z":"1e9b59fe.085ace","name":"Media Playing","server":"a77b5e9d.0c69","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"media_player.living_room","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"playing","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":80,"wires":[["8679a26a.81346"],[]]},{"id":"a77b5e9d.0c69","type":"server","z":"","name":"Home Assistant","addon":true}]
Showtime Paused
Dim the light on when media is paused.
[{"id":"5499b29f.1c910c","type":"server-state-changed","z":"1e9b59fe.085ace","name":"Media Paused","server":"a77b5e9d.0c69","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"media_player.living_room","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"paused","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":120,"y":180,"wires":[["571a861f.f6869"],[]]},{"id":"571a861f.f6869","type":"api-call-service","z":"1e9b59fe.085ace","name":"Set light brightness to 50%","server":"a77b5e9d.0c69","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.living_room_lamp","data":"{\"brightness_pct\":\"50\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":360,"y":180,"wires":[[]]},{"id":"a77b5e9d.0c69","type":"server","z":"","name":"Home Assistant","addon":true}]