mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 14:15:12 +02:00
Apply PR Feedback
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
"""Climate device for CCM15 coordinator."""
|
"""Climate device for CCM15 coordinator."""
|
||||||
import datetime
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, Optional
|
from typing import Any
|
||||||
|
|
||||||
from ccm15 import CCM15Device, CCM15DeviceState, CCM15SlaveDevice
|
from ccm15 import CCM15Device, CCM15DeviceState, CCM15SlaveDevice
|
||||||
import httpx
|
import httpx
|
||||||
@@ -219,10 +219,9 @@ class CCM15Climate(CoordinatorEntity[CCM15Coordinator], ClimateEntity):
|
|||||||
@property
|
@property
|
||||||
def extra_state_attributes(self) -> dict[str, Any]:
|
def extra_state_attributes(self) -> dict[str, Any]:
|
||||||
"""Return the optional state attributes."""
|
"""Return the optional state attributes."""
|
||||||
data: Optional[CCM15SlaveDevice] = self.coordinator.get_ac_data(self._ac_index)
|
if data := self.coordinator.get_ac_data(self._ac_index):
|
||||||
if data is None:
|
return {"error_code": data.error_code}
|
||||||
return {}
|
return {}
|
||||||
return {"error_code": data.error_code}
|
|
||||||
|
|
||||||
async def async_set_temperature(self, **kwargs: Any) -> None:
|
async def async_set_temperature(self, **kwargs: Any) -> None:
|
||||||
"""Set the target temperature."""
|
"""Set the target temperature."""
|
||||||
|
Reference in New Issue
Block a user