mirror of
https://github.com/home-assistant/core.git
synced 2025-11-29 04:28:18 +00:00
Set Fahrenheit reporting precision to tenths for Homekit Controller climate entities (#50415)
This commit is contained in:
@@ -36,7 +36,7 @@ from homeassistant.components.climate.const import (
|
||||
SWING_OFF,
|
||||
SWING_VERTICAL,
|
||||
)
|
||||
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS
|
||||
from homeassistant.const import ATTR_TEMPERATURE, PRECISION_TENTHS, TEMP_CELSIUS
|
||||
from homeassistant.core import callback
|
||||
|
||||
from . import KNOWN_DEVICES, HomeKitEntity
|
||||
@@ -323,6 +323,11 @@ class HomeKitHeaterCoolerEntity(HomeKitEntity, ClimateEntity):
|
||||
"""Return the unit of measurement."""
|
||||
return TEMP_CELSIUS
|
||||
|
||||
@property
|
||||
def precision(self):
|
||||
"""Return the precision of the system."""
|
||||
return PRECISION_TENTHS
|
||||
|
||||
|
||||
class HomeKitClimateEntity(HomeKitEntity, ClimateEntity):
|
||||
"""Representation of a Homekit climate device."""
|
||||
@@ -536,6 +541,11 @@ class HomeKitClimateEntity(HomeKitEntity, ClimateEntity):
|
||||
"""Return the unit of measurement."""
|
||||
return TEMP_CELSIUS
|
||||
|
||||
@property
|
||||
def precision(self):
|
||||
"""Return the precision of the system."""
|
||||
return PRECISION_TENTHS
|
||||
|
||||
|
||||
ENTITY_TYPES = {
|
||||
ServicesTypes.HEATER_COOLER: HomeKitHeaterCoolerEntity,
|
||||
|
||||
Reference in New Issue
Block a user