Update I2C addresses and add Ambient Sensor

This commit is contained in:
2026-05-11 12:01:56 +02:00
parent 8cb4f3b75d
commit af054eea04
4 changed files with 76 additions and 748 deletions
+27 -9
View File
@@ -10,16 +10,24 @@
esp32:
flash_size: 16MB
psram:
mode: octal
speed: 80MHz
interval:
- interval: 1min
then:
- logger.log: "ESPHome for Button+ V2 v0.1.0"
i2c:
- id: temperature_sensor
# Devices at 0x20, 0x21, 0x22, 0x23
- id: buttons
sda: GPIO1
scl: GPIO2
- id: buttons
frequency: 50khz
# Devices at 0x29 (ambient), 0x4A (temp)
- id: sensors
sda: GPIO47
scl: GPIO48
frequency: 400khz
@@ -28,10 +36,6 @@ spi:
clk_pin: GPIO6
mosi_pin: GPIO5
psram:
mode: octal
speed: 80MHz
globals:
- id: nr_of_pages
type: int
@@ -39,6 +43,12 @@ globals:
- id: actual_page
type: int
initial_value: '0'
- id: page_names
type: std::vector<std::string>
initial_value: '{"Page 1"}'
- id: active_page_name
type: std::string
initial_value: ""
output:
- platform: ledc
@@ -56,11 +66,19 @@ output:
sensor:
- platform: sts3x
id: inside_temperature
i2c_id: temperature_sensor
name: "Temperature"
address: 0x4A
id: buttonplus_temperature
i2c_id: sensors
name: "Button+ Temperature"
update_interval: 10s
- platform: ltr_als_ps
address: 0x29
id: buttonplus_ambientlight
i2c_id: sensors
ambient_light: "Button+ Ambient Light"
update_interval: 10s
type: ALS # or ALS or PS
auto_mode: true
- platform: template
name: "Active Page ID"
id: active_page_id_ha