def update(self): """Get the latest state of the sensor.""" self._attr_state = get_balance(self.addresses)
def update(self): """Get the latest state of the sensor.""" from pyblockchain import get_balance self._state = get_balance(self.addresses)
def update(self) -> None: """Get the latest state of the sensor.""" self._attr_native_value = get_balance(self.addresses)