nldroid / CustomP1UartComponent

Custom EspHome sensor for reading P1 port on dutch smart meters with ESP module for Home Assistant
63 stars 15 forks source link

Error compiling #5

Open Dutchy-79 opened 3 years ago

Dutchy-79 commented 3 years ago

src/main.cpp: In lambda function: src/main.cpp:314:33: error: expected type-specifier before 'CustomP1UartComponent' auto dsmr_p1_sensor = new CustomP1UartComponent(uart_bus); ^ src/main.cpp:316:767: error: could not convert '{, , , , , , , , , , , , , , , , , , , , }' from '' to 'std::vector<esphome::sensor::Sensor*>' return {dsmr_p1_sensor->s_energy_delivered_tariff1, dsmr_p1_sensor->s_energy_delivered_tariff2, dsmr_p1_sensor->s_energy_returned_tariff1, dsmr_p1_sensor->s_energy_returned_tariff2, dsmr_p1_sensor->s_power_delivered, dsmr_p1_sensor->s_power_returned, dsmr_p1_sensor->s_voltage_l1, dsmr_p1_sensor->s_voltage_l2, dsmr_p1_sensor->s_voltage_l3, dsmr_p1_sensor->s_current_l1, dsmr_p1_sensor->s_current_l2, dsmr_p1_sensor->s_current_l3, dsmr_p1_sensor->s_power_delivered_l1, dsmr_p1_sensor->s_power_delivered_l2, dsmr_p1_sensor->s_power_delivered_l3, dsmr_p1_sensor->s_power_returned_l1, dsmr_p1_sensor->s_power_returned_l2, dsmr_p1_sensor->s_power_returned_l3, dsmr_p1_sensor->s_gas_device_type, dsmr_p1_sensor->s_gas_valve_position, dsmr_p1_sensor->s_gas_delivered}; ^ src/main.cpp:317:3: warning: control reaches end of non-void function [-Wreturn-type] }); ^ *** [/data/p1_water/.pioenvs/p1_water/src/main.cpp.o] Error 1 ========================== [FAILED] Took 3.40 seconds ==========================

zuidwijk commented 3 years ago

Did you copy/use it one-on-one?