Hi, I started having a strange issue with my HA MQTT sensors. I have many MQTT sensors and they are all working fine but I cant add any new MQTT sensors. I think this happened after I updated to the latest version of HA from a June 2022 version of HA but not sure.
My env:
HA : supervised on Debian
HA version : 2022.12.1
Here is my config for MQTT sensors in the file mqtt_sensor.yaml:
- state_topic: "home/espnow/solar_geyser/state"
name: "Solar Geyser Temperature"
unique_id: solar_geyser_temperature
value_template: >
{{ value_json.fval1 }}
device_class: temperature
unit_of_measurement: "°C"
- state_topic: "home/espnow/solar_geyser/state"
name: "Solar Geyser Battery Volt"
unique_id: solar_geyser_battery_volt
# Trim the upper value of battery voltage to 4.2v
value_template: >
{% if(value_json.fval2)|float > 4.2 %}
{{ 4.2 }}
{% elif(value_json.fval2)|float < 3.5 %}
{{ 3.5 }}
{% else %}
{{ value_json.fval2|float|round(2) }}
{% endif %}
unit_of_measurement: "V"
I use split files so the following entry is there in configuration.yaml & mqtt.yaml
mqtt: !include mqtt/mqtt.yaml
sensor: !include mqtt_sensor.yaml
Of the above solar_geyser_temperature shows up as “Disabled by MQTT integration” while the pre-existing one solar_geyser_battery_volt works fine.
I have tried putting in a new sensor with a new name and everything else, I just cant show up any new sensor. All of them are shown as Disabled by MQTT. I have seen the HA core logs and there’s no mention of these disabled sensors in the logs.
What am I doing wrong?