✈ Holiday & Away Lighting

Hi,

i’m unable to install blueprint, an unkown error occurs:

2025-09-16 16:50:49.639 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140111273293792] Error handling message: Unknown error (unknown_error) networx from 192.168.200.93 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/blueprint/websocket_api.py", line 114, in ws_import_blueprint
    imported_blueprint = await importer.fetch_blueprint_from_url(hass, msg["url"])
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/blueprint/importer.py", line 285, in fetch_blueprint_from_url
    imported_bp = await func(hass, url)
                  ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/blueprint/importer.py", line 192, in fetch_blueprint_from_github_gist_url
    resp = await session.get(
           ^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 897, in _request
    resp.raise_for_status()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 629, in raise_for_status
    raise ClientResponseError(
    ...<5 lines>...
    )
aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url='https://api.github.com/gists/0a34870755762bcb9fab159d5b94fd25'

No chance.
Tried to restart, no success. Seems als GIST links are not working. Normal github links work.

@networxnet

Looks like it has been fixed it now.

Blacky :grinning:

1 Like

Thanks for the blueprint @Blacky but I’m getting this same error too.

Here is the generated YAML …

alias: Unoccupied - TESTING 1
description: ""
use_blueprint:
  path: Blackshome/holiday-away-lighting.yaml
  input:
    automation_control: enable_entity_state
    automation_control_entity: input_boolean.unoccupied_mode
    on_time: "11:55:00"
    on_time_delay: 2
    min_on_time:
      hours: 0
      minutes: 1
      seconds: 0
    max_on_time:
      hours: 0
      minutes: 3
      seconds: 0
    entity_1: light.signify_netherlands_b_v_ltg002
    entity_1_include_light_control:
      - use_brightness
    entity_2: light.signify_netherlands_b_v_ltg002_2
    entity_2_include_light_control:
      - use_brightness

and here is my log file…

2025-09-19 11:55:00.382 INFO (MainThread) [homeassistant.components.automation.unoccupied_testing_1] Unoccupied - TESTING 1: Running automation actions
2025-09-19 11:55:00.383 INFO (MainThread) [homeassistant.components.automation.unoccupied_testing_1] Unoccupied - TESTING 1: Choose at step 1: Check if turn ON time is enabled: Running automation actions
2025-09-19 11:55:00.383 INFO (MainThread) [homeassistant.components.automation.unoccupied_testing_1] Unoccupied - TESTING 1: Choose at step 1: Check if turn ON time is enabled: Executing step delay 0:01:00
2025-09-19 11:56:00.385 INFO (MainThread) [homeassistant.components.automation.unoccupied_testing_1] Unoccupied - TESTING 1: Choose at step 2: Turn ON actions: Running automation actions
2025-09-19 11:56:00.389 INFO (MainThread) [homeassistant.components.automation.unoccupied_testing_1] Unoccupied - TESTING 1: Choose at step 2: Turn ON actions: Choose at step 1: Check if same time is selected: Running automation actions
2025-09-19 11:56:00.390 INFO (MainThread) [homeassistant.components.automation.unoccupied_testing_1] Unoccupied - TESTING 1: Choose at step 2: Turn ON actions: Choose at step 1: Check if same time is selected: Executing step call service
2025-09-19 11:56:00.390 ERROR (MainThread) [homeassistant.components.automation.unoccupied_testing_1] Unoccupied - TESTING 1: Choose at step 2: Turn ON actions: Choose at step 1: Check if same time is selected: Error executing script. Invalid data for call_service at pos 1: value should be a string for dictionary value @ data['entity_id']
2025-09-19 11:56:00.390 ERROR (MainThread) [homeassistant.components.automation.unoccupied_testing_1] Unoccupied - TESTING 1: Choose at step 2: Turn ON actions: Error executing script. Invalid data for choose at pos 1: value should be a string for dictionary value @ data['entity_id']
2025-09-19 11:56:00.391 ERROR (MainThread) [homeassistant.components.automation.unoccupied_testing_1] Unoccupied - TESTING 1: Error executing script. Invalid data for choose at pos 2: value should be a string for dictionary value @ data['entity_id']
2025-09-19 11:56:00.392 ERROR (MainThread) [homeassistant.components.automation.unoccupied_testing_1] Error while executing automation automation.unoccupied_testing_1: value should be a string for dictionary value @ data['entity_id']

@bonniedoon

Looks like I got a bug to fix… thanks for reporting it!.. keep an eye out for the update.

Blacky :grinning:

New Update 1.2

Make your home glow, no matter where you go! :red_car: :dash:

:bug: Bug

  • Lights ON/OFF Order - At the Same Time - Previously, selecting this option could cause an error and stop the automation. This has been fixed so all entities now turn on correctly.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

Nice work! I have only started to control 12 different light controls around the house. From what I can see, this automation seems to be evening/night centric. Perhaps the LUX and sun location could include morning automation periods asa well. Or perhaps it does and I missed that? For the time being I’ll use a secondary automation for morning vacancy automations.

EDIT: Ok, figured out sun location works for both dawn and dusk conditions. Ignore. However, however will the LUX value work both in the morning (lux increasing to target value) as well as evening (lux decreasing to target value)?

@tillig

Lux, will trigger the automation.

Blacky :grinning:

Oops sry, didn’t see your message asking for a yaml…

Anyway, fixed on latest version, just verified it.

You are making me to migrate from node-red to (your) automations.

Thanks a lot!

Let me a question if possible:
Is it possible that when we have the automation control based on an entity state, whenever gets off, will turn off the lights automatically?

Also, let’s say I configured to run automation at 22h, but at 23h I decide to enable it. There is no way to run it until finish time or while sun position is low?

@Javato

The automation must be running and then you use the Lights ON Duration Method.

Normally your on holidays or away and the automation is enabled already. Automation triggers happen at the time of the trigger not pre-trigger. Enabling the automation wont trigger the automation.

Blacky :grinning:

Hello is there a way to turn off the lights based on sun elevation?
I am confused on how to turn off the light as it only asks for below option however if I dont want to use it where do I specify to turn it off either based on a fixed time or 1 hour before sunrise.

Lights ON Duration:

Duration Method: You can choose how long the lights stay ON before turning OFF.
Minimum / Maximum ON Time: Lights stay ON for a random duration between the set minimum and maximum ON time.
Earliest and Latest Time Range: Lights turn OFF at a random time within the defined earliest and latest OFF time range.
Entity State - ON: Lights stay ON for a random duration after an entity is turned ON before they turn OFF.
Entity State - OFF: Lights stay ON for a random duration after an entity is turned OFF before they turn OFF.

thank you

Using this condition input I would guess could do some of that…

    global_conditions_settings:
        name: "Global Conditions"

Not sure if you intended to reply on my post but the glibal conditions is only for triggering the automation per the documentation.

@tshan1727

Currently, no. I do have another blueprint that can turn your light ON with multiple triggers and OFF at sunrise. That’s why I didn’t include this option (as well as the ambient option) in this particular blueprint.

Have a look at this blueprint :high_brightness: Smart Light - Entity - Sun Elevation - Ambient & Time Triggers

Please let us know if that works for your setup. If not, could you share a bit more detail about what you’re trying to achieve and why you’d like the sun elevation to control when your lights turn OFF? That would really help me understand your use case better.

Blacky :grinning:

This one will work thank you so much. I was also trying to create an automation just for specific Holidays as I put the same decorations out and use the same smart switches so I was looking for a way to turn them off 2 hours before sunrise.

1 Like

@Blacky yet another idea from my side.

In the Trigger Settings section the Turn ON Time is hard coded in this automation. Would it be possible to extend the Trigger Settings with an Turn ON Time that uses a time helper that can be selected by the user?

A workaround would be to create an automation that sets an entity to an OFF state so that the Entity State OFF trigger can be used. But having a time helper as an option would be much easier.

@paschaef

Yes we can add that but we will add an Entity State - ON option. Keep an eye out for the update.

Blacky :grinning:

1 Like

New Update 1.3

Make your home glow, no matter where you go! :red_car: :dash:

:new: New Features

  • New Trigger - Entity State (ON) - Lights turn ON when a selected entity is turned ON.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

Are Tigger Settings conditions or actual triggers. Trying to reconcile the difference between Automation Control and Trigger Settings. If they are conditions, perhaps change the title and some of the wording within to reflect that. In The Automation Process above, they are referred to as Trigger Conditions. It’a all quite confusing given that the Automation Control is optional. Or is Automation Control the condition block?

Great blueprint. Looking forward to future enhancements. Thank you!

@Blacky thx for the blueprint!

I have 2 rooms with windows facing the street. One room is the living room the other is the bedroom.
I configured the automation to use sun elevation as trigger and for duration I set earliest / latest off time to 22:00 / 23:30.
Added one light in the living room. So far so good.

For the bedroom I don’t want a light to be on the whole time.
Is it possible to have a light turned on and off randomly during the evening?
So it looks like someone enters the second room and then leaves again. Several (random) times per evening.