Hi,
I’m always getting an error after restart of pimatic.
error [pimatic,VariablesDevice]: Error getting attribute value sonnensensor.ds18b20-differenz: Expected variable espeasy-sonne_mqtt.espeasy-sonne-temp_high to have a numeric value.
It comes from a calculation which is not possible immediately after startup of pimatic. The necessary values are “unknown” (string) before they becomes updated with the detected temperature (number) of a ESPeasy device. Is it possible to handle this somehow?
I think it could work when the status “unknown” would be replaced by “0” when the variable type is a “number”.
This is the config of the affected VariablesDevice:
{
"class": "VariablesDevice",
"id": "sonnensensor",
"name": "Sonnensensor",
"variables": [
{
"name": "ds18b20-sensor_high",
"expression": "$espeasy-sonne_mqtt.espeasy-sonne-temp_high",
"type": "number",
"unit": "°C",
"acronym": "Sonne"
},
{
"name": "ds18b20-sensor_low",
"type": "number",
"expression": "$espeasy-sonne_mqtt.espeasy-sonne-temp_low",
"unit": "°C",
"acronym": "Referenz"
},
{
"name": "ds18b20-differenz",
"expression": "round($espeasy-sonne_mqtt.espeasy-sonne-temp_high - $espeasy-sonne_mqtt.espeasy-sonne-temp_low, 1)",
"type": "number",
"unit": "°C",
"acronym": "entspricht"
}
],
"xLink": "http://192.168.178.7/devices",
"xAttributeOptions": [
{
"name": "ds18b20-sensor_high",
"displaySparkline": false
},
{
"name": "ds18b20-sensor_low",
"displaySparkline": false
},
{
"name": "ds18b20-differenz",
"displaySparkline": false
}
]
},