コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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());
            }
        }