Hi all.
I need your help again.
I have 2 water tanks with water level sensors installed. I transmit the water level via lora transmission and I get the value in HA with MQTT.
I have created a MQTT sensor for the messages received (looks to be a text message)
When I transmit the water level I send the message in this format. Name of the tank: value in liter
Exemple: Remorque: 1000 or Cuves verger: 500
I receive the message but how to identify it? I want to set an input number based on the sensor. I mean, I need to identify the text Remorque: or Cuves vergers: and “read” the number to set the input number but I have no idea how to do it.
I have played in the developper tools with the function is_state but I need to know the full text. Is it possible to use is_state on only the first 5 characters of the sensor message so I can identify if it is Remorque or Cuves?
Once I have identified the water level sensor, how to read the number in liter?