diff --git a/homeassistant/components/lg_infrared/event.py b/homeassistant/components/lg_infrared/event.py index 1e86b986e2c0..1deabd6c62a0 100644 --- a/homeassistant/components/lg_infrared/event.py +++ b/homeassistant/components/lg_infrared/event.py @@ -115,6 +115,8 @@ class LgIrReceivedCommandEvent(LgIrEntity, InfraredReceiverConsumerEntity, Event try: command_code = LGTVCode(nec_command.command) except ValueError: + # Ensure that a future change to the LGTVCode enum doesn't break + # this and shows as unknown. event_type = _EVENT_TYPE_UNKNOWN else: event_type = _COMMAND_CODE_TO_EVENT_TYPE.get(