private void PublishUnitState(clsUnit unit) { MqttClient.PublishAsync(unit.ToTopic(Topic.state), unit.ToState(), MqttQualityOfServiceLevel.AtMostOnce, true); if (unit.Number < 385) { MqttClient.PublishAsync(unit.ToTopic(Topic.brightness_state), unit.ToBrightnessState().ToString(), MqttQualityOfServiceLevel.AtMostOnce, true); } }
private void PublishUnitState(clsUnit unit) { PublishAsync(unit.ToTopic(Topic.state), unit.ToState()); if (unit.Number < 385) { PublishAsync(unit.ToTopic(Topic.brightness_state), unit.ToBrightnessState().ToString()); } }