parameters: (self, **kwargs)
return_statement: return
docstring: Refresh device status on SmartThings
docstring_summary: Refresh device status on SmartThings
docstring_tokens: Refresh device status on SmartThings
function: async def _device_refresh(self, **kwargs):
          """Refresh device status on SmartThings"""
  
          device_id = self._device_id
          if not device_id:
              return
  
          api_device = f"{API_DEVICES}/{device_id}"
          api_command = f"{api_device}/commands"
  
          if self._use_channel_info:
              async with self._session.post(
                  api_command,
                  headers=_headers(self._api_key),
                  data=_command(COMMAND_REFRESH),
                  raise_for_status=False,
              ) as resp:
                  if resp.status == 409:
                      self._state = STStatus.STATE_OFF
                      return
                  resp.raise_for_status()
                  await resp.json()
  
          return
function_tokens: async def _device_refresh ( self , * * kwargs ) : device_id = self . _device_id if not device_id : return api_device = f"{API_DEVICES}/{device_id}" api_command = f"{api_device}/commands" if self . _use_channel_info : async with self . _session . post ( api_command , headers = _headers ( self . _api_key ) , data = _command ( COMMAND_REFRESH ) , raise_for_status = False , ) as resp : if resp . status == 409 : self . _state = STStatus . STATE_OFF return resp . raise_for_status ( ) await resp . json ( ) return