mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-12-21 04:00:19 +00:00
Improve categorization of features (#904)
This updates the categorization of features and makes the id mandatory for features
This commit is contained in:
@@ -22,20 +22,25 @@ class BatterySensor(SmartModule):
|
||||
self._add_feature(
|
||||
Feature(
|
||||
device,
|
||||
"battery_level",
|
||||
"Battery level",
|
||||
container=self,
|
||||
attribute_getter="battery",
|
||||
icon="mdi:battery",
|
||||
unit="%",
|
||||
category=Feature.Category.Info,
|
||||
)
|
||||
)
|
||||
self._add_feature(
|
||||
Feature(
|
||||
device,
|
||||
"battery_low",
|
||||
"Battery low",
|
||||
container=self,
|
||||
attribute_getter="battery_low",
|
||||
icon="mdi:alert",
|
||||
type=Feature.Type.BinarySensor,
|
||||
category=Feature.Category.Debug,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user