Hello,
I’m using this snippet of code:
state_attr(trigger.entity_id, 'friendly_name')
which returns:
Balcony Door Contact
If I use:
state_attr(trigger.entity_id, 'friendly_name').split()[0]
I only get Balcony
.
Anyone know how can I select the first 2 words, both Balcony
and Door
?