Skip to content

remove unused rtc dependency - #429

Open
bartoszpierzchlewicz wants to merge 5 commits into
SzczepanLeon:mainfrom
bartoszpierzchlewicz:fix/remove-unused-rtc-dependency
Open

remove unused rtc dependency#429
bartoszpierzchlewicz wants to merge 5 commits into
SzczepanLeon:mainfrom
bartoszpierzchlewicz:fix/remove-unused-rtc-dependency

Conversation

@bartoszpierzchlewicz

@bartoszpierzchlewicz bartoszpierzchlewicz commented Aug 18, 2026

Copy link
Copy Markdown

wmbus_meter.h included esphome/components/time/real_time_clock.h and declared a protected member time::RealTimeClock *rtc;. That member is never assigned or read anywhere in the repository - there is no set_rtc(), no time_id config option, and no reference to it in any .cpp file.

Meter timestamps come from the wmbusmeters library, which uses the POSIX clock (localtime() in wmbus_common/meters.cpp), not the ESPHome RTC object. Because init.py declares neither DEPENDENCIES nor AUTO_LOAD for time, ESPHome does not copy the time component sources unless the user happens to have a time: block in their YAML, so any config without one fails to build with: fatal error: esphome/components/time/real_time_clock.h: No such file or directory.

Removing the include and the dead member drops the hidden dependency with no functional change.

wmbus_meter.h included esphome/components/time/real_time_clock.h and declared a protected member `time::RealTimeClock *rtc;`. That member is never assigned or read anywhere in the repository - there is no set_rtc(), no time_id config option, and no reference to it in any .cpp file. Meter timestamps come from the wmbusmeters library, which uses the POSIX clock (localtime() in wmbus_common/meters.cpp), not the ESPHome RTC object. Because __init__.py declares neither DEPENDENCIES nor AUTO_LOAD for time, ESPHome does not copy the time component sources unless the user happens to have a time: block in their YAML, so any config without one fails to build with: fatal error: esphome/components/time/real_time_clock.h: No such file or directory. Removing the include and the dead member drops the hidden dependency with no functional change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant