I wish to obtain the state of an entity by calling /api/states (no problem - works great)
Then I wish to POST the same endpoint a previous/different state w same contract to the same endpoint AND have it written to the device (the docs specifically say this isn’t supported - I wish to support it).
Seems this could be implemented by replacing
homeassistant/components/api/init.py – APIEntityStateView - hass.states.async_set(
with hass.async_reproduce_states
Why do I wish to do this? #1 - Consistency, why would one be able to read something but to write it need domain knowledge?
#2 - Implementing a totally new way of doing automation - no more automation/scenes/node red - a simple state engine much like how security polices, firewall rules, more like css - a series of selectors such as time of day, occupation, modes are merged to combine scenes, and restore to prior state when a room becomes vacant for ever.
GET in current API contract
POST