Advertisement
Pogmothoin22

Untitled

Feb 3rd, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. automation:
  2. - alias: "Sitting Room Media player stopped"
  3. trigger:
  4. - platform: state
  5. entity_id: media_player.emby_androidtv_colms_shield
  6. from: 'playing'
  7. to: 'idle'
  8. for:
  9. seconds: 1
  10. condition:
  11. - condition: state
  12. entity_id: sun.sun
  13. state: 'below_horizon'
  14. action:
  15. service: scene.turn_on
  16. entity_id: scene.sr_saved
  17.  
  18. - alias: "Sitting Room Media player playing from stopped"
  19. trigger:
  20. - platform: state
  21. entity_id: media_player.emby_androidtv_colms_shield
  22. to: 'playing'
  23. from: 'idle'
  24. condition:
  25. - condition: state
  26. entity_id: sun.sun
  27. state: 'below_horizon'
  28. action:
  29. - service: automation.trigger
  30. entity_id: automation.sitting_room_save_current_light_states
  31. - service: scene.turn_on
  32. entity_id: scene.sitting_dimmed
  33.  
  34. - alias: "Sitting Room Media player paused"
  35. trigger:
  36. - platform: state
  37. entity_id: media_player.emby_androidtv_colms_shield
  38. from: 'playing'
  39. to: 'paused'
  40. condition:
  41. - condition: state
  42. entity_id: sun.sun
  43. state: 'below_horizon'
  44. action:
  45. service: scene.turn_on
  46. entity_id: scene.sr_saved
  47.  
  48. - alias: "Sitting Room Media player playing from paused"
  49. trigger:
  50. - platform: state
  51. entity_id: media_player.emby_androidtv_colms_shield
  52. to: 'playing'
  53. from: 'paused'
  54. condition:
  55. - condition: state
  56. entity_id: sun.sun
  57. state: 'below_horizon'
  58. action:
  59. - service: automation.trigger
  60. entity_id: automation.sitting_room_save_current_light_states
  61. - service: scene.turn_on
  62. entity_id: scene.sitting_dimmed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement