Yes, thank you! Moving to 1 line of DSTime works!
Added after 33 [minutes]:
A general question!
We use the DoorSensor, and logically, opening is an important event!
For a water leak sensor, on the contrary, closing is an important event.
A binary sensor is automatically published in the Home assistant mqtt discovery.
{
"dev": {
"ids": [
"Water_Leak_Posudomoika"
],
"name": "Posudomoika",
"sw": "1.18.12",
"mf": "Beken Corporation",
"mdl": "BK7231N",
"cu": "http://192.168.1.23/index"
},
"name": "0",
"~": "WaterLeakPosudomoika",
"pl_on": "0", <-- this
"pl_off": "1", <-- this
"uniq_id": "Water_Leak_Posudomoika_binary_sensor_0",
"qos": 1,
"stat_t": "~/0/get"
}
It would be more correct to change the water leak sensor.
"pl_on": "1",
"pl_off": "0",
And add the device class moisture.
I've set it up temporarily using MQTT Explorer.
Is there any way to configure this, in the configuration for automatic changes?