from smartswitch import SmartSwitch import ad_toolbox.smartcondition as SmartCondition from ad_toolbox.eventhandler import EventHandler # ============================================================================= # SmartLight — Light-specific extension of SmartSwitch # ============================================================================= # Adds brightness control and smooth transitions on top of all SmartSwitch # features. Use this class instead of SmartSwitch when the entity is a light. # # Inherits all SmartObject and SmartSwitch YAML keys. # The "entity" key is required and must refer to a light entity. # # YAML CONFIGURATION # ------------------ # # brightness_pct_step: # optional, default 5 # Step size (% of full brightness) used by increase/decrease events. # # brightness_step_transition: # optional, default 0.5 # Transition duration applied to each increase/decrease brightness # step. Smooths out the brightness change instead of jumping. # # increase_brightness_events: # optional # # HA events that increase brightness by brightness_pct_step. # Has no effect while the light is off. # # decrease_brightness_events: # optional # # HA events that decrease brightness by brightness_pct_step. # Has no effect while the light is off. # # on_events_with_transition: # optional #