Hi, i managed to let my Office Speaker say when the Birthday Calendar contains an entry. Nest Mini then announces the Name of the entry. Very often this is only the name of the person having birthday. In some cases i have the Name and the Year of Birth in the Google calendar (to know the age of the person), like "Chester Thompson (1956)".
[{"id":"b68b2b61.836ef8","type":"inject","z":"50076042.9e6b9","name":"Stündlich 13 - 19 Uhr","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"*/2 11-18 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":1000,"wires":[["d9ab86b2.e67d08"]]},{"id":"d9ab86b2.e67d08","type":"api-current-state","z":"50076042.9e6b9","name":"Geburtstag Eintrag","server":"d6fce7c.2c79718","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"calendar.geburtstage","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":440,"y":1000,"wires":[["29bcde8e.0ecd12"],[]]},{"id":"29bcde8e.0ecd12","type":"api-call-service","z":"50076042.9e6b9","name":"Sprachausgabe Büro","server":"d6fce7c.2c79718","version":3,"debugenabled":false,"service_domain":"tts","service":"google_translate_say","entityId":"media_player.buro","data":"{\t \"message\": \"Heute hat {{data.attributes.message}} Geburtstag\" }","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":1000,"wires":[[]]},{"id":"d6fce7c.2c79718","type":"server","name":"Home Assistant","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
Now i want the script to split the calendar.birthday.data.attributes.messages when it contains brackets "(" and change the output to a calculated age, like "today is Chester Thomposon birthday, turning 65 years.")
How can I manage this with Node-Red?