Пример #1
0
        internal void Update(byte?value)
        {
            Value     = value;
            TimeStamp = DateTime.UtcNow;

            //TODO: what else is this value used for?
            if (_device.Type.Equals(DeviceType.BinarySensor))
            {
                _device.AddEvent(DeviceEvent.BinarySensorValueChanged(_device, null));
            }
        }
        private void HandleDeviceConnected(OpenZWaveDevice device, bool connected)
        {
            if (device.IsConnected == connected)
            {
                return;
            }

            device.IsConnected = connected;

            var @event = connected ? DeviceEvent.Found(device, null) : DeviceEvent.Lost(device, null);

            device.AddEvent(@event);
        }
        private void HandleDeviceConnected(OpenZWaveDevice device, bool connected)
        {
            if (device.IsConnected == connected)
            {
                return;
            }

            device.IsConnected = connected;

            var @event = connected ? DeviceEvent.Found(device, null) : DeviceEvent.Lost(device, null);
            device.AddEvent(@event);
        }