Consider the following MQTT sensor:
- platform: mqtt
state_topic: "rfbridge-1/rfin"
name: rf433
unique_id: rf433
The payload received on this topic is a string such as XXXXXXAAAAAA
where the XXXXXX
part is irrelevant and I am interested in the content of AAAAAA
, the last six elements of the string.
Is there a way I can template this? I had a look at the templating documentation but I did not see any operations on strings (such as the Python equivalent of payload[-6:]
)