Fully Tablet Screen Control and Brightness via external sensors

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

The idea of this blueprint is to enable a tablet screen through the fully browser (via this integration) whenever a motion detector enables the motion. This blueprint doesn’t have any timeouts etc. since this was coming from my motion sensor directly. Additionally the brightness of the screen is controlled through an illuminance sensor that e.g. dims down the screen whenever the illuminance is measured to be low (“night” :wink: ). There is a possibility to provide a divider for the brightness (e.g. in my case i want the screen brightness to be 100 whenever the illuminace is higher than 200 → divider is 2).

blueprint:
  name: Fully Browser Tablet Screen and Brightness
  description: Enables and disables the Fully Tablet Screen and Brightness according to an external sensor
  domain: automation
  input:
    fully_tablet_screen:
      name: Entity of the fully Tablet Screen
      description: 'Screen entity of the fully browser'
      selector:
        entity:
          domain: light
    trigger_device:
      name: Triggering device for the Screen
      description: 'Triggers the enablement of the screen'
      selector:
        entity:
          domain: binary_sensor
    brightness_device:
      name: Device for the brightness of the Tablet Screen
      description: 'The device which determines the brightness of the Tablet Screen'
      selector:
        entity:
          domain: sensor
          device_class: illuminance
    brightness_devider:
      name: Brightness Devider
      description: Determines the ramp up of the brightness for the screen.
      default: 2
      selector:
        number:
          min: 1
          max: 20
          mode: slider
          step: 1.0
  source_url: https://gist.github.com/sbyx/6d8344d3575c9865657ac51915684696
variables:
  fully_tablet_screen: !input 'fully_tablet_screen'
  trigger_device: !input 'trigger_device'
  brightness_device: !input 'brightness_device'
  brightness_devider: !input 'brightness_devider'
trigger:
  - entity_id: !input 'trigger_device'
    platform: state
  - entity_id: !input 'brightness_device'
    platform: state
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: !input 'trigger_device'
            state: 'on'
        sequence:
          - entity_id: !input 'fully_tablet_screen'
            service: light.turn_on
            data_template:
              brightness_pct: >-
                {{ ([1, (((states(brightness_device) | int) / brightness_devider)+0.51
                | round(0)), 100]|sort)[1] }}
      - conditions:
          - condition: state
            entity_id: !input 'trigger_device'
            state: 'off'
          - condition: state
            entity_id: !input 'fully_tablet_screen'
            state: 'on'
        sequence:
          - entity_id: !input 'fully_tablet_screen'
            service: light.turn_off
mode: single
max_exceeded: silent

Hi,

I really like this blueprint. Because brightness control is something which unfortunately never worked locally (Fire tablet), not even with Adaptive Lighting.

What works well is the automatic screen on and off as the local front camera is used.

Therefore: is it possible to use this blueprint to „only“ set the brightness and have the triggering device optional?