Ejemplo n.º 1
0
        private void SetCallbacks()
        {
            _thermostat.ThermostatFanModeChanged += (sender, args) =>
            {
                var controlThinkMode = args.ThermostatFanMode;
                var roomieMode       = controlThinkMode.ToRoomieType();

                Mode = roomieMode;

                IEventSource source = null;
                var          @event = DeviceEvent.ThermostatFanModeChanged(_device, source);
                _device.AddEvent(@event);
            };

            _thermostat.ThermostatFanStateChanged += (sender, args) =>
            {
                var controlThinkAction = args.ThermostatFanState;
                var roomieAction       = controlThinkAction.ToRoomieType();

                CurrentAction = roomieAction;

                IEventSource source = null;
                var          @event = DeviceEvent.ThermostatFanCurrentActionChanged(_device, source);
                _device.AddEvent(@event);
            };
        }
Ejemplo n.º 2
0
 protected override IDeviceEvent CreateDeviceEvent()
 {
     return(DeviceEvent.ThermostatFanModeChanged(Device, null));
 }