Improve categorization of features (#904)

This updates the categorization of features and makes the id mandatory for features
This commit is contained in:
Teemu R
2024-05-07 11:13:35 +02:00
committed by GitHub
parent 50b5107f75
commit 55653d0346
31 changed files with 131 additions and 52 deletions

View File

@@ -19,6 +19,7 @@ def dummy_feature() -> Feature:
feat = Feature(
device=DummyDevice(), # type: ignore[arg-type]
id="dummy_feature",
name="dummy_feature",
attribute_getter="dummygetter",
attribute_setter="dummysetter",
@@ -47,6 +48,7 @@ def test_feature_missing_type():
with pytest.raises(ValueError):
Feature(
device=DummyDevice(), # type: ignore[arg-type]
id="dummy_error",
name="dummy error",
attribute_getter="dummygetter",
attribute_setter="dummysetter",
@@ -104,6 +106,7 @@ async def test_feature_action(mocker):
"""Test that setting value on button calls the setter."""
feat = Feature(
device=DummyDevice(), # type: ignore[arg-type]
id="dummy_feature",
name="dummy_feature",
attribute_setter="call_action",
container=None,