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

I guess I never answered but this still happens. app_attribute is trigger but sun elevation isn’t within range and the automation doesn’t run. I can immediately trigger the automaton by reloading the Apple TV integration or pausing or any event outside of playing. In the mean time I’ve created a outside automation to reload the Family room apple tv at sun eval -15

alias: Dim Lights for Netflix
description: ""
use_blueprint:
  path: Blackshome/sensor-light-add-on.yaml
  input:
    trigger_entities:
      - media_player.family
    trigger_on_state:
      - playing
    app_attribute:
      - com.hulu.plus
      - com.amazon.aiv.AIVApp
      - com.netflix.Netflix
      - com.apple.TVWatchList
      - com.peacocktv.peacock
      - Peacock
    trigger_off_state:
      - "off"
      - standby
    light_switch:
      entity_id: scene.test
    include_light_control:
      - use_transition
    light_brightness: 10
    include_intermission: intermission_enable
    intermission_include_light_control: []
    end_scenes: []
    include_start_turn_off: enable_start_turn_off
    off_light_switch:
      entity_id:
        - light.kitchen_can
        - light.kitchen_island
        - switch.cabinet_junk
        - switch.group_exaust_fans
        - light.family_can
    intermission_light_switch:
      entity_id: scene.movie_time_paused
    intermission_end_scenes: []
    include_end_turn_on: disable_end_turn_on
    end_snapshot_name: movie_snaptoo
    include_automation_link: disable_automation_link
    include_sun: sun_enabled
    end_snapshot_helper: input_boolean.movie_end_helper
    end_light_switch:
      label_id: lamps
    intermission_light_transition_on: 5
    intermission_light_transition_off: 30
    time_delay: 3
    automation_link: []
    include_bypass: bypass_enabled_turn_off_automations
    off_light_transition_off: 20
    sun_elevation: -15
    sun_elevation_rising: -15
    trigger_bypass: switch.disable_movie_lights
    ambient_light_sensor: sensor.fp2_light_sensor_light_level
    off_include_light_control:
      - use_transition
    light_transition_on: 5
    light_transition_off: 30

@kobejo34

I’ve noticed that my Apple TV doesn’t initially connect with Home Assistant, and I have to toggle the remote entity OFF and back ON for it to be detected again. Once the Apple TV is turned off for a while, Home Assistant loses connection, and I have to repeat the process. It’s possible that your automation to reload it helps, but I suspect this is a bug with Apple TV. I think I reported it, but nothing has come of it so far.

Maybe more people need to report the bug for it to be fixed :pensive:

Blacky :smiley:

Ok thanks I add toggle to my list of fixups.

Is there a way to set a different light scene after a certain time?
I have this set to use a scene called “arctic” but after say 2200 I want the scene to change to a different one?

@MrBoofuls

You would do it in a script New script > add building block > if then > add condition > time and input your time > then: add action > scenes activate > select your scene > add else > add action > scenes activate > select your scene.

You could also just add your lights rather than using a scene but I not sure what your scene is so it may be better for you… you decide.

Blacky :smiley:

1 Like

Thanks for the help @Blacky !

I seem to have another issue now, when I turn off the media player, I’ve set it so the intermission lights turn on, but it never reverts back to other Sensor Light blueprint, I’ve got the automation link setup, with the bypass set on the Sensor Light blueprint.

I’ve also noticed if I have option 3 set that the Sensor Light blueprint generally doesn’t execute but it’s fine when I disable option 3.

Automation Link;

Sensor Light Bypass;

@MrBoofuls

I tested it here so when bypass option 3 is turned OFF the lights should adjust to the sensor light blueprint. If they are different lights then it wont turn them OFF so make sure it is the same lights used in Lights ON at End and your Sensor Light blueprint if you would like them to change. Also note you have a bypass 1 entity Sensor Light Bypass is this ON? as all bypasses must be OFF.

Blacky :grinning:

Blacky - trying to troubleshoot why the automation stopped working. what info should I look for? I haven’t changed the blueprint or the automation, only upgraded homeassistant and core as new releases come out. Even if I force run the automation it is not dimming the lights as it used to - and has been working for years correctly. Any pointers on where to look is appreciated

@Kfuhr

All still working here. If your using apple TV then go into the device and toggle the remote switch and you can also go into your media device in developer tools to see what state it is providing.

Blacky :grinning:

@Blacky - no they are Roku devices. Just checked and they are all failing to connect ;(. and checking the Roku integration this looks to be bigger than just me. Thanks for the pointer, off to try and fix my Roku integration. @Blacky - really appreciate your support and response - even when it is not your problem to resolve!

@Kfuhr

No problem, your welcome. Best of luck sorting it out.

Blacky :grinning:

An observation from my side

Equipment
Nvidia shield

App Netflix - when I click the Netflix app the lights turn off immediately, while when I use Plex for example it waits for the movie/TV show to start.
Netflix the intermission light future does not work, the lights do not turn back on while on Plex they do.

Haven’t tested Prime yet.

Yeah I’m not entirely sure what the issue is.

When I set 3 - Enable the Bypass - Keep the lights current state To on, watch something the lights don’t seem to revert back so I have to manually turn off as it doesn’t switch back to the other automation.

It also won’t trigger after and turn the lights on when motion is detected but if turn off that bypass all is good.

I’ve removed the other bypass so I don’t think that is interfering atleast.

1 Like

@dmob69

You will need to look into developer tools to see what is happening. This is a FAQ that will help you click here

Blacky :grinning:

Hello, for some reason I cannot get this to work with my Google TV Streamer box. I’ve tried using it with the Android TV Remote and ADB integrations. The automation never triggers even though I have selected all the possible “Trigger - ON” states

@nickbelle9

What you might need to do is look in developer tools under the states tab for the media player your using and see the states it has when your are using it. Then copy paste the state you would like into the input.

Blacky :grinning:

Loving this blueprint, thanks so much for it!

I’ve just got a new TV and the state attribute it uses for the App Name is “source” which doesn’t seem to be defined as a lookup in this blueprint. I was wondering if it would be possible to get it added in on a future update?

source_list:
  - Accessibility
  - Always Ready
  - Amazon Alexa
  - Apple TV
volume_level: 0.05
is_volume_muted: false
source: Netflix
sound_output: external_arc
device_class: tv
friendly_name: LG webOS TV 65QNED87A6B.BEKDLJP
supported_features: 24381
entity_picture: >-
  /api/media_player_proxy/media_player.lg_webos_tv_65qned87a6b_bekdljp

@arobsco

Hi Andy,

With LG webOS and these types of media devices the state is always ON or OFF they don’t tend to change the state like Apple TV (other media devices) will change the state to playing, paused and idle. These states changes is what makes this blueprint work.

If we turn ON our TV and the state goes to just ON and then we change the source to Netflix the blueprint will not react until the state changes. It designed to work with different state changes as we watch a move, pause it and turn the movie OFF. TV just have an ON and OFF state. A more basic automation would handle this for you.

Blacky :grinning:

Hi there,

I am looking to utilise this automation. I am using the plex chromecast option and am wanting to know if it will work with my tv. I currently use the below to turn the lights off:

thanks King

What is the proper way to call a script I tired to use entity under the heading movie lights but the script never runs the whole automation waits and waits then times out. If I run the script manually it’s fine. I don’t want to call a scene because my Kasa bulbs just go from 40% to 5% and it’s terrible. So I created a script that will slowly dim the lights actually it’s the below. I’ve even tried calling a simple script that does script.turnon the below script so it process and gets out of the way.