'Update the sensor.'

def update(self):

    monitor = zoneminder.get_state(('api/monitors/%i.json' % self._monitor_id))
    if (monitor['monitor']['Monitor']['Function'] is None):
        self._state = STATE_UNKNOWN
    else:
        self._state = monitor['monitor']['Monitor']['Function']
