1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Fix zwave power_consumption attribute (#8968)

This commit is contained in:
Andrey
2017-08-14 04:15:59 +03:00
committed by Paulus Schoutsen
parent 74adebc2fd
commit 23273d3e88
2 changed files with 52 additions and 4 deletions

View File

@@ -54,9 +54,12 @@ def check_value_schema(value, schema):
value.instance, schema[const.DISC_INSTANCE])
return False
if const.DISC_SCHEMAS in schema:
found = False
for schema_item in schema[const.DISC_SCHEMAS]:
if not check_value_schema(value, schema_item):
return False
found = found or check_value_schema(value, schema_item)
if not found:
return False
return True