python-kasa/kasa/smart/modules/__init__.py
Teemu R b31a2ede7f
Fix changing brightness when effect is active (#1019)
This PR changes the behavior of `brightness` module if an effect is
active.
Currently, changing the brightness disables the effect when the
brightness is changed, this fixes that.
This will also improve the `set_effect` interface to use the current
brightness when an effect is activated.

* light_strip_effect: passing `bAdjusted` with the changed properties
changes the brightness.
* light_effect: the brightness is stored only in the rule, so we modify
it when adjusting the brightness. This is also done during the initial
effect activation.

---------

Co-authored-by: Steven B <51370195+sdb9696@users.noreply.github.com>
2024-07-01 13:59:24 +02:00

60 lines
1.5 KiB
Python

"""Modules for SMART devices."""
from ..effects import SmartLightEffect
from .alarm import Alarm
from .autooff import AutoOff
from .batterysensor import BatterySensor
from .brightness import Brightness
from .childdevice import ChildDevice
from .cloud import Cloud
from .color import Color
from .colortemperature import ColorTemperature
from .contactsensor import ContactSensor
from .devicemodule import DeviceModule
from .energy import Energy
from .fan import Fan
from .firmware import Firmware
from .frostprotection import FrostProtection
from .humiditysensor import HumiditySensor
from .led import Led
from .light import Light
from .lighteffect import LightEffect
from .lightpreset import LightPreset
from .lightstripeffect import LightStripEffect
from .lighttransition import LightTransition
from .reportmode import ReportMode
from .temperaturecontrol import TemperatureControl
from .temperaturesensor import TemperatureSensor
from .time import Time
from .waterleaksensor import WaterleakSensor
__all__ = [
"Alarm",
"Time",
"Energy",
"DeviceModule",
"ChildDevice",
"BatterySensor",
"HumiditySensor",
"TemperatureSensor",
"TemperatureControl",
"ReportMode",
"AutoOff",
"Led",
"Brightness",
"Fan",
"LightPreset",
"Firmware",
"Cloud",
"Light",
"LightEffect",
"LightStripEffect",
"LightTransition",
"ColorTemperature",
"Color",
"WaterleakSensor",
"ContactSensor",
"FrostProtection",
"SmartLightEffect",
]