diff --git a/homeassistant/components/onvif/parsers.py b/homeassistant/components/onvif/parsers.py index cad2b3c8cab..9574d44edea 100644 --- a/homeassistant/components/onvif/parsers.py +++ b/homeassistant/components/onvif/parsers.py @@ -387,3 +387,25 @@ async def async_parse_last_clock_sync(uid: str, msg) -> Event: ) except (AttributeError, KeyError, ValueError): return None + + +@PARSERS.register("tns1:RecordingConfig/JobState") +# pylint: disable=protected-access +async def async_parse_jobstate(uid: str, msg) -> Event: + """Handle parsing event message. + + Topic: tns1:RecordingConfig/JobState* + """ + + try: + source = msg.Message._value_1.Source.SimpleItem[0].Value + return Event( + f"{uid}_{msg.Topic._value_1}_{source}", + f"{source} JobState", + "binary_sensor", + None, + None, + msg.Message._value_1.Data.SimpleItem[0].Value == "Active", + ) + except (AttributeError, KeyError): + return None