original_docstring: Current status of the meter.
docstring: Current status of the meter.
docstring_tokens: Current status of the meter .
code: def status(self) -> dict[str, bool]:
          """Current status of the meter."""
          self.send(tools.make_cmd_msg(self.obis_codes.status))
          response = tools.parse_data_msg(self.recv(17)).data[0]
          status = ("bodyIsOpen", "terminalCoverIsRemoved", "loadIsConnected", "loadIsDisconnected",
                    "failedToChangeRelayStatus", "influenceOfMagneticField", "wrongWired",
                    "dataMemoryICWorkError", "paramMemoryWorkError", "powerICError",
                    "clockOrCalendarFailure", "batteryDischarge",
                    "triggerOfButtonOfProgrammingPermission", "dataMemoryFailure",
                    "paramMemoryFailure")
          bits = f'{int(response, 16):0>16b}'
          return dict((status[idx], bit == "1") for idx, bit in enumerate(bits[:7] + bits[8:]))
code_tokens: def status ( self ) -> dict [ str , bool ] : self . send ( tools . make_cmd_msg ( self . obis_codes . status ) ) response = tools . parse_data_msg ( self . recv ( 17 ) ) . data [ 0 ] status = ( "bodyIsOpen" , "terminalCoverIsRemoved" , "loadIsConnected" , "loadIsDisconnected" , "failedToChangeRelayStatus" , "influenceOfMagneticField" , "wrongWired" , "dataMemoryICWorkError" , "paramMemoryWorkError" , "powerICError" , "clockOrCalendarFailure" , "batteryDischarge" , "triggerOfButtonOfProgrammingPermission" , "dataMemoryFailure" , "paramMemoryFailure" ) bits = f'{int(response, 16):0>16b}' return dict ( ( status [ idx ] , bit == "1" ) for idx , bit in enumerate ( bits [ : 7 ] + bits [ 8 : ] ) )
short_docstring: Current status of the meter.
short_docstring_tokens: Current status of the meter .
comment: """Current status of the meter."""