mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Add missing type hint in zestimate (#145218)
This commit is contained in:
parent
f6a0d630c3
commit
7c5090d627
@ -107,13 +107,13 @@ class ZestimateDataSensor(SensorEntity):
|
||||
attributes["address"] = self.address
|
||||
return attributes
|
||||
|
||||
def update(self):
|
||||
def update(self) -> None:
|
||||
"""Get the latest data and update the states."""
|
||||
|
||||
try:
|
||||
response = requests.get(_RESOURCE, params=self.params, timeout=5)
|
||||
data = response.content.decode("utf-8")
|
||||
data_dict = xmltodict.parse(data).get(ZESTIMATE)
|
||||
data_dict = xmltodict.parse(data)[ZESTIMATE]
|
||||
error_code = int(data_dict["message"]["code"])
|
||||
if error_code != 0:
|
||||
_LOGGER.error("The API returned: %s", data_dict["message"]["text"])
|
||||
|
Loading…
x
Reference in New Issue
Block a user