parameters: (self)
return_statement: return c
docstring: additional context passed to netjsonconfig
docstring_summary: additional context passed to netjsonconfig
docstring_tokens: additional context passed to netjsonconfig
function: def get_context(self):
          """
          additional context passed to netjsonconfig
          """
          c = {}
          if self._has_device():
              c.update(
                  {
                      'id': str(self.device.id),
                      'key': self.key,
                      'name': self.name,
                      'mac_address': self.mac_address,
                  }
              )
              if self.context:
                  c.update(self.context)
          c.update(super().get_context())
          if app_settings.HARDWARE_ID_ENABLED and self._has_device():
              c.update({'hardware_id': str(self.device.hardware_id)})
          return c
function_tokens: def get_context ( self ) : c = { } if self . _has_device ( ) : c . update ( { 'id' : str ( self . device . id ) , 'key' : self . key , 'name' : self . name , 'mac_address' : self . mac_address , } ) if self . context : c . update ( self . context ) c . update ( super ( ) . get_context ( ) ) if app_settings . HARDWARE_ID_ENABLED and self . _has_device ( ) : c . update ( { 'hardware_id' : str ( self . device . hardware_id ) } ) return c