One of my subflows has a node that searches for then creates an array based on the entity_id of some of my Sonos speakers. Search criteria is filtered on the naming convention of the Sonos devices in HA.
I have a need to create a similar subflow but in this case, the Sonos entitiy_id names don’t contain a common element that can be searched on. Is it possible to search using the Manufacture name rather than entity_id? I tried the following but the node reports no entities found, regardless of the spelling of manufacturer.
Following is my working subflow;
[{"id":"88f64612ee252d1a","type":"ha-get-entities","z":"4ed4def360353223","name":"ID Sonos Speakers","server":"fcf9b76b.256a88","version":0,"rules":[{"property":"entity_id","logic":"is","value":"(?<=media_player)(.*)(?=_sonos$)","valueType":"re"}],"output_type":"array","output_empty_results":false,"output_location_type":"msg","output_location":"sonos_speaker_list","output_results_count":1,"x":250,"y":140,"wires":[["bb2022cfc987684f"]],"info":"The name of all Sonos speakers installed in the house ends with _sonos. Use a filter to identify and build an array of all active speakes."},{"id":"bb2022cfc987684f","type":"function","z":"4ed4def360353223","name":"Create Listing","func":"msg.sonos_speaker_list_entity_id = []\nfor (var i = 0; i < msg.sonos_speaker_list.length; i++) {\n msg.sonos_speaker_list_entity_id[i] = msg.sonos_speaker_list[i].entity_id;\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":140,"wires":[["993c9e14ec182896"]]},{"id":"993c9e14ec182896","type":"api-call-service","z":"4ed4def360353223","name":"Ungroup Sonos Speakers","server":"fcf9b76b.256a88","version":5,"debugenabled":true,"domain":"sonos","service":"unjoin","areaId":[],"deviceId":[],"entityId":[],"data":"{\"entity_id\":\"{{sonos_speaker_list_entity_id}}\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":690,"y":140,"wires":[[]]},{"id":"fcf9b76b.256a88","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]