'Get the latest data and updates the state.'

def update(self):

    self._data.check_alerts()
    if self._data.alert:
        self._state = (self._sensor_type == self._data.alert.get('kind'))
    else:
        self._state = False
