Can this library be used to call services/fire events in HASS?
ChristopherLMiller opened this issue · comments
Christopher Miller commented
Trying to integrate home assistant into a dashboard app I'm building and its nice to get states of entities but I was wondering if I'm just being thick or is there not a way to fire events to home assistant from this?
Paulus Schoutsen commented
You can't fire events since that's a developer thing. It's available via the Rest API.
Stefan Girlich commented
Firing events is possible by sending a message as seen here: https://developers.home-assistant.io/docs/api/websocket/#fire-an-event
Example:
connection.sendMessage({
type: 'fire_event',
event_type: 'your_event_type',
})