#Trying to do something tricky - variable light

1 messages · Page 1 of 1 (latest)

median furnace
#

Today, I have Aqara motion sensors that turn on my Hue lights in my office. I have 1 in the front that senses when I walk into the room and another one on my desk that sees me moving around and keeps the light on. They are currently set to 86% brightness I think.

I am a content creator and am often editing photos and video and I'd like my room to have dim lights sometimes, which I can easily do from my dash. But when motion stops and is detected again, the lights go back to 86%. Can anyone think of an automation that would allow me to set the light (ideally with a push button on a Dashboard to set the lights to 36%) and change it to whatever I want - sometimes I want 86% if I am reading or in a Conference Call. I am ok if the front sensor always turns to 86% since that faces away from me and only detections motion when I come or go. I am not a YAML programmer and not too savvy with Dashboards, etc. Kind of a regular joe user.

fleet surge
#

I have set something like that set up. Not really because of "no detection" but to set the light the same when I come back from grabbing coffee.

When there is no more motion I first make a scene of the current setup. Then I turn it off. When I see motion I check if the main light is off for >15 minutes, if so, I turn it with the default value. Else (aka, off for less then 15 minutes) I restore the scene.

#

Alright, in reality I switched the logic so I can check if the scene is defined, I didn't turn on the light myself and I use different default levels. But stripped to the basics that would be:

description: ""
mode: single
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.presence_square_presence
    to: "on"
    id: "on"
  - trigger: state
    entity_id:
      - binary_sensor.presence_square_presence
    to: "off"
    id: "off"
conditions: []
actions:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - "on"
          - condition: state
            entity_id: light.study_bulb
            state: "off"
          - condition: not
            conditions:
              - condition: state
                entity_id: light.study_bulb
                state: "off"
                for:
                  hours: 0
                  minutes: 15
                  seconds: 0
            alias: But Light is Off for <15min
          - alias: The temp scene is defined
            condition: template
            value_template: "{{ states.scene.study_temp is not none }}"
        sequence:
          - action: scene.turn_on
            metadata: {}
            data: {}
            target:
              entity_id: scene.study_temp
      - conditions:
          - condition: trigger
            id:
              - "on"
        sequence:
          - action: light.turn_on
            metadata: {}
            data:
              brightness_pct: 86
            target:
              entity_id: light.study_bulb
    default:
      - action: scene.create
        metadata: {}
        data:
          snapshot_entities:
            - light.study_bulb
          scene_id: study_temp
      - action: light.turn_off
        metadata: {}
        data: {}
        target:
          entity_id: light.study_bulb