diff --git a/homeassistant/components/logbook/processor.py b/homeassistant/components/logbook/processor.py index 1a0dd478c03..d73a852ca1c 100644 --- a/homeassistant/components/logbook/processor.py +++ b/homeassistant/components/logbook/processor.py @@ -56,7 +56,7 @@ from .const import ( from .helpers import is_sensor_continuous from .models import EventAsRow, LazyEventPartialState, async_event_to_row from .queries import statement_for_request -from .queries.common import PSUEDO_EVENT_STATE_CHANGED +from .queries.common import PSEUDO_EVENT_STATE_CHANGED @dataclass @@ -201,7 +201,7 @@ def _humanify( event_type = row.event_type if event_type == EVENT_CALL_SERVICE: continue - if event_type is PSUEDO_EVENT_STATE_CHANGED: + if event_type is PSEUDO_EVENT_STATE_CHANGED: entity_id = row.entity_id assert entity_id is not None # Skip continuous sensors diff --git a/homeassistant/components/logbook/queries/common.py b/homeassistant/components/logbook/queries/common.py index ba26983dd24..362766504e3 100644 --- a/homeassistant/components/logbook/queries/common.py +++ b/homeassistant/components/logbook/queries/common.py @@ -35,7 +35,7 @@ ALWAYS_CONTINUOUS_ENTITY_ID_LIKE = like_domain_matchers(ALWAYS_CONTINUOUS_DOMAIN UNIT_OF_MEASUREMENT_JSON = '"unit_of_measurement":' UNIT_OF_MEASUREMENT_JSON_LIKE = f"%{UNIT_OF_MEASUREMENT_JSON}%" -PSUEDO_EVENT_STATE_CHANGED: Final = None +PSEUDO_EVENT_STATE_CHANGED: Final = None # Since we don't store event_types and None # and we don't store state_changed in events # we use a NULL for state_changed events @@ -71,11 +71,11 @@ STATE_CONTEXT_ONLY_COLUMNS = ( EVENT_COLUMNS_FOR_STATE_SELECT = [ literal(value=None, type_=sqlalchemy.Text).label("event_id"), - # We use PSUEDO_EVENT_STATE_CHANGED aka None for + # We use PSEUDO_EVENT_STATE_CHANGED aka None for # state_changed events since it takes up less # space in the response and every row has to be # marked with the event_type - literal(value=PSUEDO_EVENT_STATE_CHANGED, type_=sqlalchemy.String).label( + literal(value=PSEUDO_EVENT_STATE_CHANGED, type_=sqlalchemy.String).label( "event_type" ), literal(value=None, type_=sqlalchemy.Text).label("event_data"), diff --git a/tests/components/logbook/test_init.py b/tests/components/logbook/test_init.py index 2bc08cab866..d241ba74949 100644 --- a/tests/components/logbook/test_init.py +++ b/tests/components/logbook/test_init.py @@ -16,7 +16,7 @@ from homeassistant.components.alexa.smart_home import EVENT_ALEXA_SMART_HOME from homeassistant.components.automation import EVENT_AUTOMATION_TRIGGERED from homeassistant.components.logbook.models import LazyEventPartialState from homeassistant.components.logbook.processor import EventProcessor -from homeassistant.components.logbook.queries.common import PSUEDO_EVENT_STATE_CHANGED +from homeassistant.components.logbook.queries.common import PSEUDO_EVENT_STATE_CHANGED from homeassistant.components.script import EVENT_SCRIPT_STARTED from homeassistant.components.sensor import SensorStateClass from homeassistant.const import ( @@ -332,7 +332,7 @@ def create_state_changed_event_from_old_new( ], ) - row.event_type = PSUEDO_EVENT_STATE_CHANGED + row.event_type = PSEUDO_EVENT_STATE_CHANGED row.event_data = "{}" row.shared_data = "{}" row.attributes = attributes_json