Mqtt messages with random number of spaces

Hi,

I have 10 sensors that send every couple of seconds a message in the format:

1056692943 30.5 41.5

I tried using this:
value_template: “{{ value.split(’ ')[1] }}”
to get the 2nd value (the first, large, value is a timestamp).
This fails; the sensors are never updated.
I think this has to do with the number of spaces between each column. This is number of spaces is not static.

How can I resolve this problem?

Have you tried using split without anything in the parenthesis?

From what I am seeing, the .split() will split with any amount of whitespace

value_template: “{{ value.split()[1] }}”

I haven’t tried it myself, so let me know if it works without using (’ ')

Works! Now they all show values.
Nice.
A bit crowded though; I’ve now got 20 or so circles at the top. This needs some grouping.

Well, first thing you should do is override the default_view… I think it is ugly with rows and rows of little circles that are often hard to read. The default view is terrible in my opinion, its just too bad that most new users are unaware that you can override the default_view, so they are stuck with a very unattractive and hard to manage interface.

Override the default_view and then start making your own Views and Groups… that way you don’t have to customize anything and set it to hidden, but rather everything is hidden by default and you just put the entities you want to show in your views and groups.

And, if you haven’t done so already, I would break the groups into groups.yaml, as well as most of your other configurations, it just makes it easier to manage and organize when everything isn’t shoved into your configuration.yaml