There might be a way to do this with Home Assistant automations, but Iām not 100% sure.
I use Node-Red for my automations and the trigger: state
node supports specifying an entity_id that matches either a substring or a regular expression. So I can basically say match any entity id that starts with binary_sensor.steam_wishlist_
and if itās state changed to on
then I trigger a push notification to my device with details about the game on sale.
It ends up looking something like:
![image](https://community-assets.home-assistant.io/original/4X/a/7/a/a7a271cf6a46534d5c50f497473912af00f8718b.png)
The exported nodes for reference:
[{"id":"baf41efa.b6ff38","type":"function","z":"2e948d2d.6eacca","name":"Generate Message","func":"const attrs = msg.data.event.new_state.attributes;\nmsg.payload = {message: `${attrs.title} is now ${attrs.percent_off}% off. Pick it up now for ${attrs.sale_price}.`}\n\nconst date = new Date().toLocaleDateString('en-US', {\n month: 'short',\n day: 'numeric',\n hour12: false,\n hour: 'numeric',\n minute: 'numeric'\n })\nconst statusText = `${attrs.title} at: ${date}`\nnode.status({fill:\"green\",shape:\"dot\",text: statusText});\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":370,"y":480,"wires":[["3b9186b8.643032"]]},{"id":"487eefea.babf7","type":"trigger-state","z":"2e948d2d.6eacca","name":"Steam Wishlist State Change","server":"","version":2,"entityid":"binary_sensor.steam_wishlist_","entityidfiltertype":"substring","debugenabled":false,"constraints":[{"id":"0gexxpkk9pni","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"bool","comparatorValue":"true"},{"id":"29jhmsz4jmv","targetType":"this_entity","targetValue":"","propertyType":"previous_state","propertyValue":"old_state.state","comparatorType":"is","comparatorValueDatatype":"bool","comparatorValue":"false"}],"inputs":1,"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"habool","enableInput":true,"x":140,"y":480,"wires":[["baf41efa.b6ff38"],[]]}]