♾ Sensor Light Add On - Media & Movie Lights - House Alarm Lights - Smoke Alarm Lights & Exhaust Fans + More

FAQ - How to create a Snapshot Toggle Helper

  1. First go to Settings / Devices & Services / click on the “Helpers” tab / click “+ CREATE HELPER” and select “Toggle”.
  2. In the name area, enter a name that best suits you. For this example we will put “Movie - Snapshot Helper”. Then click save.
  3. Go back into the automation and in the “End Turn ON - Snapshot Toggle Helper” search for the name you created, in our case “Movie - Snapshot Helper”. Then click save.

You now have a “Snapshot Toggle Helper”. In order for snapshots to work it must be OFF at the start of the automation.

Enjoy

Blacky :smiley:

Back to FAQ: Click Here

New Update - Version 1.1

New Features :new:

  • Added the ability to turn OFF selected lights and or switches at the start of movie.
  • Added the ability to turn ON selected lights, switches and or scenes at the end of a movie. You have 2 options to choose from;
    1. Choose to create a snapshot of your lights and switches at the start of the automation that will be restored at the end of the automation.
    2. Choose the lights, switches and or scenes that you would like to turn ON at the end of the automation.

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:

damn blacky you are fast :wink: :clap: :+1:

I’m going to convert my light automations to your blueprint as it seems to work perfectly.

This evening i’am gonna test out the sensor light & the sensor light add-on both as i’am going to watch a movie after the gym time.

Thank you so much for your awesome and hard work hard work, if its working I’am buying you some beers :wink:

2 Likes

Still trying to figure out what the best settings are using both of the blueprints.

Will there also be the possibilty to only turn this blueprint on only after a cerain degree of sun elevation, would love this with the lux condition.

But so far so good :+1:

Sure

Sounds good

New Update - Version 1.2

New Features :new:

  • Added the ability to use sun as a condition.

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:

Lightning quick!

Thank you so much!
Send you someting your way :sunglasses:.

1 Like

Hello, I’m having an issue with this blueprint. I am using a NVIDIA Shield and trying the use the chromecast feature (which presents as a media_player entity) to trigger this automation. For some reason I am getting this error message:

Stopped because of unknown reason "null" at July 31, 2023 at 10:34:50 AM (runtime: 0.00 seconds)

I get this error right as I start playing something and the automation stops right away and nothing happens. Any ideas? I tried to use the android remote integration, but that won’t trigger this blueprint at all.

@Nomar383

Hi Kalen

Firstly welcome to the community :+1:

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 :smiley:

alias: Den - Lights Auto - Media Playing
description: ""
use_blueprint:
  path: Blackshome/sensor-light-add-on.yaml
  input:
    trigger_entities:
      - media_player.den_shield
    trigger_on_state:
      - "on"
      - playing
    trigger_off_state:
      - "off"
      - turned_off
    time_delay: 5
    light_switch:
      entity_id:
        - light.floor_lamp_l
        - light.floor_lamp_r
    include_light_control:
      - use_brightness
      - use_transition
    light_brightness: 20
    include_ambient: ambient_enabled
    ambient_light_sensor: sensor.den_lux
    ambient_light_value: 10
    include_automation_link: enable_automation_link
    automation_link:
      - input_boolean.den_lights_auto_bypass

Thanks for taking a look!

@Nomar383

Hi Kalen, thanks for providing your YAML of the automation.

Everything looks good.

Could you do something for me?

Go into the developer tools, in the states tab search for your media player ( media_player.den_shield). It will show the state your media player is in. Could you then do the following.

  1. Play a movie and check the state.
  2. Pause a movie and check the state.
  3. Stop a movie and check the state.

Then make sue your state (the one shown in developer tools) is selected for ON & OFF

If the state is not there then please let us know.

Either way can you let us know how you go.

Thanks for your help.

Blacky :smiley:

Okay, so the states for this entity are as follows:

  1. “playing”
  2. “paused”
  3. “off”

Should “playing” be in quotes in my YAML maybe?

@Nomar383

Hi Kalen, sorry for the delay. This is a bug (can’t believe I missed this one :relieved:). I have fixed it and a new release will be out soon. Just testing everything again.

Once the new release 1.3 is out please update and let us know if it working for you.

Good news is now you know what to put in your;

  • On State = Playing
  • OFF State = OFF

If you would like the lights to go back and use the main sensor light automation when you pause then;

  • On State = Playing
  • OFF State = OFF & Paused

If you would like to use intermission option.

  • On State = Playing
  • OFF State = OFF
  • Intermission enabled and select Paused and set up your lights.

Thanks for your help.

PS: No it was not quotes.

Blacky :smiley:

New Update - Version 1.3

Bugs Fixes :bug:

  • Fixed major bug that stopped the automation from working if you didn’t add any entities in “Start Turn OFF Options” and “End Turn ON Options”. You would also get an error message like this;
Stopped because of unknown reason "null" at July 31, 2023 at 10:34:50 AM (runtime: 0.00 seconds)

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:

FAQ

HOW TO UPDATE A BLUEPRINT

There are a couple ways to do this. Below is one example on how to update a blueprint. You can also find out more information on the Home Assistant official website if you prefer.

This is the official Home Assistant web site Using Automation Blueprints - Home Assistant

Example Below

1 - First most important, do a full backup of your Home Assistant, and store it in a location where you can get to it if you brick your Home Assistant (on a separate computer not running Home Assistant).

2 - To update a blueprint you must have a file editor. There are few to choose from. If you don’t have one already installed then this is how to add the official “File Editor” into your Home Assistant. Go to Settings / Add-ons and then click on “add-on store”. In the " Official add-ons" heading you will see “File Editor”, click on it and install it.

3 - In all my Blueprints, the official latest code is in the first post at the top. There is a link to my GitHub were you can find the code to copy. For this blueprint you will need to copy the code from GitHub.

  • Go to my GitHub link at the top of this post Click Here, in the code area there will be a “Raw” button. If you click on it you will then be able to easily copy the code without copping anything else.

4 - When you have copied the code, go into your file editor. At the top leftish there is a folder icon. If you click on it a navigation area is shown. Navigate to the file of the blueprint you would like to update. For this blueprint it should be in “blueprints/automation/Blackshome” and select “sensor-light-add-on.yaml” file.

5 - Once you select the file you should see the code of the blueprint displayed in the right section. At the top of all my blueprints it should say the name, in this case, “Sensor Light Add On” and you should also see the version you are on. This let’s you confirm that you are on the correct blueprint your about to update and not changing some other code that could brick you HA. Once confirmed, delete all the code and paste the new code you copied before in its place. You should now see the name again and the new version in the code at the top confirming your paste was successful and you are happy to proceed. When you pasted the code a red save button pops up and most importantly you will also see a green tick. If you don’t see this green tick, then stop, something is wrong, check the steps again until you see the green tick. If you see the green tick and you are happy with everything (again, a backup of HA) then and only then should you click save.

6 - Once saved you will need to reload the blueprint to reflect the changes before it will take affect. In the file editor you will see a cog wheel at the top right. When you click on it, select “Reload Automations”. A confirmation will pop up to confirm if your happy to proceed, click yes if your happy.

You have now updated a blueprint :tada:.

To check everything was done correctly, go into your automation and or the blueprint, you should see the new version displayed at the top confirming you are on the latest.

Enjoy

Blacky :smiley:

Back to FAQ: Click Here

The latest update appears to have fixed my issues. Thanks!

1 Like

Thanks for letting us know.

New Update - Version 1.4

New Features :new:

Added two new by-pass options.

  • Enable the By-pass - Turn automation ON
  • Enable the By-pass - Turn automation OFF

Bugs Fixes :bug:

  • Fixed bug if a switch was turn ON at the start of the automation.
  • Fixed an error when transition was disabled like shown below. This was probably when you are using zigbee2mqtt.
Transition value 0 is not valid.

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:

Hi,

Thanks for the great blueprint! One smaller issue I’ve noticed in my setup: I’m using the sun condition, which initially works as expected, however when the sun sets while watching a movie, the lights aren’t turned on, only after changing the TV state the next time. Would be great if the lights get turned on when reaching the set sun elevation while the TV is on as well

Thanks,
Jones

@JN_Jones

Hi Jones

Thanks for the feedback. Yes I agree, and I better do the same for ambient. I will do an update for this :+1:

Blacky :smiley:

1 Like