Home Assistant
communityOpen-source smart home automation platform supporting 2000+ device integrations.
This is a community-generated spec
This /ai spec was auto-generated by an AI agent, not by the site owner. It may be incomplete or inaccurate.
GET
https://{instance}/api/statesGet all device states
Returns
states[] with entity_id, state, attributes (device-specific), last_changed, last_updatedPOST
https://{instance}/api/services/{domain}/{service}Call a service (turn on/off, etc)
Parameters
domainlight|switch|climate|media_player (stringrequiredserviceturn_on|turn_off|toggle (stringrequiredentity_iddevice entity ID (stringrequiredReturns
state changes[] with entity_id, new stateGET
https://{instance}/api/history/period/{timestamp}Get device state history
Parameters
end_timeISO8601 end time (stringoptionaltimestampISO8601 start time (stringrequiredfilter_entity_identity ID (stringoptionalReturns
entity histories[][] with state, last_changed, last_updated, attributes