diff --git a/include/devices.h b/include/devices.h index 100c7a6..33fc740 100644 --- a/include/devices.h +++ b/include/devices.h @@ -4,7 +4,7 @@ using namespace Ha; -auto roomSensor = Builder::instance(TEMP_SENSOR) +auto roomSensor = Builder(TEMP_SENSOR) .asDevice(&DeviceConfig::create(TEMP_SENSOR) .withName("Servers room") .withManufacturer("Atmel") @@ -15,7 +15,7 @@ auto roomSensor = Builder::instance(TEMP_SENSOR) .addPreconfigured(batterySensors(TEMP_SENSOR, BATTERY_PERCENTAGE_TEMPLATE(2.5, 2))) .build(); -auto tankSensor = Builder::instance(new Sensor{ "Level", OIL_SENSOR }) +auto tankSensor = Builder(new Sensor{ "Level", OIL_SENSOR }) .asDevice(&DeviceConfig::create(OIL_SENSOR) .withName("Oil tank") .withManufacturer("Arduino") @@ -27,7 +27,7 @@ auto tankSensor = Builder::instance(new Sensor{ "Level", OIL_SENSOR }) .withIcon("mdi:hydraulic-oil-level") .withValueTemplate("{{ 100 - ((value_json.sensor.value-12)|float*100/120)|round(2) }}") .addSecondary( - Builder::instance(new Sensor{ "Depth", OIL_SENSOR }) + Builder(new Sensor{ "Depth", OIL_SENSOR }) .withDeviceClass("distance") .withUnitMeasure("cm") .withSensorStateClass(MEASUREMENT) @@ -37,7 +37,7 @@ auto tankSensor = Builder::instance(new Sensor{ "Level", OIL_SENSOR }) .addPreconfigured(batterySensors(OIL_SENSOR, BATTERY_PERCENTAGE_TEMPLATE(4, 2.4))) .build(); -auto presenceTracker = Builder::instance(PRESENCE_SENSOR) +auto presenceTracker = Builder(PRESENCE_SENSOR) .asDevice(&DeviceConfig::create(PRESENCE_SENSOR) .withName("Kid presence") .withManufacturer("Atmel") @@ -57,7 +57,7 @@ Command* commands[] = { .addPreconfigured(HaESP::wifiInfo) .build(), #if ENABLE_DOORBELL - Builder