🚪 Closet, Pantry, and Cupboard Lighting

@Will-com4

Thanks for your YAML. I have tested it here and it works perfectly.

Blacky :grinning:

Well that’s disappointing. I wonder what the issue is on my end.

@Will-com4

Maybe look at the logbook to see what turned it OFF.

Blacky :grinning:

Hey @Blacky I’m getting this in Watchman in the automation.

 light.data                     | missing | blueprints/automation/Blackshome/closet-pantry-cupboard-ligh |
|                                |         | ting.yaml:588,590,592,594,596,597,599,615,617,619,621,623,62 |
|                                |         | 5,626 

Which refers to multiple lines but here are a couple of mine

 %}\n  {% set light.data = dict(light.data, **{ 'transition': light_transition_on
    }) %}\n{% endif %} {% if 'use_brightness' in include_light_control %}\n  {% set
    light.data = dict(light.data, **{ 'brightness_pct': light_brightness }) %}\n{%
    endif %} {% if include_light_colour_control == 'use_colour_temperature' %}\n  {%
    set light.data = dict(light.data, **{ 'color_temp_kelvin': light_colour_temperature

@CamCorp
Could you please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on “</>” and paste code in there.

Blacky :grinning:

To long to paste here so put it here Closet, Pantry, and Cupboard Lighting - Pastebin.com

Thanks!!

@CamCorp

Thanks for the link but that is the code I have written. I have that already.

To do this:

  1. Open your automation.
  2. Click the three dots (⋮) in the top right corner.
  3. Select Edit in YAML.
  4. Copy the entire YAML code.
  5. Return to the forum and, in your reply, click the </> button in the toolbar.
  6. Paste your YAML inside the code block.

This ensures the formatting stays correct and makes it easier to analyze.

Blacky :grinning:

@Blacky oops sorry

alias: Door - Pantry
description: ""
use_blueprint:
  path: Blackshome/closet-pantry-cupboard-lighting.yaml
  input:
    trigger_entity:
      - binary_sensor.sensor_door_2_pantry
    light_switch:
      entity_id: light.switch_pots_2_pantry
    timer:
      hours: 0
      minutes: 15
      seconds: 0
    include_timer: enable_timer

@CamCorp

Thanks, your not using any light control options and the code is just checking your selections. I not sure why watchman would be doing this but you automation should work.

Blacky :grinning:

@Blacky

Thanks, yes everything works fine. Was just cleaning up my watchman, that is my only error now. If there is nothing I can do another it and it doesnt mean an issue then I can ignore.

@CamCorp

Yeah, it is not a bug. Thanks for reaching out anyway, I appreciate it.

Blacky :grinning:

I love the extra features you have built out! I think I’m confused about the group helper though? Should I be able to use this one automation to control 2 different spaces (pantry or closet) so long as I group the trigger & light together? Or 1 unique automation for each space but there could be more than one contact sensor?

@IMHEYSUS

One automation per space (set of lights) you would like to control.

The group you talking about is if you have 2 sensors that control a space (set of lights) then it best to group them. Say you have a pantry / closet that has 2 + doors with 2 + contact sensors then you would group them.

For the motion group here is an example. Say you have kitchen lights controlled by an automation using motion sensors to turn the light ON and OFF like my :bulb: Sensor Light blueprint. You then have your kitchen pantry with door contact sensor that will turn ON your pantry light when you open the door. This automation will turn the light ON and OFF in a set amount of time but if you use the motion sensor option this will keep your pantry light ON when motion is detected (motion sensor for your kitchen lights). In your kitchen you may have 2 motion sensors to control the kitchen lights, if you do then it is best to group them and use the group. If you walk out of the kitchen and leave the pantry door open all you lights will turn OFF (kitchen & pantry lights). When you walk back into the kitchen then all your lights will turn ON again.

Hope this helps you understand this automation.

Blacky :grinning:

1 Like

Thank you for the well detailed reply and that makes perfect sense. Also, I had completely missed the Motion Sensor setting and the logic/implementation is perfect for another automation I’m trying to figure out but have been stuck on.

I’ve been trying to figure out how to modify another blue print (Contact Sensor (Door or Window) Left Open Notification) to send an alert if my garage freezer door is left open but only if motion is not detected & I haven’t been successful. Maybe I can try something with this pause timer logic.

1 Like

Not sure if this is still monitored but:

If I understand the timer function right, when the automation is triggered by a door opening and a light is turned on with the time defined, the light should stay on for that amount of time, regardless if door is closed. In my case I have three different binary sensors (two motion, one door) configured in a group and using that group as a trigger.

I’ve defined a time of ten minutes but my light is turning off as soon as the door is closed.

Am I misunderstanding the behaviour of the timer setting?

@TheFourDees

If you have them all in the group and you use that group as the trigger then all of the sensors must be OFF for the light to turn OFF. The thing is when any binary sensors (two motion, one door) in the group is ON the light will come ON and normally when you close the door you would like the light to go OFF for this blueprint. Maybe test your group to see if it is working correctly.

Blacky :grinning:

Blacky

Isn’t the timer value supposed to hold the light on for the time you specify?

Door Timer Option
If the door is opened and left open, the light will turn OFF after the configured delay.
If the door is closed, the light will turn OFF immediately.

Motion Sensor Option
When the door is open and motion is detected, the light will remain ON.
If you leave the room and the light turns OFF, it will automatically turn back ON when motion is detected again, provided the door is still open.

Example
If you open the closet door, the light turns ON.

  • Closing the door turns the light OFF immediately.
  • Leaving the door open and walking away allows the timer to turn the light OFF.
  • If you return while the door is still open and motion is detected, the light will turn ON again

Blacky :grinning:

Gotchya, thanks for the clarification.

1 Like