ESPHome  2024.12.2
ruuvitag.cpp
Go to the documentation of this file.
1 #include "ruuvitag.h"
2 #include "esphome/core/log.h"
3 
4 #ifdef USE_ESP32
5 
6 namespace esphome {
7 namespace ruuvitag {
8 
9 static const char *const TAG = "ruuvitag";
10 
12  ESP_LOGCONFIG(TAG, "RuuviTag");
13  LOG_SENSOR(" ", "Humidity", this->humidity_);
14  LOG_SENSOR(" ", "Temperature", this->temperature_);
15  LOG_SENSOR(" ", "Pressure", this->pressure_);
16  LOG_SENSOR(" ", "Acceleration", this->acceleration_);
17  LOG_SENSOR(" ", "Acceleration X", this->acceleration_x_);
18  LOG_SENSOR(" ", "Acceleration Y", this->acceleration_y_);
19  LOG_SENSOR(" ", "Acceleration Z", this->acceleration_z_);
20  LOG_SENSOR(" ", "Battery Voltage", this->battery_voltage_);
21  LOG_SENSOR(" ", "TX Power", this->tx_power_);
22  LOG_SENSOR(" ", "Movement Counter", this->movement_counter_);
23  LOG_SENSOR(" ", "Measurement Sequence Number", this->measurement_sequence_number_);
24 }
25 
26 } // namespace ruuvitag
27 } // namespace esphome
28 
29 #endif
sensor::Sensor * acceleration_y_
Definition: ruuvitag.h:73
sensor::Sensor * measurement_sequence_number_
Definition: ruuvitag.h:78
sensor::Sensor * acceleration_
Definition: ruuvitag.h:71
sensor::Sensor * battery_voltage_
Definition: ruuvitag.h:75
sensor::Sensor * tx_power_
Definition: ruuvitag.h:76
sensor::Sensor * acceleration_x_
Definition: ruuvitag.h:72
void dump_config() override
Definition: ruuvitag.cpp:11
sensor::Sensor * humidity_
Definition: ruuvitag.h:69
sensor::Sensor * temperature_
Definition: ruuvitag.h:68
sensor::Sensor * movement_counter_
Definition: ruuvitag.h:77
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
sensor::Sensor * pressure_
Definition: ruuvitag.h:70
sensor::Sensor * acceleration_z_
Definition: ruuvitag.h:74