Replies: 1 comment
-
Hi @MarCiu11, There is "setName" method available that allows setting HA label. Based on your example it should be: temp.setUnitOfMeasurement("°C");
temp.setName("Temp"); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Recently, I have a problem with the names of sensors in H.A.
I define a sensor for example:
HASensor temp("Temp");
in setup(){}
temp.setUnitOfMeasurement("°C");
temp.componentName("Temp");
And send to H.A.:
temp.setValue(s);
Home Assistant can see the sensor and its value without a problem, but its name is "MQTT Sensor" and so is the case with every sensor.
Earlier it was ok. Now I wanted to make a new thermometer and the reading of temperature, pressure and humidity looks like "MQTT Sensor"
Beta Was this translation helpful? Give feedback.
All reactions