def update(self):
        """Update the parking brake sensor."""
        self._controller.update(self._id, wake_if_asleep=False)
        data = self._controller.get_drive_params(self._id)
        if data:
            if not data['shift_state'] or data['shift_state'] == 'P':
                self.__state = True
            else:
                self.__state = False
def update ( self ) : self . _controller . update ( self . _id , wake_if_asleep = False ) data = self . _controller . get_drive_params ( self . _id ) if data : if not data [ 'shift_state' ] or data [ 'shift_state' ] == 'P' : self . __state = True else : self . __state = False
Update the parking brake sensor.