set more state retained

This commit is contained in:
Your Name 2022-12-20 00:07:10 +01:00
parent 0d15479268
commit 43e638a587

View File

@ -264,9 +264,9 @@ void Plant::advertise(void)
{
// Advertise topics
mPump = this->mPlant->advertise("switch").setName("Pump").setDatatype("Boolean");
this->mPlant->advertise("lastPump").setName("lastPump").setDatatype("Integer").setUnit("unixtime");
this->mPlant->advertise("moist").setName("Percent").setDatatype("Float").setUnit("%");
this->mPlant->advertise("moistraw").setName("adc").setDatatype("Float").setUnit("3.3/4096V");
this->mPlant->advertise("state").setName("state").setDatatype("String");
this->mPlant->advertise("lastPump").setName("lastPump").setDatatype("Integer").setUnit("unixtime").setRetained(true);
this->mPlant->advertise("moist").setName("Percent").setDatatype("Float").setUnit("%").setRetained(true);
this->mPlant->advertise("moistraw").setName("adc").setDatatype("Float").setUnit("3.3/4096V").setRetained(true);
this->mPlant->advertise("state").setName("state").setDatatype("String").setRetained(true);
}