HAMQTT 0.1.0
ESP-IDF component for integrating devices with Home Assistant over MQTT
Loading...
Searching...
No Matches
hamqtt_binary_sensor.h File Reference

HAMQTT Binary Sensor component interface for Home Assistant MQTT discovery. More...

#include "common.h"

Go to the source code of this file.

Classes

struct  HAMQTT_Binary_Sensor_Config
 Configuration parameters for a HAMQTT binary sensor. More...

Typedefs

typedef struct HAMQTT_Binary_Sensor HAMQTT_Binary_Sensor
typedef bool(* HAMQTT_Binary_Sensor_Get_State_Func) (void *args)
 Function pointer type for retrieving the state of a binary sensor.

Detailed Description

HAMQTT Binary Sensor component interface for Home Assistant MQTT discovery.

Declares the interface and configuration for binary sensor components, such as door sensors or motion detectors, within the HAMQTT MQTT integration framework for Home Assistant.

Author
Ethan Barnes
Date
2025

Typedef Documentation

◆ HAMQTT_Binary_Sensor_Get_State_Func

typedef bool(* HAMQTT_Binary_Sensor_Get_State_Func) (void *args)

Function pointer type for retrieving the state of a binary sensor.

This function pointer is used to obtain the current state of a binary sensor. It is expected to return true if the sensor is active/on, or false otherwise.

Parameters
argsA pointer to user-defined arguments or context data required to get the state. This is typically a pointer to the sensor-specific data structure.
Returns
true if the sensor is active; false otherwise.