Skip to content

Instantly share code, notes, and snippets.

@aostee
aostee / pico_light_switch_std.py
Created March 6, 2020 20:01 — forked from catchdave/pico_light_switch_std.py
Home Assistant Python Script to generalize pico remotes for any non-lutron light
#
# Script to manage a light using standard controls from a Lutron Pico Remote
# This will translate the standard button meanings on a Pico to any light controlled
# by Home Assistant.
# The "favourite" button is presumed to be 50% brightness (but can be overriden).
# Expected data packet is: { new_state: X, entity_id: entity_id, fav_brightness: [0-100] }
# new_state: REQUIRED. The pico value that triggered the event.
# entity_id: REQUIRED. The entity_id of the light to control
# fav_brightness: OPTIONAL. What brightness percentage to set when the favourite button is pressed (int 1 - 100).
#