Example #1
0
        private void SetCallbacks()
        {
            _thermostat.ThermostatModeChanged += (sender, args) =>
            {
                var controlThinkMode = args.ThermostatMode;
                var roomieMode       = controlThinkMode.ToRoomieType();

                Mode = roomieMode;

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

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

                CurrentAction = roomieAction;

                IEventSource source = null;
                var          @event = DeviceEvent.ThermostatCurrentActionChanged(_device, source);
                _device.AddEvent(@event);
            };
        }
 protected override IDeviceEvent CreateDeviceEvent()
 {
     return(DeviceEvent.ThermostatCurrentActionChanged(Device, null));
 }