nielsfaber / scheduler-component

Custom component for HA that enables the creation of scheduler entities
GNU General Public License v3.0
675 stars 45 forks source link

Exception in logs #373

Closed kaizersoje closed 3 months ago

kaizersoje commented 3 months ago

Checklist

Expected behavior

[What you expected to happen]

Actual behavior

[What actually happened]

I noticed this exception in the logs. I am not sure what is causing this exception. However,

Exception in async_timer_finished when dispatching 'scheduler_timer_finished': ('6d235e',) Traceback (most recent call last): File "/config/custom_components/scheduler/switch.py", line 278, in async_timer_finished await self._action_handler.async_queue_actions( File "/config/custom_components/scheduler/actions.py", line 262, in async_queue_actions await queue.async_start(skip_initial_execution) File "/config/custom_components/scheduler/actions.py", line 409, in async_start await self.async_process_queue() File "/config/custom_components/scheduler/actions.py", line 613, in async_process_queue await async_call_from_config( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 341, in async_call_from_config await hass.services.async_call(**params, blocking=blocking, context=context) File "/usr/src/homeassistant/homeassistant/core.py", line 2728, in async_call processed_data: dict[str, Any] = handler.schema(service_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/validators.py", line 259, in __call__ return self._exec((Schema(val) for val in self.validators), v) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/validators.py", line 386, in _exec raise e if self.msg is None else AllInvalid(self.msg, path=path) File "/usr/local/lib/python3.12/site-packages/voluptuous/validators.py", line 382, in _exec v = func(v) ^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 205, in __call__ return self._compiled([], data) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 779, in validate_callable return schema(data) ^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 205, in __call__ return self._compiled([], data) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/validators.py", line 256, in _run return self._exec(self._compiled, value, path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/validators.py", line 386, in _exec raise e if self.msg is None else AllInvalid(self.msg, path=path) File "/usr/local/lib/python3.12/site-packages/voluptuous/validators.py", line 384, in _exec v = func(path, v) ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 779, in validate_callable return schema(data) ^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 205, in __call__ return self._compiled([], data) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 549, in validate_dict return base_validate(path, data.items(), out) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 382, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: extra keys not allowed @ data['level']

Steps to Reproduce

[Explain how to see the behaviour] Not sure what is causing it. Happy to help in testing.

nielsfaber commented 3 months ago

The error suggest that your schedule with ID 6d235e contains an action with parameter 'level', which your entity does not support. I think this is not a bug in the component, but a result of your configuration. I advise you to check the mentioned schedule for correctness.

kaizersoje commented 3 months ago

Thanks @nielsfaber. Not sure how you debugged that. I could not understand it.

nielsfaber commented 3 months ago

I can imagine. Usually only the first and last part of the error message are helpful.