So I have this scenario where I want to update a template sensor based on a couple of different data sources. I am not sure of the best approach and could use some advice.
When an event I’m interested in happens, I send a WebHook notification to HA, and build a Trigger-based Template Sensor to react to it and update some attributes based on the json data in that WebHook. So far so good.
But I also need to call a shell command when this Webhook Trigger occurs which will return some additional JSON data that I want to update some other attributes in the Template Sensor with at the same time.
As far as I can tell, I can’t call a Shell Command service from within my Jinja Template logic inside the state
or attributes
block?
Does anyone have a creative way to pull this off? Thanks!