Hi!
I am using the input_datetime
integration, and through it’s service input_datetime.set_datetime, I am trying to update the date with a timestamp.
I am using the code below:
type: button
tap_action:
action: call-service
service: input_datetime.set_datetime
service_data:
entity_id: input_datetime.task
timestamp: '{{ now().timestamp() + 259200.0 }}'
show_name: true
show_icon: false
name: Mark as done
hold_action:
action: none
But once I try to execute the service call, I recieve the error:
expected float for dictionary value @ data['timestamp']
I have also tried |float and as_timestamp() with no luck.
I have no clue whatsoever why this is happening, because i AM providing a float value.
Do you guys have any ideas?
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 135, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1402, in async_call
processed_data = handler.schema(service_data)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 218, in __call__
return self._exec((Schema(val) for val in self.validators), v)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 340, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 336, in _exec
v = func(v)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable
return schema(data)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File "/usr/local/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['timestamp']
Kunne ikke kalde tjenesten input_datetime/set_datetime. expected float for dictionary value @ data['timestamp']