That end of my setup is working fine, but in case I’m missing something… in node red the automations that change the text sensor look very simple like this (there are many similar branches like this for different prompts, which all feed into single text_input node at the end):
[{"id":"bbad6d8e.870e8","type":"api-call-service","z":"d6bde18e.b9016","name":"","server":"684e76d1.f36e78","version":1,"debugenabled":false,"service_domain":"input_text","service":"set_value","entityId":"input_text.esphome_voice","data":"{\"value\":\"{{payload}}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":2330,"y":800,"wires":[[]]},{"id":"b385595f.afdb28","type":"change","z":"d6bde18e.b9016","name":"\"001\"","rules":[{"t":"set","p":"payload","pt":"msg","to":"001","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2150,"y":800,"wires":[["bbad6d8e.870e8"]]},{"id":"46e2ef93.4c023","type":"trigger-state","z":"d6bde18e.b9016","name":"","server":"684e76d1.f36e78","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"switch.front_yard_lights","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"hfnqlnm62r","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on"},{"id":"th9b7p525kc","targetType":"this_entity","targetValue":"","propertyType":"previous_state","propertyValue":"old_state.state","comparatorType":"is_not","comparatorValueDatatype":"str","comparatorValue":"unknown"},{"id":"wtaxzxd6k3","targetType":"this_entity","targetValue":"","propertyType":"previous_state","propertyValue":"old_state.state","comparatorType":"is_not","comparatorValueDatatype":"str","comparatorValue":"unavailabe"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":1910,"y":800,"wires":[["b385595f.afdb28"],[]]},{"id":"684e76d1.f36e78","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]
The HA entity gets it’s state updated properly, and as I mentioned any time a DIFFERENT value is sent everything works fine. It only has issues if say, the same text is repeated. For example, say the sensor is at “002”, then changes to “001” (the voice prompt works), then a minute later another “001” (this voice prompt does not work). In perhaps most contexts within HA, automations only need to respond when a state changes value, but in this case it needs to respond to a new value even if it hasn’t actually changed.
I am sure I could make a hacky workaround by having my automations set the value to some invalid number after each run. That way HA would see a same text input as an actual change, from the invalid state. I’d like to avoid this… not sure if the dfplayer library etc would puke on an invalid file name? … plus I don’t like hacks if possible.