I’m trying to remove some errors from my logs to clean stuff up and see this one pop up everytime I restart home assistant.
Error while executing automation automation.store_last_motion_on_stairs. Invalid data for call_service at pos 1: Entity ID input_number. is an invalid entity id for dictionary value @ data[‘entity_id’]
Below is the automation that is called.
- alias: Store last motion on stairs
trigger:
platform: state
entity_id:
- binary_sensor.bewegingssensor
- binary_sensor.motion_sensor_stairs_top
- binary_sensor.motion_sensor_stairs_bottom
- binary_sensor.motion_sensor_attic_stairs_top
- binary_sensor.motion_sensor_attic_stairs_bottom
to: 'on'
action:
service: input_number.set_value
data_template:
entity_id: input_number.{{ trigger.from_state.object_id }}
value: "{{ now().timestamp() | int }}"
It takes the object id from the trigger device and sets the current timestamp in an input_number-entity that has the same name (object id).
This is my input_number config, they do show up in home assistant and everything works as intended. All names as specified in the triggers are accounted for:
motion_sensor_stairs_top:
min: 0
max: 5000000000
initial: 0
mode: box
motion_sensor_stairs_bottom:
min: 0
max: 5000000000
initial: 0
mode: box
bewegingssensor:
min: 0
max: 5000000000
initial: 0
mode: box
motion_sensor_attic_stairs_top:
min: 0
max: 5000000000
initial: 0
mode: box
motion_sensor_attic_stairs_bottom:
min: 0
max: 5000000000
initial: 0
mode: box
Should I possibly check for the input_number platform or for the input_number.[id here] entity to be available? If so, any pointers would be appreciated!