Type mysensors strictly (#51535)

This commit is contained in:
Martin Hjelmare 2021-06-07 16:04:04 +02:00 committed by GitHub
parent 564042ec67
commit 7560a77e0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 329 additions and 192 deletions

View file

@ -117,7 +117,10 @@ def switch_ir_send_schema(
def get_child_schema(
gateway: BaseAsyncGateway, child: ChildSensor, value_type_name: ValueType, schema
gateway: BaseAsyncGateway,
child: ChildSensor,
value_type_name: ValueType,
schema: dict,
) -> vol.Schema:
"""Return a child schema."""
set_req = gateway.const.SetReq
@ -136,7 +139,7 @@ def get_child_schema(
def invalid_msg(
gateway: BaseAsyncGateway, child: ChildSensor, value_type_name: ValueType
):
) -> str:
"""Return a message for an invalid child during schema validation."""
pres = gateway.const.Presentation
set_req = gateway.const.SetReq