Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def update(self):
"""Update sensor value."""
import pyhaversion
if self._installation == 'venv' or self._installation == 'hassbian':
source = 'pip'
else:
source = self._installation
if self._branch == 'rc':
branch = 'beta'
else:
branch = self._branch
data = pyhaversion.get_version_number(source, branch, self._image)
self._state = data['homeassistant']
self._attributes = data