I got this to work by calling the state_changed
event from the dev tools. I sent this payload:
entity_id: input_number.test_number
new_state:
entity_id: input_number.test_number
state: "2.3"
last_updated: "2023-12-19T03:00:00.1234+00:00"
I was able to set data for dates both in the past and the future. Although it did not update the value in the UI, it did update the history graph in the recorder, which is mostly what I care about.
Edit: See my thread for more details, but as of now, I think it’s not possible to send these Events from scripts or automations. It seems to only work from the dev tools. This is due to how HA is storing the new state as a Python Dictionary instead of a HA State object when it puts the Event on the bus.