Skip to content

Instantly share code, notes, and snippets.

@manix84
Created May 10, 2023 22:00
Show Gist options
  • Save manix84/761a2633fb555041e51a5bea53778fc7 to your computer and use it in GitHub Desktop.
Save manix84/761a2633fb555041e51a5bea53778fc7 to your computer and use it in GitHub Desktop.
blueprint:
name: Tablet Themes (Lumins)
description: |
Use Browser Mod to change the theme used on tablets around the house, based on the brightness of the local sensor.
domain: automation
source_url: https://gist.github.com/manix84/761a2633fb555041e51a5bea53778fc7
author: Manix84
input:
browser_device_id:
name: Browser Device
description: The tablet you want to switch between Light and Dark mode
selector:
device:
integration: browser_mod
illuminance_entity_id:
name: Light Sensors
description: Which light sensor to monitor.
selector:
entity:
device_class: illuminance
illuminance_level:
name: Brightness
description: What brightness to switch from Light to Dark mode
default: 20
selector:
number:
min: 1
max: 1000
unit_of_measurement: lx
trigger:
- platform: numeric_state
entity_id: !input illuminance_entity_id
above: !input illuminance_level
below: !input illuminance_level
condition: []
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: !input illuminance_entity_id
below: !input illuminance_level
sequence:
- service: browser_mod.set_theme
data:
dark: dark
target:
device_id: !input browser_device_id
- conditions:
- condition: numeric_state
entity_id: !input illuminance_entity_id
above: !input illuminance_level
sequence:
- service: browser_mod.set_theme
data:
dark: light
target:
device_id: !input browser_device_id
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment