12 static 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");
ESPTime now()
Get the time in the currently defined timezone.
void add_on_time_sync_callback(std::function< void()> callback)
time::RealTimeClock * time_
uint32_t IRAM_ATTR HOT millis()
void publish_state(float state)
Publish a new state to the front-end.
float get_setup_priority() const override
const float HARDWARE
For components that deal with hardware and are very important like GPIO switch.
void dump_config() override
Implementation of SPI Controller mode.