For some reason when I turn my plug on for my tree my automation is not running. Here is my code:
automation:
- alias: "Fireplace"
trigger:
- platform: state
entity_id: switch.tree
from: 'off'
to: 'on'
action:
service: media_player.play_media
data:
entity_id: media_player.living_room
media_content_id: http://192.168.1.187:8123/local/video.mp4
media_content_type: video/mp4