···
2021-01-07 14:49:34 DEBUG (MainThread) [custom_components.havcs.helper] [helper] light.livingroom_main_light @task_0: domain = light, servcie = turn_on, data = {'brightness
_pct': 'min', 'entity_id': 'light.livingroom_main_light'}
2021-01-07 14:49:34 ERROR (MainThread) [custom_components.havcs.helper] [helper] light.livingroom_main_light @task_0: failed to call service
Traceback (most recent call last):
Traceback (most recent call last):
File "/var/lib/homeassistant/custom_components/havcs/helper.py", line 148, in process_control_command
result = await self._hass.services.async_call(domain_list[i], service_list[i], data_list[i], True)
File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/homeassistant/core.py", line 1399, in async_call
processed_data = handler.schema(service_data)
File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/validators.py", line 218, in call
return self._exec((Schema(val) for val in self.validators), v)
File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/validators.py", line 341, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/validators.py", line 337, in _exec
v = func(v)
File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in call
return self._compiled([], data)
File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/validators.py", line 215, in _run
return self._exec(self._compiled, value, path)
File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/validators.py", line 341, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/validators.py", line 339, in _exec
v = func(path, v)
File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable
return schema(data)
File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in call
return self._compiled([], data)
File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: expected float for dictionary value @ data['brightness_pct']
···
··· 2021-01-07 14:49:34 DEBUG (MainThread) [custom_components.havcs.helper] [helper] light.livingroom_main_light @task_0: domain = light, servcie = turn_on, data = {'brightness _pct': 'min', 'entity_id': 'light.livingroom_main_light'} 2021-01-07 14:49:34 ERROR (MainThread) [custom_components.havcs.helper] [helper] light.livingroom_main_light @task_0: failed to call service Traceback (most recent call last): Traceback (most recent call last): File "/var/lib/homeassistant/custom_components/havcs/helper.py", line 148, in process_control_command result = await self._hass.services.async_call(domain_list[i], service_list[i], data_list[i], True) File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/homeassistant/core.py", line 1399, in async_call processed_data = handler.schema(service_data) File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/validators.py", line 218, in call return self._exec((Schema(val) for val in self.validators), v) File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/validators.py", line 341, in _exec raise e if self.msg is None else AllInvalid(self.msg, path=path) File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/validators.py", line 337, in _exec v = func(v) File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in call return self._compiled([], data) File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/validators.py", line 215, in _run return self._exec(self._compiled, value, path) File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/validators.py", line 341, in _exec raise e if self.msg is None else AllInvalid(self.msg, path=path) File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/validators.py", line 339, in _exec v = func(path, v) File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable return schema(data) File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in call return self._compiled([], data) File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict return base_validate(path, iteritems(data), out) File "/custom/mnt/data/var/lib/homeassistant/venv/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: expected float for dictionary value @ data['brightness_pct'] ···
天猫可能以前传递数值现在传递 min max 了。 看来 min max 得替换成别的才可以