Example #1
0
    def update(self):
        """Fetch data from the USCIS website and update state attributes."""
        try:
            status = uscisstatus.get_case_status(self._case_id)
            self._attributes = {self.CURRENT_STATUS: status["status"]}
            self._state = status["date"]
            self.valid_case_id = True

        except ValueError:
            _LOGGER("Please Check that you have valid USCIS case id")
            self.valid_case_id = False
Example #2
0
    def update(self):
        """Using Request to access USCIS website and fetch data."""
        import uscisstatus
        try:
            status = uscisstatus.get_case_status(self._case_id)
            self._attributes = {self.CURRENT_STATUS: status['status']}
            self._state = status['date']
            self.valid_case_id = True

        except ValueError:
            _LOGGER("Please Check that you have valid USCIS case id")
            self.valid_case_id = False
Example #3
0
    def update(self):
        """Fetch data from the USCIS website and update state attributes."""
        import uscisstatus
        try:
            status = uscisstatus.get_case_status(self._case_id)
            self._attributes = {
                self.CURRENT_STATUS: status['status']
            }
            self._state = status['date']
            self.valid_case_id = True

        except ValueError:
            _LOGGER("Please Check that you have valid USCIS case id")
            self.valid_case_id = False