From 6ccd71fc25c4bec972de2e7934280d1bee3e7eb3 Mon Sep 17 00:00:00 2001 From: Jimmy White Date: Thu, 4 Jan 2024 14:20:06 +0000 Subject: [PATCH] comments --- API/MqttClientWrapper.cs | 2 +- MainWindow.xaml.cs | 32 ++------------------------------ TEAMS2HA.csproj | 4 ++-- 3 files changed, 5 insertions(+), 33 deletions(-) diff --git a/API/MqttClientWrapper.cs b/API/MqttClientWrapper.cs index 8a633e9..3f54339 100644 --- a/API/MqttClientWrapper.cs +++ b/API/MqttClientWrapper.cs @@ -144,7 +144,7 @@ public static List GetEntityNames(string deviceId) $"sensor.{deviceId}_issharing", $"sensor.{deviceId}_hasunreadmessages", $"switch.{deviceId}_isbackgroundblurred" - // Add more entities based on your application's functionality + }; return entityNames; diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 90795b3..3419eb5 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -294,17 +294,7 @@ 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 async Task InitializeConnections() { await InitializeMQTTConnection(); @@ -904,25 +894,7 @@ 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 bool SaveSettings() { var settings = AppSettings.Instance; diff --git a/TEAMS2HA.csproj b/TEAMS2HA.csproj index 1c33943..b6e1c9f 100644 --- a/TEAMS2HA.csproj +++ b/TEAMS2HA.csproj @@ -5,8 +5,8 @@ net7.0-windows enable true - 1.1.0.242 - 1.1.0.242 + 1.1.0.245 + 1.1.0.245 Assets\Square150x150Logo.scale-200.ico Teams2HA Square150x150Logo.scale-200.png