Skip to content

Commit

Permalink
Fix definition
Browse files Browse the repository at this point in the history
  • Loading branch information
SukramJ committed Nov 23, 2024
1 parent 1130ffd commit aba21b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions hahomematic/model/custom/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@
ALL_BLACKLISTED_DEVICES: list[tuple[str, ...]] = []

_SCHEMA_ADDITIONAL_DPS = vol.Schema(
{
vol.Required(vol.Any(val.positive_int, tuple[int, ...])): vol.Schema(
(vol.Optional(Parameter),)
)
}
{vol.Required(vol.Any(int, tuple[int, ...])): vol.Schema((vol.Optional(Parameter),))}
)

_SCHEMA_FIELD_DETAILS = vol.Schema({vol.Required(Field): Parameter})
Expand Down Expand Up @@ -302,7 +298,7 @@
},
},
CDPD.ADDITIONAL_DPS: {
0: (Parameter.TIME_OF_OPERATION,),
-1: (Parameter.TIME_OF_OPERATION,),
},
},
DeviceProfile.IP_THERMOSTAT: {
Expand Down
4 changes: 2 additions & 2 deletions tests/test_central_pydevccu.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ async def test_central_full(central_unit_full) -> None:
) as fptr:
fptr.write(orjson.dumps(addresses, option=orjson.OPT_INDENT_2 | orjson.OPT_NON_STR_KEYS))

assert usage_types[DataPointUsage.NO_CREATE] == 3173
assert usage_types[DataPointUsage.NO_CREATE] == 3172
assert usage_types[DataPointUsage.CDP_PRIMARY] == 208
assert usage_types[DataPointUsage.DATA_POINT] == 3638
assert usage_types[DataPointUsage.DATA_POINT] == 3639
assert usage_types[DataPointUsage.CDP_VISIBLE] == 125
assert usage_types[DataPointUsage.CDP_SECONDARY] == 146

Expand Down

0 comments on commit aba21b8

Please sign in to comment.