💡 Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights

@JeepDog64

Your probably best to set up a custom automation that send you an email when your motion sensor is triggered and then use this blueprint to control the light.

Blacky :smiley:

Thank you - that’s an interesting idea.

I tried this and while it works - it would be much nicer if i could do a wildcard for any and all automations now or in the future. I would rather get the email and add an item to the exception list to not get them.

automations.*
vs
automations.sensor_light

This works:

triggers:
  - entity_id:
      - automation.sensor_light

This doesnt work:

triggers:
  - entity_id:
      - automation.*

However when typing it in, -automation.s - it does show whatever choices i have - so it seems like wildcard would work, but doesnt?

Any suggestions on cleaning this up into any automation that runs?

`alias: Email Upon Automation Trigger
description: ""
triggers:
  - entity_id:
      - automation.1st_floor_bath_motion_activated_light
      - automation.sensor_light
    trigger: state
conditions:
  - condition: template
    value_template: "{{ trigger.entity_id != 'automation.email_upon_notification' }}"
actions:
  - data:
      title: >-
        HOME ASSISTANT NOTIFICATION: Automation: {{
        state_attr(trigger.entity_id, 'friendly_name') }}
      message: "Time: {{ now().strftime('%m/%d/%Y %I:%M %p') }}"
    action: notify.email
mode: single

@JeepDog64

Probably best to ask this question in a different post but it would be something like this.

Replace binary_sensor.your_motion_sensor_here with your motion sensor and the action I just copied your action.

description: ""
mode: single
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.your_motion_sensor_here
    to: "on"
conditions: []
actions:
  - data:
      title: >-
        HOME ASSISTANT NOTIFICATION: Automation: {{
        state_attr(trigger.entity_id, 'friendly_name') }}
      message: "Time: {{ now().strftime('%m/%d/%Y %I:%M %p') }}"
    action: notify.email

Blacky :smiley:

1 Like

That works, however as it only has support for a single profile, I’m unable to use the Night Light feature as intended if I was to add an input boolean, no?

When using a helper, do I need several helper within one automation?
like one helper for Dynamic Lighting - Toggle Helper and one for Scenes & Scripts - Toggle Helper?

Feature request: when using bypass it’d be great if I can choose wich action I wanna use:

  • Use The Light Control Options
  • Use The Dynamic Lighting Options
  • Use The Light Control Options
  • Use individual Options (new)

Why? Because I use the dynamic Lightning Option with maximum 70% brightness. When I need more light I wanna bypass too 100% brightness.
But it seems when normal light control AND dynamic light control are configured, only dynamic will take effect. So I wanna bypass to “normal” light control (with 100% brightness).

@hazio

There are only 2 input of different light settings. One I call normal lights and the other is night lights.

Blacky :smiley:

@TylonHH

You only need toggle helpers when;

Dynamic Lighting

Used in options 1, 2, 3, 4, 5, 6, 7, 8 or 9 - If you have chosen a brightness level of 0%, then it’s essential to create an independent toggle helper and enter it here.

Scenes & Scripts - Toggle Helper

To ensure the smooth operation of the automation, it’s recommended to create an independent toggle helper when selecting a scene or script in “Lights - Switches - Scenes - Scripts” above and then enter it here.

Night Lights - Scenes & Scripts - Toggle Helper

To ensure the smooth operation of the automation, it’s recommended to create an independent toggle helper when selecting a scene or script in “Night Lights” above and then enter it here.

Blacky :smiley:

@TylonHH

Thanks for your suggestion I will put it on the list of recommendations.

For now you can ether, adjust the light brightness manually when you turn ON the bypass or have a simple automation that will turn the brightness level to 100% when you turn on the bypass.

Blacky :smiley:

1 Like

Hello, nice blueprint. Thank you!

Can you implement a hue like dim option before lights go off? Like 50% brightness for 10 seconds or so before turn off? I know transition OFF setting can be used, but I think hue way is more elegant.

Hello, very nice blueprint, i use it for all my lights. Thanks for the hard work! :slight_smile:
In my bathroom i have a motion sensor that controls the light. The only annoyance is when someone showers. The motion sensor cannot see a person in the shower, mainly because the shower curtain is not transparent. Now, i’ve placed a temperature (and humidity) sensor in the bathroom, and i want the light to stay on while the humidity is above 65%.
I can see here in your blueprint:


That it allows a bypass entity. I’m not sure how that works and how the bypass is triggered (is it just triggered by the entity switching from any state to any other state?) but i was thinking that i would be able to get the functionality i wanted by making a sensor/helper that reads the humidity and when the humidity is above 65%, the sensor/helper is “on” and the rest of the time it is off. Can you tell me if that would work?
I know this is out of the scope of your blueprint, but can you maybe also tell me what kind of sensor it is and where to click to create it? I have no idea how to do it.

Anyway, thanks in advance!

Hi and thanks for this awesome blueprint.
I have this setup with the Be in the hive sensor and cant get it to work properly. The lights dont turn on when I enter the room and when we exit the room the lights turns off but after e few seconds turns back on and I cant figure this out :frowning:

Here is my template and I’m using Aqara door sensor and Hue motions sensor.

template:
  - trigger:
      - platform: state
        entity_id: binary_sensor.aqara_door_sensor_badrum_door_4
        to: "on"
      - platform: state
        entity_id: binary_sensor.aqara_door_sensor_badrum_door_4
        to: "off"
        for:
          seconds: 10
      - platform: state
        entity_id: binary_sensor.hue_motion_badrum_motion
        to: "on"
    binary_sensor:
      - name: "Bee In The Hive"
        device_class: occupancy
        icon: mdi:account-box-outline
        state: >
          {{ is_state('binary_sensor.aqara_door_sensor_badrum_door_4', 'off') and is_state('binary_sensor.hue_motion_badrum_motion', 'on') }}

Sorry, but I don’t understand why this needs to be this complicated.
Can you explain me why I can’t just have a scene to turn on the lights, a scene to turn on lights with 10 percent during night and another scene to turn everything off? Why an additional script and a helper?

I have something similar, but with power, when TV is running. So I created a helper with Threshold helper. It gets on or off when the conditions are set.
And the helper you use for bypass.

Could it be, that it is because my Motion Sensor is publishing the occupancy twice?
Im now trying to set the mqtt QOS to 2 , hopefully to prevent this.
Because I couldn’t find the light being immediately switched off.
If that doesn’t work i might be trying the ‘debounce’ option