original_docstring:  Returns the state of a specific entity. 
docstring: Returns the state of a specific entity.
docstring_tokens: Returns the state of a specific entity .
code: def _handle_get_api_states_entity(handler, path_match, data):
      """ Returns the state of a specific entity. """
      entity_id = path_match.group('entity_id')
  
      state = handler.server.hass.states.get(entity_id)
  
      if state:
          handler.write_json(state)
      else:
          handler.write_json_message("State does not exist.", HTTP_NOT_FOUND)
code_tokens: def _handle_get_api_states_entity ( handler , path_match , data ) : entity_id = path_match . group ( 'entity_id' ) state = handler . server . hass . states . get ( entity_id ) if state : handler . write_json ( state ) else : handler . write_json_message ( "State does not exist." , HTTP_NOT_FOUND )
short_docstring: Returns the state of a specific entity.
short_docstring_tokens: Returns the state of a specific entity .
comment: """ Returns the state of a specific entity. """