Help know status of mqtt sensor

Hello to everyone,

I have a netatmo system for my home heating. This system include the relay and 3 valves.
The relay, works with RF signal and by distribution of devices, i have problems with rf cover, and decided to add 2 wemos with ESPEasy to the system.

First wemos is connected to the relay, and when i switch on heating system, this wemos send a wifi signal to second wemos that is connected to the boiler and turn on boiler.

Some times, i dunno why, but the second wemos not enable (switch on) the exit to the boiler, and netatmo relay is switched on.

I would like to know the status of these 2 exits of my wemos (status of “in1” in each one), to know if heating is on or not.

I know if in my config i put this config i will know the status of each sensor

- platform: mqtt
  name: "Calefaccion_hab2"
  state_topic: "/wemos4_tx/in1/in1"
  icon: mdi:radiator

- platform: mqtt
  name: "Calefaccion_lavadero"
  state_topic: "/wemos5_rx/in1/in1"
  icon: mdi:radiator

I would like to integrate all in one, and also a button or buttons (input_booleans) to switch on (send mqtt signal to differents wemos) heating in case that one of them is not in the position that should.

It’s posible to make this configuration with Templeate_sensor? Maybe exists better option? In case of yes, can someone help me how to do it?