Skip to content

Commit ad1ba62

Browse files
authored
Fix typos in UniFi Protect integration (home-assistant#158478)
1 parent 0c2cb46 commit ad1ba62

File tree

10 files changed

+16
-16
lines changed

10 files changed

+16
-16
lines changed

homeassistant/components/unifiprotect/binary_sensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ def _async_update_device_from_protect(self, device: ProtectDeviceType) -> None:
674674
available = self.data.last_update_success
675675

676676
# should not be possible since it would require user to
677-
# _downgrade_ to make ustorage disppear
677+
# _downgrade_ to make ustorage disappear
678678
assert self.device.system_info.ustorage is not None
679679
for disk in self.device.system_info.ustorage.disks:
680680
if disk.slot == slot:

homeassistant/components/unifiprotect/button.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
PermRequired,
2828
ProtectDeviceEntity,
2929
ProtectEntityDescription,
30-
ProtectSetableKeysMixin,
30+
ProtectSettableKeysMixin,
3131
T,
3232
async_all_device_entities,
3333
)
@@ -38,7 +38,7 @@
3838

3939
@dataclass(frozen=True, kw_only=True)
4040
class ProtectButtonEntityDescription(
41-
ProtectSetableKeysMixin[T], ButtonEntityDescription
41+
ProtectSettableKeysMixin[T], ButtonEntityDescription
4242
):
4343
"""Describes UniFi Protect Button entity."""
4444

homeassistant/components/unifiprotect/camera.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def _async_camera_entities(
114114
hass, entry, data, ufp_device
115115
):
116116
# do not enable streaming for package camera
117-
# 2 FPS causes a lot of buferring
117+
# 2 FPS causes a lot of buffering
118118
entities.append(
119119
ProtectCamera(
120120
data,

homeassistant/components/unifiprotect/entity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def __post_init__(self) -> None:
439439

440440

441441
@dataclass(frozen=True, kw_only=True)
442-
class ProtectSetableKeysMixin(ProtectEntityDescription[T]):
442+
class ProtectSettableKeysMixin(ProtectEntityDescription[T]):
443443
"""Mixin for settable values."""
444444

445445
ufp_set_method: str | None = None

homeassistant/components/unifiprotect/number.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
PermRequired,
2525
ProtectDeviceEntity,
2626
ProtectEntityDescription,
27-
ProtectSetableKeysMixin,
27+
ProtectSettableKeysMixin,
2828
T,
2929
async_all_device_entities,
3030
)
@@ -34,7 +34,7 @@
3434

3535
@dataclass(frozen=True, kw_only=True)
3636
class ProtectNumberEntityDescription(
37-
ProtectSetableKeysMixin[T], NumberEntityDescription
37+
ProtectSettableKeysMixin[T], NumberEntityDescription
3838
):
3939
"""Describes UniFi Protect Number entity."""
4040

homeassistant/components/unifiprotect/select.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
PermRequired,
3838
ProtectDeviceEntity,
3939
ProtectEntityDescription,
40-
ProtectSetableKeysMixin,
40+
ProtectSettableKeysMixin,
4141
T,
4242
async_all_device_entities,
4343
)
@@ -107,7 +107,7 @@
107107

108108
@dataclass(frozen=True, kw_only=True)
109109
class ProtectSelectEntityDescription(
110-
ProtectSetableKeysMixin[T], SelectEntityDescription
110+
ProtectSettableKeysMixin[T], SelectEntityDescription
111111
):
112112
"""Describes UniFi Protect Select entity."""
113113

homeassistant/components/unifiprotect/services.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
SERVICE_SET_CHIME_PAIRED = "set_chime_paired_doorbells"
5656
SERVICE_GET_USER_KEYRING_INFO = "get_user_keyring_info"
5757

58-
ALL_GLOBAL_SERIVCES = [
58+
ALL_GLOBAL_SERVICES = [
5959
SERVICE_ADD_DOORBELL_TEXT,
6060
SERVICE_REMOVE_DOORBELL_TEXT,
6161
SERVICE_SET_CHIME_PAIRED,

homeassistant/components/unifiprotect/switch.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
ProtectEntityDescription,
3030
ProtectIsOnEntity,
3131
ProtectNVREntity,
32-
ProtectSetableKeysMixin,
32+
ProtectSettableKeysMixin,
3333
T,
3434
async_all_device_entities,
3535
)
@@ -41,7 +41,7 @@
4141

4242
@dataclass(frozen=True, kw_only=True)
4343
class ProtectSwitchEntityDescription(
44-
ProtectSetableKeysMixin[T], SwitchEntityDescription
44+
ProtectSettableKeysMixin[T], SwitchEntityDescription
4545
):
4646
"""Describes UniFi Protect Switch entity."""
4747

@@ -552,7 +552,7 @@ async def async_turn_off(self, **kwargs: Any) -> None:
552552
await self.device.set_privacy(False, prev_mic, prev_record)
553553

554554
async def async_added_to_hass(self) -> None:
555-
"""Restore extra state attributes on startp up."""
555+
"""Restore extra state attributes on startup."""
556556
await super().async_added_to_hass()
557557
if not (last_state := await self.async_get_last_state()):
558558
return

homeassistant/components/unifiprotect/text.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
PermRequired,
2323
ProtectDeviceEntity,
2424
ProtectEntityDescription,
25-
ProtectSetableKeysMixin,
25+
ProtectSettableKeysMixin,
2626
T,
2727
async_all_device_entities,
2828
)
@@ -31,7 +31,7 @@
3131

3232

3333
@dataclass(frozen=True, kw_only=True)
34-
class ProtectTextEntityDescription(ProtectSetableKeysMixin[T], TextEntityDescription):
34+
class ProtectTextEntityDescription(ProtectSettableKeysMixin[T], TextEntityDescription):
3535
"""Describes UniFi Protect Text entity."""
3636

3737

tests/components/unifiprotect/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def sensor_fixture(fixed_now: datetime):
331331

332332

333333
@pytest.fixture(name="sensor_all")
334-
def csensor_all_fixture(sensor: Sensor):
334+
def sensor_all_fixture(sensor: Sensor):
335335
"""Mock UniFi Protect Sensor device."""
336336

337337
all_sensor = sensor.model_copy()

0 commit comments

Comments
 (0)