Hello, Blacky,
I apologize in advance for my inability to fully understand your blueprint - I am a HA beginner, I have no programming experience. But I feel that your blueprint is very powerful, and I would like to use it for my automations. I have tried to read and understand most of your tutorials and FAQs, however I would very much appreciate a solved (simple) example:
Problem: Turn on night light at 04:45 - 05:15, but only if civil twilight is still in progress, or earlier (i.e. if the sun is <=-6 degrees).
I tried to modify your blueprint as follows:
alias: XXXXX
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
light_switch:
area_id: loznice
entity_id: light.smart_lighting
include_night_lights: night_lights_enabled
night_lights:
area_id: loznice
entity_id: light.smart_lighting
include_night_light_control:
- use_brightness
night_lights_conditions:
- sun_enabled
night_lights_after_time: "04:45:00"
night_lights_before_time: "05:15:00"
night_lights_sun_elevation_rising: -6
motion_trigger:
- schedule.svetla_odjezd_schedule
end_scenes: []
I didnât know how to construct a proper âmotion triggerâ, I know itâs a mandatory item, so I constructed a âuniversal scheduleâ in configuration.yaml (but I donât know if this is the correct procedure):
schedule:
svetla_odjezd_schedule:
name: "SvÄtla odjezd rozvrh"
monday:
- from: "00:00:00"
to: "24:00:00"
tuesday:
- from: "00:00:00"
to: "24:00:00"
wednesday:
- from: "00:00:00"
to: "24:00:00"
thursday:
- from: "00:00:00"
to: "24:00:00"
friday:
- from: "00:00:00"
to: "24:00:00"
saturday:
- from: "00:00:00"
to: "24:00:00"
sunday:
- from: "00:00:00"
to: "24:00:00"
If I now run the automation from the âEdit/Runâ menu, the light defined in the automation will turn on. However, I am not able to test the triggering conditions.
I tried to use the âDeveloper Toolsâ menu in the HA UI to test, i.e. temporarily set the conditions:
sensor.time_date = 04:46, 2024-05-06
sensor.sun_solar_rising = True
sensor.sun_solar_elevation = -6.1
but I am not able to propagate these conditions to the blueprint, and thus test the correctness of all conditions and variables. In fact, I donât want to wait until July 27, when civil twilight starts at 04:44 for my geolocation :-).
So I would like to ask you for the following advice:
- Did I use your blueprint at least approximately correctly? Is there any significant logical error in the modification?
- What is the most efficient way to test the modifications in HA environment?
Thank you very much for your (holy) patience and for your reply.