Here You go ![]()
Items:
String MQTTThing_Temperature "Temperature [%s °C]" {channel="mqtt:topic:sky:temp"}
String MQTTThing_Preasure "Preasure [%s hPa]" {channel="mqtt:topic:sky:Preasure"}
String MQTTThing_Seepreasure "Seepreasure [%s hPa]" {channel="mqtt:topic:sky:seepreasure"}
String MQTTThing_Humidity "Humidity [%s %%]" {channel="mqtt:topic:sky:Humidity"}
Number MQTTThing_Temperature_num "Temperature [%.1f °C]" <temperature> (Sensor)
Number MQTTThing_Preasure_num "Preasure [%.1f hPa]" <pressure> (Sensor)
Number MQTTThing_Seepreasure_num "Seepreasure [%.1f hPa]" <pressure> (Sensor)
Number MQTTThing_Humidity_num "Humidity [%.1f %%]" <pressure> (Sensor)
Rules:
rule "MQTT Temperature String to Number"
when
Item MQTTThing_Temperature changed
then
MQTTThing_Temperature_num.postUpdate(Float::parseFloat(String::format("%s",MQTTThing_Temperature.state).replace(' ','')))
MQTTThing_Preasure_num.postUpdate(Float::parseFloat(String::format("%s",MQTTThing_Preasure.state).replace(' ','')))
MQTTThing_Seepreasure_num.postUpdate(Float::parseFloat(String::format("%s",MQTTThing_Seepreasure.state).replace(' ','')))
MQTTThing_Humidity_num.postUpdate(Float::parseFloat(String::format("%s",MQTTThing_Humidity.state).replace(' ','')))
end
Esp:
Paper UI:
Rafal



