I think your solution will work for me, after posting Iâd been thinking of an approach something along those lines but thought i was possibly making something complex to solve an apparently simple problem. Thanks!!
Anyone have an answer?
Normally I check in every day just depends but I try and answer everyone.
All good, better to ask the question as sometime it gives me ideas. Wow we are at 600 But we only have 90 likes. Maybe we need more people hitting the like in the top post
Love your question, realy easy to understand
So all good here.
We will need to have another automation to do the rest. So you will have 2 in total. 1 for your shower and fan and the other one as shown below. To set this up try this.
- Have you sensor in the main part of the bathroom as the trigger.
- Select your main bathroom light in âLights - Switches - Scenesâ
- Set up any light control you like.
- Note: Do not use the time options here as we would like the automation to run 24 / 7.
- Now in night lights we will need to enable it.
- Enter your shower light in âNight Lightsâ.
- In the âNight Lights - Use The Light Control Optionsâ select brightness and set the âNight Lights - Brightnessâ level to 20%
- In âNight Lights Conditionsâ enable time.
- Set your start time to 12:00 am and your end time to 6:00 am.
- Save the automation.
Your all done it should work for you
That seems strange. I have a very similar set up here and it has been working. If you would like to test it during the day then try changing the night light time. So say it is 5pm now and your delay is 2 min. For the test change the delays to 1 min (both delays) then set the night lights start time to 5:05pm and the end time to 5:10pm. Now walk in and out at 5:01pm and your main light should go ON and OFF (test 1). Then wait until 5:06pm then walk in and out and your shower light should come ON and go to 20% and then OFF (test 2). Then again walk in and out at 5:11pm and you main light should come ON and OFF. If it all works then you all good. Now just change back your settings.
Let us know how you go.
Blacky
Thanks Blacky for the response. I try to be clear always, but I think youâve missed what Iâm trying to do with the night light. The main bathroom light is not dimmable, and besides, the shower light is out of my line of sight so itâs softer indirect light at 3am. But the instructions you gave me for the nightlight pasted below:
- Have you sensor in the main part of the bathroom as the trigger.
- Select your main bathroom light in âLights - Switches - Scenesâ
- Set up any light control you like.
- Note: Do not use the time options here as we would like the automation to run 24 / 7.
- Now in night lights we will need to enable it.
- Enter your shower light in âNight Lightsâ.
- In the âNight Lights - Use The Light Control Optionsâ select brightness and set the âNight Lights - Brightnessâ level to 20%
- In âNight Lights Conditionsâ enable time.
- Set your start time to 12:00 am and your end time to 6:00 am.
- Save the automation.
Turns on the main bathroom light to 20%. In fact, that fixture is not even dimmable. Iâm assuming the instructions above are correct except I should be substituting the entity guest_bath_shower_light_light_2 instead of guest_bathroom_light_2?
Thanks so much.
Once again I want to encourage people to make a small donation to Blacky. He doesnât go out of his way to promote his donation link, in fact he hides it. His work has been so helpful to me as a beginner. If everyone here gave $10, thatâs s chunk of money.
This is strange. For the main bathroom light to dim to 20% when it not even dimmable⌠well
guest_bath_shower_light_light_2 = This is your shower light entity?
guest_bathroom_light_2 = This is your main bathroom light?
If this is correct then step 2 (Lights - Switches - Scenes *) = guest_bathroom_light_2, and step 7 (Night Lights) = guest_bath_shower_light_light_2
So the night light (Shower Light) should only turn ON between 12:00 am to 6:00 am
If that is not how it is working then maybe check your light with the entity name as they could be crossed over. I think 12:00 am is correct but to be safe your could try 12:01am like you originally had.
If you need to check your home assistant time you can copy and paste this code below into developer tools / templates.
{{ now().strftime('Your HA time is %H:%M:%S and the Date is %d-%h-%Y ') }}
I thought this was your shower light that you could dim.
Anyway, looks like you may have worked it out, but if you are still unsure please let us know.
Yeah, we are not communicating. Not your fault. It is the guest bathroom shower light Iâm trying to dim between 12 and 6, as the main light in the guest bathroom is not dimmable. I probably messed up my words.
OK, I will ask it in a simpler way.
If I want to have a stand-alone automation for the guest bathroom shower light to go on during the wee hours of the night based on the guest bathroom sensor group (main area plus shower sensors) being the trigger, do I use the global timing option and create the brightness and time settings, or do I leave that blank and just use the night-light section, or is it some combination of both.
So if you would like a stand alone automation to run your shower light at night between a set time period then you would just use the time option and set your lights in "Lights - Switches - Scenesâ. No need to use the night lights.
Blacky
Since i update you script to 4.2, when i come to the area of the motion sensor, the light goes on an after 15 seconds it will go out.
But the time delay stand on 5 Minutes. what can i do?
THX
Well that is not good. It is all working here so it must be in a setting.
If you can remember could you let us know what version you upgraded from?
Could you please provide us your YAML of the automation? 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.
From this I will be able to assist further.
Thanks
Blacky
i think it was 3.4.
alias: SensorFlurOG
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.sensorflurog_occupancy
light_switch:
entity_id: light.flurog
include_light_control: use_brightness
include_night_light_control:
- use_night_brightness
- use_brightness
night_lights_after_time: "22:00:00"
night_lights_before_time: "08:00:00"
ambient_light_sensor: sensor.sensorflurog_illuminance_lux
light_brightness: 25
include_ambient: ambient_enabled
include_night_lights: night_lights_enabled
night_lights:
entity_id: light.flurog
ambient_light_value: 5
night_light_brightness: 10
night_lights_conditions:
- time_enabled
light_transition_on: 0
light_transition_off: 0
night_time_delay: 4
night_light_transition_on: 0
night_light_transition_off: 0
Something is not right as you have a old setting hanging around (your a long term user ). If possible could you delete the automation (not the blueprint) and add it again. It will probably be the fastest way to get it working again.
Let us know if this fixes it.
Blacky
Hallo, I delete the automation and make it new, but it dont work.
alias: SensorFlurOG
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.sensorflurog_occupancy
include_light_control:
- use_brightness
light_brightness: 25
include_ambient: ambient_enabled
ambient_light_sensor: sensor.sensorflurog_illuminance_lux
ambient_light_value: 5
include_night_lights: night_lights_enabled
night_lights:
entity_id: light.flurog
night_time_delay: 3.5
include_night_light_control:
- use_brightness
night_light_brightness: 10
night_lights_conditions:
- time_enabled
night_lights_after_time: "22:00:00"
night_lights_before_time: "08:00:00"
light_switch:
entity_id: light.flurog
Thank you for the automation! It would be awesome if you could add options to toggle a input boolean when lights turn on and off. Use case: I have some Ikea light which sometimes does not turn off by the automation even though HA detects it as off. With the input boolean I can periodically check the status and automatically trigger a off signal when the input boolean is off
Ok
Is your ambient light sensor effected by the lights? If you can you select âYesâ in site conditions, see below.
.Fi that doesnât work can you select 6 min in your time delay and save then select 5 min and save and then test it.
If that doesnât work can you give me a screen shot of your traces when if faults. To do this go into the automation, top right âtracesâ then I need to see the path of the orange line.
Blacky
Hi Daniell, firstly welcome to the community
Personally if the Ikea lights donât work I would replace them or try and fix them so the are accurate rather than trying to find a work around.
If you would like to keep them and you would like to do something as you suggested then you could create a template sensor and include it into the automation. Then it will turn ON and OFF with the automation and you will know it works, then use that for what your trying to do.
Hope this helps
Blacky
Hello! I have a Garage door which doesnt provide a binary sensor that says if it is opened or not, but my door itself shows the status if it is opened or not. How can I do there?
i think, that fix the prolbem, i try this, with an other automation, and then we will see.
THX
Hi Moises,
What you could do is create a template binary sensor mimicking your garage door. To do this you will need to put the code in your âconfiguration.yamlâ file.
binary_sensor:
- platform: template
sensors:
garage_door_binary_sensor_template:
friendly_name: "Garage Door"
device_class: door
icon_template: mdi:garage-open-variant
value_template: >-
{{ is_state('switch.your_garage_door_sensor_here', 'opened') }}
- The "garage_door_binary_sensor_templateâ change to your liking.
- The "friendly_name: âGarage Doorâ change to your liking.
- The Icon change to your liking.
- You will need to replace the âswitch.your_garage_door_sensor_hereâ to your actual garage door entity name and make sure the state 'âopenedâ is correct.
Once done you will then need to restart HA for the sensor to take affect. Then add your new sensor into the trigger
Hope this help, and if you have any question please ask.
Blacky