Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- automation:
- ###############################################
- - alias: 'Badrumslampa on 23,6 grader'
- initial_state: on
- trigger:
- platform: numeric_state
- entity_id: sensor.bathroom_temperature
- above: 23.5
- action:
- - service: light.turn_on
- entity_id: light.badrum
- data:
- brightness: 255
- ###############################################
- - alias: 'Badrumslampa on vid motion i badrum'
- initial_state: on
- trigger:
- platform: state
- entity_id: sensor.badrum_motion_sensor
- to: "on"
- action:
- - service: light.turn_on
- entity_id: light.badrum
- data:
- brightness: 200
- ###############################################
- - alias: 'Badrumslampa on vid motion i hall'
- initial_state: on
- trigger:
- platform: state
- entity_id: sensor.hall_motion_sensor
- to: "on"
- action:
- - service: light.turn_on
- entity_id: light.badrum
- data:
- brightness: 50
- ###############################################
- # - alias: 'Badrumslampa av vid ingen motion eller under 23'
- # initial_state: on
- # trigger:
- # - platform: numeric_state
- # entity_id: sensor.bathroom_temperature
- # below: 23
- # - platform: state
- # entity_id: sensor.badrum_motion_sensor
- # # from: "on"
- # to: "off"
- # for: {minutes: 1}
- # condition:
- # - condition: numeric_state
- # entity_id: sensor.bathroom_temperature
- # below: 23
- # - condition: state
- # entity_id: sensor.badrum_motion_sensor
- # state: "off"
- # for: {minutes: 1}
- # action:
- # - service: light.turn_off
- # entity_id: light.badrum
- ###############################################
- - alias: 'Badrumslampa av vid ingen motion'
- initial_state: on
- trigger:
- - platform: state
- entity_id: sensor.badrum_motion_sensor
- # from: "on"
- to: "off"
- for: {minutes: 1}
- condition:
- - condition: state
- entity_id: sensor.badrum_motion_sensor
- state: "off"
- for: {minutes: 10}
- action:
- - service: light.turn_off
- entity_id: light.badrum
- ###############################################
- - alias: 'Badrumslampa av vid under 23'
- initial_state: on
- trigger:
- - platform: numeric_state
- entity_id: sensor.bathroom_temperature
- below: 23
- condition:
- - condition: numeric_state
- entity_id: sensor.bathroom_temperature
- below: 23
- action:
- - service: light.turn_off
- entity_id: light.badrum
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement