chore: updated docker
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user