I’m getting a message from my sensor which looks like this:
{‘id’: ‘0’, ‘idx’: ‘0’, ‘alias’: None, ‘platform’: ‘state’, ‘entity_id’: ‘text.solar_fehler’, ‘from_state’: <state text.solar_fehler=00 00; mode=text, min=0, max=255, pattern=None, friendly_name=Solar Fehler @ 2024-10-07T14:46:44.116587+02:00>, ‘to_state’: <state text.solar_fehler=aa 00; mode=text, min=0, max=255, pattern=None, friendly_name=Solar Fehler @ 2024-10-10T15:01:47.361734+02:00>, ‘for’: None, ‘attribute’: None, ‘description’: ‘state of text.solar_fehler’}
This comes from an automation doing
action: notify.persistent_notification
metadata: {}
data:
message: " {{trigger}}"
Now my simple question: how do I parse this string so I get the “aa 00” from the
‘to_state’: <state text.solar_fehler=aa 00
inside?