Skip to content

Commit f29bc08

Browse files
committed
Fixes
1 parent 43d0fa1 commit f29bc08

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

custom_components/plugwise/binary_sensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def _add_entities() -> None:
137137
for description in PLUGWISE_BINARY_SENSORS:
138138
if description.key not in binary_sensors:
139139
continue
140-
ha_entities.append(PlugwiseBinarySensorEntity(coordinator, pw_entity, description))
140+
entities.append(PlugwiseBinarySensorEntity(coordinator, pw_entity, description))
141141
LOGGER.debug(
142142
"Add %s %s binary sensor", pw_entity["name"], description.translation_key
143143
)
@@ -179,7 +179,7 @@ def is_on(self) -> bool:
179179
@property
180180
def extra_state_attributes(self) -> Mapping[str, Any] | None:
181181
"""Return entity specific state attributes."""
182-
if self.entity_dscription.key != PLUGWISE_NOTIFICATION: # Upstream const
182+
if self.entity_description.key != PLUGWISE_NOTIFICATION: # Upstream const
183183
return None
184184

185185
# pw-beta adjustment with attrs is to only represent severities *with* content

custom_components/plugwise/climate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
322322
await self.async_set_preset_mode(PRESET_AWAY) # pragma: no cover
323323
if (
324324
self._homekit_mode in [HVACMode.HEAT, HVACMode.HEAT_COOL]
325-
and self.device_zone[ACTIVE_PRESET] == PRESET_AWAY
325+
and self.pw_entity[ACTIVE_PRESET] == PRESET_AWAY
326326
): # pragma: no cover
327327
await self.async_set_preset_mode(PRESET_HOME) # pragma: no cover
328328

custom_components/plugwise/coordinator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ async def _async_update_data(self) -> PlugwiseData:
110110
raise ConfigEntryError("Device with unsupported firmware") from err
111111
else:
112112
LOGGER.debug(f"{self.api.smile_name} data: %s", data)
113-
await self.async_add_remove_plugise_entities(data, self.config_entry)
113+
await self.async_add_remove_plugwise_entities(data, self.config_entry)
114114

115115
return data
116116

@@ -142,7 +142,7 @@ async def async_remove_plugwise_entities(self, data: PlugwiseData, entry: Config
142142
if identifier[0] == DOMAIN:
143143
if (
144144
device_entry.via_device_id == via_device_id
145-
and identifier[1] not in data.device_zones
145+
and identifier[1] not in data.entities
146146
):
147147
device_reg.async_update_device(
148148
device_entry.id, remove_config_entry_id=entry.entry_id

custom_components/plugwise/select.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def _add_entities() -> None:
8686
if not coordinator.new_pw_entities:
8787
return
8888

89-
entities: list[PlugwiseClimateEntity] = []
89+
entities: list[SelectEntity] = []
9090
for pw_entity_id in coordinator.new_pw_entities:
9191
pw_entity = coordinator.data.entities[pw_entity_id]
9292
for description in SELECT_TYPES:

0 commit comments

Comments
 (0)