Esempio n. 1
0
        public static DeviceEvent BinarySensorValueChanged(IDevice device, IEventSource source)
        {
            var type = device.BinarySensor.Type;
            var value = device.BinarySensor.Value;

            switch (type)
            {
                case BinarySensorType.Motion:
                    if (value == true)
                    {
                        return MotionDetected(device, source);
                    }

                    if (value == false)
                    {
                        return StillnessDetected(device, source);
                    }
                    break;
            }

            var result = new DeviceEvent(device, new BinarySensorValueChanged(), source);

            return result;
        }
Esempio n. 2
0
        public static DeviceEvent CurrentActionChanged(IDevice device, IEventSource source)
        {
            var result = new DeviceEvent(device, new CurrentActionChanged(), source);

            return result;
        }
Esempio n. 3
0
        public static DeviceEvent ColorChanged(IDevice device, IEventSource source)
        {
            //TODO: more specific event type
            var result = new DeviceEvent(device, new DeviceStateChanged(), source);

            return result;
        }
Esempio n. 4
0
        public static DeviceEvent ThermostatSetpointsChanged(IDevice device, IEventSource source)
        {
            var result = new DeviceEvent(device, new DeviceStateChanged(), source);

            return result;
        }
Esempio n. 5
0
        public static DeviceEvent StillnessDetected(IDevice device, IEventSource source)
        {
            var result = new DeviceEvent(device, new StillnessDetected(), source);

            return result;
        }
Esempio n. 6
0
        public static DeviceEvent TemperatureChanged(IDevice device, IEventSource source)
        {
            var result = new DeviceEvent(device, new TemperatureChanged(), source);

            return result;
        }
Esempio n. 7
0
        public static DeviceEvent PoweredOn(IDevice device, IEventSource source)
        {
            var result = new DeviceEvent(device, new PoweredOn(), source);

            return result;
        }
Esempio n. 8
0
        public static DeviceEvent PowerSensorValueChanged(IDevice device, IEventSource source)
        {
            var result = new DeviceEvent(device, new DevicePowerSensorValueChanged(), source);

            return result;
        }
Esempio n. 9
0
        public static DeviceEvent MotionDetected(IDevice device, IEventSource source)
        {
            var result = new DeviceEvent(device, new MotionDetected(), source);

            return result;
        }
Esempio n. 10
0
        public static DeviceEvent Lost(IDevice device, IEventSource source)
        {
            var result = new DeviceEvent(device, new DeviceLost(), source);

            return result;
        }
Esempio n. 11
0
        public static DeviceEvent KeypadStateChanged(IDevice device, IEventSource source)
        {
            var result = new DeviceEvent(device, new DeviceStateChanged(), source);

            return result;
        }
Esempio n. 12
0
        public static DeviceEvent IlluminanceSensorValueChanged(IDevice device, IEventSource source)
        {
            //TODO: more specific event type
            var result = new DeviceEvent(device, new DeviceStateChanged(), source);

            return result;
        }
Esempio n. 13
0
        public static DeviceEvent Found(IDevice device, IEventSource source)
        {
            var result = new DeviceEvent(device, new DeviceFound(), source);

            return result;
        }