13static const char *
const TAG =
"radio_frequency";
69 "Radio Frequency '%s'\n"
70 " Supports Transmitter: %s\n"
71 " Supports Receiver: %s",
79 this->traits_.get_frequency_max_hz());
100#if defined(USE_API) && defined(USE_RADIO_FREQUENCY)
const StringRef & get_name() const
ESPDEPRECATED("Use get_icon_to() instead. Will be removed in ESPHome 2026.9.0", "2026.3.0") std uint32_t get_device_id() const
ESPDEPRECATED("object_id mangles names and all object_id methods are planned for removal " "(see https://github.com/esphome/backlog/issues/76). " "Now is the time to stop using object_id. If still needed, use get_object_id_to() " "which will remain available longer. get_object_id() will be removed in 2026.7.0", "2025.12.0") std uint32_t get_object_id_hash() const
void send_infrared_rf_receive_event(uint32_t device_id, uint32_t key, const std::vector< int32_t > *timings)
RadioFrequencyCall - Builder pattern for transmitting radio frequency signals.
const uint8_t * packed_data_
optional< uint32_t > frequency_hz_
RadioFrequencyCall & set_raw_timings_base64url(const std::string &base64url)
Set the raw timings from base64url-encoded little-endian int32 data.
RadioFrequencyCall & set_frequency(uint32_t frequency_hz)
Set the carrier frequency in Hz (e.g. 433920000 for 433.92 MHz)
const std::vector< int32_t > * raw_timings_
void perform()
Perform the transmission.
RadioFrequencyModulation modulation_
RadioFrequencyCall & set_raw_timings_packed(const uint8_t *data, uint16_t length, uint16_t count)
Set the raw timings from packed protobuf sint32 data (zigzag + varint encoded)
RadioFrequencyCall & set_modulation(RadioFrequencyModulation modulation)
Set the modulation type (defaults to OOK)
RadioFrequencyCall & set_repeat_count(uint32_t count)
Set the number of times to repeat transmission (1 = transmit once, 2 = transmit twice,...
RadioFrequencyCall & set_raw_timings(const std::vector< int32_t > &timings)
Set the raw timings from a vector (positive = mark, negative = space)
const std::string * base64url_ptr_
RadioFrequencyCall make_call()
Create a call object for transmitting.
uint32_t get_capability_flags() const
Get capability flags for this radio frequency instance.
LazyCallbackManager< void(const RadioFrequencyCall &)> control_callback_
LazyCallbackManager< void(remote_base::RemoteReceiveData)> receive_callback_
bool on_receive(remote_base::RemoteReceiveData data) override
Called when RF data is received (from RemoteReceiverListener)
friend class RadioFrequencyCall
virtual void control(const RadioFrequencyCall &call)=0
Perform the actual transmission (called by RadioFrequencyCall::perform()) Platforms must override thi...
void dump_config() override
RadioFrequencyTraits traits_
uint32_t get_frequency_min_hz() const
Hardware-supported tunable frequency range in Hz.
bool get_supports_transmitter() const
bool get_supports_receiver() const
const RawTimings & get_raw_data() const
APIServer * global_api_server
RadioFrequencyModulation
Modulation types supported by radio frequency implementations.