11 hours ago
I use ESPHome. No RF configured in ESPHome yet.
my config looks like this:
# Device Specific Config
esphome:
platform: ESP32
board: esp32dev
name: ${device_name}
comment: ${device_description}
project:
name: "${project_name}"
version: "${project_version}"
time:
- platform: sntp
id: sntp_time
timezone: XXXXXXXX
servers: !secret sntp_server
on_time_sync:
then:
- logger.log: "Synchronized sntp clock"
web_server:
port: 80
auth:
username: admin
password: !secret web_server_password
include_internal: true
# Configuration entry for ESP32
i2c:
sda: 4
scl: 5
scan: true
id: bus_a
# Channels configuration
pcf8574:
- id: 'pcf8574_hub_out_1' # for output channel 1-8
address: 0x24
- id: 'pcf8574_hub_out_2' # for output channel 9-16
address: 0x25
- id: 'pcf8574_hub_in_1' # for input channel 1-8
address: 0x21
- id: 'pcf8574_hub_in_2' # for input channel 9-16
address: 0x22
# Individual inputs
sensor:
# Uptime Sensor
- platform: uptime
name: Uptime
id: uptime_sensor
update_interval: 360s
on_raw_value:
then:
- text_sensor.template.publish:
id: uptime_human
state: !lambda |-
int seconds = round(id(uptime_sensor).raw_state);
int days = seconds / (24 * 3600);
seconds = seconds % (24 * 3600);
int hours = seconds / 3600;
seconds = seconds % 3600;
int minutes = seconds / 60;
seconds = seconds % 60;
return (
(days ? to_string(days) + "d " : "") +
(hours ? to_string(hours) + "h " : "") +
(minutes ? to_string(minutes) + "m " : "") +
(to_string(seconds) + "s")
).c_str();
- platform: template
name: KinKony A16 Internal Temperature
id: temp
lambda: return temperatureRead();
unit_of_measurement: °C
accuracy_decimals: 2
my config looks like this:
# Device Specific Config
esphome:
platform: ESP32
board: esp32dev
name: ${device_name}
comment: ${device_description}
project:
name: "${project_name}"
version: "${project_version}"
time:
- platform: sntp
id: sntp_time
timezone: XXXXXXXX
servers: !secret sntp_server
on_time_sync:
then:
- logger.log: "Synchronized sntp clock"
web_server:
port: 80
auth:
username: admin
password: !secret web_server_password
include_internal: true
# Configuration entry for ESP32
i2c:
sda: 4
scl: 5
scan: true
id: bus_a
# Channels configuration
pcf8574:
- id: 'pcf8574_hub_out_1' # for output channel 1-8
address: 0x24
- id: 'pcf8574_hub_out_2' # for output channel 9-16
address: 0x25
- id: 'pcf8574_hub_in_1' # for input channel 1-8
address: 0x21
- id: 'pcf8574_hub_in_2' # for input channel 9-16
address: 0x22
# Individual inputs
sensor:
# Uptime Sensor
- platform: uptime
name: Uptime
id: uptime_sensor
update_interval: 360s
on_raw_value:
then:
- text_sensor.template.publish:
id: uptime_human
state: !lambda |-
int seconds = round(id(uptime_sensor).raw_state);
int days = seconds / (24 * 3600);
seconds = seconds % (24 * 3600);
int hours = seconds / 3600;
seconds = seconds % 3600;
int minutes = seconds / 60;
seconds = seconds % 60;
return (
(days ? to_string(days) + "d " : "") +
(hours ? to_string(hours) + "h " : "") +
(minutes ? to_string(minutes) + "m " : "") +
(to_string(seconds) + "s")
).c_str();
- platform: template
name: KinKony A16 Internal Temperature
id: temp
lambda: return temperatureRead();
unit_of_measurement: °C
accuracy_decimals: 2