Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. automation:
  2. ###############################################
  3.  
  4. - alias: 'Badrumslampa on 23,6 grader'
  5. initial_state: on
  6.  
  7. trigger:
  8. platform: numeric_state
  9. entity_id: sensor.bathroom_temperature
  10. above: 23.5
  11.  
  12. action:
  13. - service: light.turn_on
  14. entity_id: light.badrum
  15. data:
  16. brightness: 255
  17. ###############################################
  18.  
  19. - alias: 'Badrumslampa on vid motion i badrum'
  20. initial_state: on
  21.  
  22. trigger:
  23. platform: state
  24. entity_id: sensor.badrum_motion_sensor
  25. to: "on"
  26.  
  27. action:
  28. - service: light.turn_on
  29. entity_id: light.badrum
  30. data:
  31. brightness: 200
  32. ###############################################
  33.  
  34. - alias: 'Badrumslampa on vid motion i hall'
  35. initial_state: on
  36.  
  37. trigger:
  38. platform: state
  39. entity_id: sensor.hall_motion_sensor
  40. to: "on"
  41.  
  42. action:
  43. - service: light.turn_on
  44. entity_id: light.badrum
  45. data:
  46. brightness: 50
  47. ###############################################
  48.  
  49. # - alias: 'Badrumslampa av vid ingen motion eller under 23'
  50. # initial_state: on
  51.  
  52. # trigger:
  53. # - platform: numeric_state
  54. # entity_id: sensor.bathroom_temperature
  55. # below: 23
  56.  
  57. # - platform: state
  58. # entity_id: sensor.badrum_motion_sensor
  59. # # from: "on"
  60. # to: "off"
  61. # for: {minutes: 1}
  62.  
  63. # condition:
  64. # - condition: numeric_state
  65. # entity_id: sensor.bathroom_temperature
  66. # below: 23
  67. # - condition: state
  68. # entity_id: sensor.badrum_motion_sensor
  69. # state: "off"
  70. # for: {minutes: 1}
  71.  
  72. # action:
  73. # - service: light.turn_off
  74. # entity_id: light.badrum
  75.  
  76. ###############################################
  77.  
  78. - alias: 'Badrumslampa av vid ingen motion'
  79. initial_state: on
  80.  
  81. trigger:
  82. - platform: state
  83. entity_id: sensor.badrum_motion_sensor
  84. # from: "on"
  85. to: "off"
  86. for: {minutes: 1}
  87.  
  88. condition:
  89. - condition: state
  90. entity_id: sensor.badrum_motion_sensor
  91. state: "off"
  92. for: {minutes: 10}
  93.  
  94. action:
  95. - service: light.turn_off
  96. entity_id: light.badrum
  97.  
  98. ###############################################
  99.  
  100. - alias: 'Badrumslampa av vid under 23'
  101. initial_state: on
  102.  
  103. trigger:
  104. - platform: numeric_state
  105. entity_id: sensor.bathroom_temperature
  106. below: 23
  107.  
  108. condition:
  109. - condition: numeric_state
  110. entity_id: sensor.bathroom_temperature
  111. below: 23
  112.  
  113. action:
  114. - service: light.turn_off
  115. entity_id: light.badrum
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement