'Update the sensor.'

def update(self):

    archived_filter = '/Archived:0'
    if self._include_archived:
        archived_filter = ''
    event = zoneminder.get_state(('api/events/index/MonitorId:%i%s.json' % (self._monitor_id, archived_filter)))
    self._state = event['pagination']['count']
