* Create Protobuf Plugin for automatically generating native API stubs * Format * Delete api.proto * Cleanup, use no_delay conditionally * Updates * Update * Lint * Lint * Fixes * Camera * CustomAPIDevice * Fix negative VarInt, Add User-defined services arrays * Home Assistant Event * Fixes * Update custom_api_device.h
22 lines
550 B
C++
22 lines
550 B
C++
#pragma once
|
|
|
|
#include "esphome/core/component.h"
|
|
#include "esphome/components/time/real_time_clock.h"
|
|
#include "esphome/components/api/api_server.h"
|
|
|
|
namespace esphome {
|
|
namespace homeassistant {
|
|
|
|
class HomeassistantTime : public time::RealTimeClock {
|
|
public:
|
|
void setup() override;
|
|
void dump_config() override;
|
|
void set_epoch_time(uint32_t epoch) { this->synchronize_epoch_(epoch); }
|
|
float get_setup_priority() const override;
|
|
};
|
|
|
|
extern HomeassistantTime *global_homeassistant_time;
|
|
|
|
} // namespace homeassistant
|
|
} // namespace esphome
|