Example #1
0
 /// <summary>
 /// Set the data for this group on this device.  For lights this is the on level, for
 /// thermostats this is the temperature, etc.
 /// </summary>
 /// <param name="button">The group to change the level for</param>
 /// <param name="onLevel">The new data</param>
 public void SetState(string stateId, DeviceStateBase onLevel)
 {
     // Update the events.
     if (states.ContainsKey(stateId))
     {
         states[stateId].ValueChanged -= BasicDevice_ValueChanged;
     }
     states[stateId] = onLevel;
     states[stateId].ValueChanged += BasicDevice_ValueChanged;
 }
 public DeviceStateValueChangedEventArgs(DeviceStateBase state)
 {
     this.deviceState = state;
 }