diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index aeaef0a..78d4d8d 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -294,17 +294,17 @@ public MainWindow() #endregion Public Constructors #region Public Methods - public static List GetEntityNames() - { - // Example: return a list of entity names based on the sensors and switches - return new List - { - "Teams Mute Switch", - "Teams Video Switch", - "Teams Hand Raised Sensor", - // Add more entities as per your application's functionality - }; - } + //public static List GetEntityNames() + //{ + // // Example: return a list of entity names based on the sensors and switches + // return new List + // { + // "Teams Mute Switch", + // "Teams Video Switch", + // "Teams Hand Raised Sensor", + // // Add more entities as per your application's functionality + // }; + //} public async Task InitializeConnections() { await InitializeMQTTConnection(); @@ -903,24 +903,24 @@ private async Task PublishConfigurations(MeetingUpdate meetingUpdate, AppSetting } - private async Task PublishDiscoveryMessages() - { - var muteSwitchConfig = new - { - name = "Teams Mute", - unique_id = "TEAMS2HA_mute", - state_topic = "TEAMS2HA/TEAMS/mute", - command_topic = "TEAMS2HA/TEAMS/mute/set", - payload_on = "true", - payload_off = "false", - device = new { identifiers = new[] { "TEAMS2HA" }, name = "Teams Integration", manufacturer = "Your Company" } - }; - - string muteConfigTopic = "homeassistant/switch/TEAMS2HA/mute/config"; - await mqttClientWrapper.PublishAsync(muteConfigTopic, JsonConvert.SerializeObject(muteSwitchConfig)); - - // Repeat for other entities like video - } + //private async Task PublishDiscoveryMessages() + //{ + // var muteSwitchConfig = new + // { + // name = "Teams Mute", + // unique_id = "TEAMS2HA_mute", + // state_topic = "TEAMS2HA/TEAMS/mute", + // command_topic = "TEAMS2HA/TEAMS/mute/set", + // payload_on = "true", + // payload_off = "false", + // device = new { identifiers = new[] { "TEAMS2HA" }, name = "Teams Integration", manufacturer = "Your Company" } + // }; + + // string muteConfigTopic = "homeassistant/switch/TEAMS2HA/mute/config"; + // await mqttClientWrapper.PublishAsync(muteConfigTopic, JsonConvert.SerializeObject(muteSwitchConfig)); + + // // Repeat for other entities like video + //} private bool SaveSettings() { @@ -991,6 +991,8 @@ private async void SetupMqttSensors() // Call PublishConfigurations with the dummy MeetingUpdate await PublishConfigurations(dummyMeetingUpdate, _settings); + + } private async void TeamsClient_TeamsUpdateReceived(object sender, WebSocketClient.TeamsUpdateEventArgs e)