Skip to content

current_temperature property is missing from ClimateEntity() class #2488

@billsq

Description

@billsq

I noticed this issue specifically with 090615.aircondition.ktf. The entities somehow do not report a current_temperature value.

It turns out that the ClimateEntity() class, which is used by 090615.aircondition.ktf, doesn't have a current_temperature property at all.

I copied and modified the code from MiotClimateEntity() which has fixed this issue:

@property
def current_temperature(self):
    if self.custom_config('target2current_temp') is True and self.is_on:
        return self.target_temperature
    if self._prop_temperature:
        return float(self._prop_temperature.from_device(self.device) or 0)
    return None

I am not feeling comfortable enough to create a PR since I am not familiar with this module. Please review and fix it accordingly.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions