Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyeao committed Jan 4, 2024
1 parent 226623e commit 6ccd71f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 33 deletions.
2 changes: 1 addition & 1 deletion API/MqttClientWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public static List<string> GetEntityNames(string deviceId)
$"sensor.{deviceId}_issharing",
$"sensor.{deviceId}_hasunreadmessages",
$"switch.{deviceId}_isbackgroundblurred"
// Add more entities based on your application's functionality

};

return entityNames;
Expand Down
32 changes: 2 additions & 30 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,17 +294,7 @@ public MainWindow()
#endregion Public Constructors

#region Public Methods
//public static List<string> GetEntityNames()
//{
// // Example: return a list of entity names based on the sensors and switches
// return new List<string>
// {
// "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();
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions TEAMS2HA.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<TargetFramework>net7.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<AssemblyVersion>1.1.0.242</AssemblyVersion>
<FileVersion>1.1.0.242</FileVersion>
<AssemblyVersion>1.1.0.245</AssemblyVersion>
<FileVersion>1.1.0.245</FileVersion>
<ApplicationIcon>Assets\Square150x150Logo.scale-200.ico</ApplicationIcon>
<Title>Teams2HA</Title>
<PackageIcon>Square150x150Logo.scale-200.png</PackageIcon>
Expand Down

0 comments on commit 6ccd71f

Please sign in to comment.