chore: updated docker

This commit is contained in:
willem.serruys
2025-12-29 06:06:46 +01:00
parent 16b515de2d
commit de6558ec7e
4 changed files with 114 additions and 1 deletions

View File

@@ -6,10 +6,13 @@ var app = builder.Build();
app.MapPost(
"/high_power_alert",
(object body) =>
async (AlertBody body) =>
{
Console.WriteLine("high power alert was received.");
Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(body));
using var client = new HttpClient();
await client.GetAsync("http://192.168.1.121/control?cmd=heatpump&set_power_mode=off");
return new OkResult();
}
)
@@ -26,3 +29,8 @@ app.MapPost(
.WithName("Low Power Alert");
app.Run();
record AlertBody
{
string status;
}