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

@kobejo34

Have you put the script into Lights - Switches - Scenes - Scripts? If you use the light entity and use Transition - ON will that work?

Blacky :grinning:

Like this?

@kobejo34

Seems like you’re using a scene, not a script, that’s probably why it looks like the script isn’t working. Swap it out for the script and give it another try :wink:

Blacky :grinning:

Hi @Blacky ,
First of all great blueprint. But it appears it doesn´t work for me. :sob:

I´ve checked everything. The YAML and all that and it seems it´s correctly setup or I´m missing something terribly obvious. The automation simply doesn´t trigger.

Platform of the media player is Amazon Fire TV Cube.
I double checked and even added all possible media player combinations but the automation never triggers. I can see the media_player indicating the status of “Playing” but nothing.

Here´s my yaml

alias: Movie Night Plex
description: ""
use_blueprint:
  path: Blackshome/sensor-light-add-on.yaml
  input:
    trigger_entities:
      - media_player.fire_tv
      - media_player.plex_plex_for_android_tv_aftgazl
    trigger_on_state:
      - playing
      - "on"
      - Playing
    app_attribute: []
    trigger_off_state:
      - paused
      - idle
      - standby
      - "off"
    off_include_light_control:
      - use_transition
    off_light_switch:
      entity_id:
        - light.gaming_room_pc
        - light.living_room_ceiling_back
        - light.hue_lightstrip_plus_1_2
        - light.smart_curtains
    include_end_turn_on: enable_end_turn_on
    end_snapshot_name: lights_before_movies
    end_light_switch:
      entity_id:
        - light.gaming_room_pc
        - light.living_room_ceiling_back
        - light.hue_lightstrip_plus_1_2
        - light.smart_curtains
    end_include_light_control:
      - use_transition
    intermission_light_switch:
      entity_id:
        - light.smart_curtains
        - light.hue_lightstrip_plus_1_2
        - light.living_room_ceiling_back
    intermission_include_light_control:
      - use_transition
    include_start_turn_off: enable_start_turn_off
    include_intermission: intermission_enable

Can you give me some feedback on what might be wrong?
Really appreciate your time.
Thank you.

@jfplopes

Just quickly looking at it (sorry big day today) you have no Movie Lights. Just add a light in light.hue_lightstrip_plus_1_2 and set it to 0% brightness (that will turn it OFF).

Let us know how you go. Like this… I have also changed your Intermission Lights and Lights ON at End so you can see how it works. Adjust as required.

alias: Movie Night Plex
description: ""
use_blueprint:
  path: Blackshome/sensor-light-add-on.yaml
  input:
    trigger_entities:
      - media_player.fire_tv
      - media_player.plex_plex_for_android_tv_aftgazl
    trigger_on_state:
      - playing
      - "on"
      - Playing
    app_attribute: []
    trigger_off_state:
      - paused
      - idle
      - standby
      - "off"
    off_include_light_control:
      - use_transition
    off_light_switch:
      entity_id:
        - light.gaming_room_pc
        - light.living_room_ceiling_back
        - light.smart_curtains
    include_end_turn_on: enable_end_turn_on
    end_snapshot_name: lights_before_movies
    end_light_switch:
      entity_id:
        - light.gaming_room_pc
        - light.living_room_ceiling_back
        - light.hue_lightstrip_plus_1_2
        - light.smart_curtains
    end_include_light_control:
      - use_transition
      - use_brightness
    intermission_light_switch:
      entity_id:
        - light.smart_curtains
        - light.hue_lightstrip_plus_1_2
        - light.living_room_ceiling_back
    intermission_include_light_control:
      - use_transition
      - use_brightness
    include_start_turn_off: enable_start_turn_off
    include_intermission: intermission_enable
    light_switch:
      entity_id: light.hue_lightstrip_plus_1_2
    include_light_control:
      - use_brightness
    light_brightness: 0
    intermission_light_brightness: 20

Blacky :grinning:

Thank you @Blacky . That was the issue.

A minor feedback regarding the app selection. There are two options available. One for Chromecast and another for Apple TV. In my case I’m using Plex on Fire TV Cube. For Fire TV Cube I used the application name “com.plexapp.android”.

With that said, marvelous automation blueprint. Thank you again for your help and this fine blueprint.
Here’s my updated config:

alias: Movie Night Plex
description: ""
use_blueprint:
  path: Blackshome/sensor-light-add-on.yaml
  input:
    trigger_entities:
      - media_player.fire_tv
    trigger_on_state:
      - playing
    app_attribute:
      - com.plexapp.android
    trigger_off_state:
      - standby
      - "off"
      - idle
      - paused
      - unavailable
    off_include_light_control: []
    off_light_switch:
      entity_id:
        - light.gaming_room_pc
        - light.living_room_ceiling_back
        - light.hue_lightstrip_plus_1_2
        - light.smart_curtains
        - light.nanoleaf_light_panels_59_c9_f3
        - switch.living_room_motion_sensor_motion_sensor_enabled
    include_end_turn_on: enable_end_turn_on_snapshot
    end_snapshot_name: lights_before_movies
    end_light_switch:
      entity_id:
        - light.gaming_room_pc
        - light.living_room_ceiling_back
        - light.hue_lightstrip_plus_1_2
        - light.smart_curtains
        - switch.living_room_motion_sensor_motion_sensor_enabled
        - light.nanoleaf_light_panels_59_c9_f3
    end_include_light_control: []
    intermission_light_switch:
      entity_id:
        - light.smart_curtains
        - light.hue_lightstrip_plus_1_2
        - light.living_room_ceiling_back
        - light.nanoleaf_light_panels_59_c9_f3
    intermission_include_light_control: []
    include_start_turn_off: enable_start_turn_off
    include_intermission: intermission_enable
    light_switch:
      entity_id: light.hue_color_spot_6
    include_light_control: []
    off_light_transition_off: 3
    end_snapshot_helper: input_boolean.light_before_movies
    intermission_state:
      - paused
      - idle

Omg I feel like such an idiot. well I selected the right one that was really a posting mistake as I tried a lot of stuff. I copied the blueprint and the only way I can get it to work is like this.

action: script.ashley_s_light_fader
data:
light: light.family_lamps
lampBrightnessScale: zeroToTwoFiftyFive
transitionTime:
hours: 0
minutes: 0
seconds: 30
easingTypeInput: easeInOutSine
endBrightnessPercent: 5
endBrightnessEntityScale: zeroToTwoFiftyFive
autoCancelThreshold: 10
shouldStopIfTheLampIsTurnedOffDuringTheFade: true
shouldResetTheStopEntityToOffAtStart: false
shouldInvertTheValueOfTheStopEntity: false
minimumStepDelayInMilliseconds: 100
shouldTryToUseNativeLampTransitionsToo: true
isDebugMode: false

Ok I got it to work by having a script call the main script which is what I think you said.