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

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

#include <hamqtt_binary_sensor.h>

Public Member Functions

HAMQTT_Binary_Sensor_Config hamqtt_binary_sensor_config_default (void)
 Returns a default-initialized binary sensor configuration.

Public Attributes

char * device_class
 The class of the sensor, which alters how its state and icon is rendered.
bool enabled_by_default
 Set to false if the sensor should not be enabled when the sensor is first added.
char * entity_picture
 URL to a picture for the sensor.
int expire_after
 Number of seconds a sensor's state expires, if it's not updated. Set to -1 to disable expiration.
bool force_update
 Set to true if Home Assistant should always send update events, even when the sensor's state doesn't change.
char * icon
 Icon for the sensor.
char * name
 The name of the sensor shown in Home Assistant.
int off_delay
 Number of seconds after the sensor turns on that Home Assistant turns it back off. Set to -1 to disable this feature.
char * unique_id
 Unique identifier used for discovery in Home Assistant.

Detailed Description

Configuration parameters for a HAMQTT binary sensor.

Member Function Documentation

◆ hamqtt_binary_sensor_config_default()

HAMQTT_Binary_Sensor_Config hamqtt_binary_sensor_config_default ( void )

Returns a default-initialized binary sensor configuration.

Caller is still responsible for assigning unique_id

Returns
A default-initialized HAMQTT_Binary_Sensor_Config struct.

Member Data Documentation

◆ device_class

char* HAMQTT_Binary_Sensor_Config::device_class

The class of the sensor, which alters how its state and icon is rendered.

Note
Optional.

◆ entity_picture

char* HAMQTT_Binary_Sensor_Config::entity_picture

URL to a picture for the sensor.

Note
Optional.

◆ icon

char* HAMQTT_Binary_Sensor_Config::icon

Icon for the sensor.

Note
Optional.

The documentation for this struct was generated from the following file: