def __init__(self, name, host, ipcam, setting): """Initialize the settings switch.""" super().__init__(host, ipcam) self._setting = setting self._mapped_name = KEY_MAP.get(self._setting, self._setting) self._name = '{} {}'.format(name, self._mapped_name) self._state = False
def __init__(self, name, host, ipcam, sensor): """Initialize the binary sensor.""" super().__init__(host, ipcam) self._sensor = sensor self._mapped_name = KEY_MAP.get(self._sensor, self._sensor) self._name = '{} {}'.format(name, self._mapped_name) self._state = None self._unit = None
def __init__(self, name, host, ipcam, sensor): """Initialize the binary sensor.""" super().__init__(host, ipcam) self._sensor = sensor self._mapped_name = KEY_MAP.get(self._sensor, self._sensor) self._name = '{} {}'.format(name, self._mapped_name) self._state = None self._unit = None