mirror of
https://github.com/python-kasa/python-kasa.git
synced 2026-01-29 06:59:59 +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,7 +22,8 @@ class TemperatureSensor(SmartModule):
|
||||
self._add_feature(
|
||||
Feature(
|
||||
device,
|
||||
"Temperature",
|
||||
id="temperature",
|
||||
name="Temperature",
|
||||
container=self,
|
||||
attribute_getter="temperature",
|
||||
icon="mdi:thermometer",
|
||||
@@ -33,17 +34,20 @@ class TemperatureSensor(SmartModule):
|
||||
self._add_feature(
|
||||
Feature(
|
||||
device,
|
||||
"Temperature warning",
|
||||
id="temperature_warning",
|
||||
name="Temperature warning",
|
||||
container=self,
|
||||
attribute_getter="temperature_warning",
|
||||
type=Feature.Type.BinarySensor,
|
||||
icon="mdi:alert",
|
||||
category=Feature.Category.Debug,
|
||||
)
|
||||
)
|
||||
self._add_feature(
|
||||
Feature(
|
||||
device,
|
||||
"Temperature unit",
|
||||
id="temperature_unit",
|
||||
name="Temperature unit",
|
||||
container=self,
|
||||
attribute_getter="temperature_unit",
|
||||
attribute_setter="set_temperature_unit",
|
||||
|
||||
Reference in New Issue
Block a user