custom-components / sensor.avanza_stock

Custom component to get stock data from Avanza for Home Assistant
MIT License
46 stars 10 forks source link

Fire events #114

Closed claha closed 1 year ago

claha commented 3 years ago

Would be neat to have price alerts which will fire an event in homeassistant when it occurs, so that it will be easy to send a notification.

price_alert_above: 100 price_alert_below: input_number.stock_123_threshold

Note: These will not be realtime since api is 15min behind but could still be useful.

Need to make sure event is only fired once, when the transition occurs. Absolute changes in % (or price) could also be useful to have events for. This would allow to easily send a notification if something changes more than 5%. Should probably be just one event with data that indicates what happened.