Fix typing in entity event setup (#2579)

This commit is contained in:
Joost Lekkerkerker 2025-02-24 18:43:53 +01:00 committed by GitHub
parent 1be32a88d4
commit 0021208f89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,7 +20,7 @@ So we subscribe to the event in `async_added_to_hass` and unsubscribe in `async_
class MySensor(SensorEntity):
"""Representation of a sensor."""
unsubscribe: Callable[[], None] = None
unsubscribe: Callable[[], None] | None = None
def __init__(self, client: MyClient) -> None:
"""Initialize the sensor."""