12static const char *
const TAG =
"uptime.sensor";
20 const uint32_t ms =
millis();
25 uint32_t seconds = ms / 1000;
32 LOG_SENSOR(
"",
"Uptime Sensor",
this);
33 ESP_LOGCONFIG(TAG,
" Type: Timestamp");
void publish_state(float state)
Publish a new state to the front-end.
void add_on_time_sync_callback(std::function< void()> callback)
ESPTime now()
Get the time in the currently defined timezone.
float get_setup_priority() const override
time::RealTimeClock * time_
void dump_config() override
const float HARDWARE
For components that deal with hardware and are very important like GPIO switch.
Providing packet encoding functions for exchanging data with a remote host.
uint32_t IRAM_ATTR HOT millis()