def update(self): """Get the latest state of the sensor.""" from pyetherscan import get_balance if self._token_address: self._state = get_balance(self._address, self._token_address) elif self._token: self._state = get_balance(self._address, self._token) else: self._state = get_balance(self._address)
def update(self): """Get the latest state of the sensor.""" if self._token_address: self._state = get_balance(self._address, self._token_address) elif self._token: self._state = get_balance(self._address, self._token) else: self._state = get_balance(self._address)
def update(self): """Get the latest state of the sensor.""" from pyetherscan import get_balance self._state = get_balance(self.address)