Skip to content

Radiators show temperature 0 instead of unavailable when cloud contact is lost #11

@Koffeinuser

Description

@Koffeinuser

Problem

When an Adax radiator loses connection to the Adax cloud, the API returns "temperature": 0 in the room object. The library stores this as 0.0 without any indication that the value is invalid:

room["temperature"] = room.get("temperature", 0) / 100.0

Since 0 is never a valid indoor temperature, this is clearly a sentinel value meaning "no data from device" — but callers of the library have no way to distinguish it from a real reading.

Suggested fix

raw_temp = room.get("temperature", 0)
room["temperature"] = raw_temp / 100.0 if raw_temp != 0 else None

Returning None when the raw value is 0 correctly signals to callers that no temperature data is available.

Context

Discovered while using Adax radiators in my Home Assistant integration. When a radiator goes offline, the integration keeps showing 0.0°C as a valid reading with no way to detect the failure. The native Adax app also shows no temperature in this state, confirming it is an offline/disconnected condition. Returning None would allow integrations to properly handle this case (e.g. mark the device as unavailable).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions