SubscribeEvents - timer.finished
shannonhochkins opened this issue · comments
Shannon Hochkins commented
Through homeassistant developer panel, even though on the right hand side it does not mention timer.finished, if you listen for timer.finished it will respond when the timer does indeed finished.
Using:
connection.subscribeEvents(ev => {
console.log('ev', ev);
}, 'timer.finished').then(r => {
});
returns {code: 'unauthorized', message: 'Unauthorized'}
- what am i doing wrong here?
Paulus Schoutsen commented
Only admins are allowed to listen to all events. Non-admins can only subscribe to these events: https://github.com/home-assistant/core/blob/dev/homeassistant/components/websocket_api/permissions.py#L29