Item Refactor complete

This commit is contained in:
Carl Philipp Klemm 2026-03-31 13:06:15 +02:00
parent 219fbfb4c7
commit 24c168cf64
17 changed files with 78 additions and 41 deletions

View file

@ -7,7 +7,7 @@ PowerItem::PowerItem(uint32_t itemIdIn, QString name, uint8_t value, QObject* p
Item(itemIdIn, name, value, parent)
{
stateChanged(Sensor(Sensor::TYPE_SHUTDOWN_IMMINENT, 0, 0, "Shutdown Imminent", true));
PowerItem::setValue(true);
value_ = true;
hidden_ = true;
type_ = ITEM_VALUE_NO_VALUE;
}

View file

@ -23,11 +23,6 @@ void Relay::enactValue(uint8_t value)
}
}
void Relay::toggle()
{
value_ ? off() : on();
}
void Relay::store(QJsonObject& json)
{
json["Type"] = "Relay";