msvisser / remeha_home

Remeha Home integration for Home Assistant
69 stars 18 forks source link

Outdoor temperature is shown as Unknown, can we use alternative? #12

Closed rdeveen closed 1 year ago

rdeveen commented 1 year ago

@msvisser Thanks for creating this HA component. Is looking and working very nice!

I don't have an external temperature sensor so the outdoor temperature is shown as "Unknown". It would be nice if in that case the cloudOutdoorTemperature is shown as a fallback scenario.

A simple implementation is something like this:

        if self.entity_description.device_class == SensorDeviceClass.TEMPERATURE:
            if value is None:
                return self.coordinator.get_appliance(self.appliance_id)["outdoorTemperatureInformation"]["cloudOutdoorTemperature"]

Or maybe use the property "capabilityOutdoorTemperature": false in the json?

Could you you have a look at it?

_Originally posted by @rdeveen in https://github.com/msvisser/remeha_home/issues/6#issuecomment-1436023196_

msvisser commented 1 year ago

I have added a specific "Cloud Outdoor Temperature" sensor. This is to have a clear distinction between the two. The sensor is disabled by default, but you can enable it from Home Assistant.