mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-08 03:34:02 +00:00
Require explicit feature type (#1006)
Explicit > implicit. Having this previously would have avoided using a wrong type for water_alert in the first place.
This commit is contained in:
@@ -36,6 +36,7 @@ class WaterleakSensor(SmartModule):
|
||||
attribute_getter="status",
|
||||
icon="mdi:water",
|
||||
category=Feature.Category.Debug,
|
||||
type=Feature.Type.Sensor,
|
||||
)
|
||||
)
|
||||
self._add_feature(
|
||||
@@ -47,6 +48,7 @@ class WaterleakSensor(SmartModule):
|
||||
attribute_getter="alert",
|
||||
icon="mdi:water-alert",
|
||||
category=Feature.Category.Primary,
|
||||
type=Feature.Type.BinarySensor,
|
||||
)
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user