Skip to content

Instantly share code, notes, and snippets.

View gordol's full-sized avatar

Gordo Lowrey gordol

View GitHub Profile
ModelView
---------
# field1 (->Model1), field2 (->Model2) filtered by field1 values
column_filter_by = ('field2')
form_widget_args = {
'field2': {
'data-filter-by': 'field1',
}
}
@gordol
gordol / CaseClass.py
Created March 22, 2021 21:54 — forked from breeko/CaseClass.py
Scala's case class built out for Python
def CaseClass(case_class_name, **kwargs):
types = {}
for k, v in kwargs.items():
if type(v) is not type:
raise ValueError("{} is not a type".format(v))
types[k] = v
class CaseClassImpl():
initialized = False
@gordol
gordol / zha_lutron_aurora_blueprint.yaml
Created November 29, 2022 04:20 — forked from bjpetit/zha_lutron_aurora_blueprint.yaml
Blueprint for Lutron Aurora automations in ZHA
blueprint:
name: ZHA - Lutron Aurora Dimmer v1.3
description: 'Control lights with a Lutron Aurora Dimmer
Pressing in the dimmer button will toggle between turning lights on
to full brightness, and turning the lights off.
Rotating the dimmer will increase and decrease the light brightness.
Adjust the sensitivity if updates from the dimmer are being sent too quickly
'
domain: automation