コード例 #1
0
ファイル: sensor.py プロジェクト: pkrolkgp/home-assistant
    def update(self):
        """Get the latest state of the sensor."""
        from pyripple import get_balance

        balance = get_balance(self.address)
        if balance is not None:
            self._state = balance
コード例 #2
0
    def update(self):
        """Get the latest state of the sensor."""

        balance = get_balance(self.address)
        if balance is not None:
            self._state = balance
コード例 #3
0
 def update(self):
     """Get the latest state of the sensor."""
     from pyripple import get_balance
     balance = get_balance(self.address)
     if balance is not None:
         self._state = balance
コード例 #4
0
ファイル: sensor.py プロジェクト: rikroe/core
 def update(self):
     """Get the latest state of the sensor."""
     if (balance := get_balance(self.address)) is not None:
         self._state = balance