Last active
April 17, 2025 10:27
-
-
Save bruxy70/e668e00e94b34bf699488fe1d8de379a to your computer and use it in GitHub Desktop.
ESPHome configuration for Vindriktning ESP32 kit https://www.laskakit.cz/laskakit-esp-vindriktning-esp-32-i2c/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
substitutions: | |
device_name: air-quality | |
wifi_ssid: !secret wifi_ssid | |
wifi_password: !secret wifi_password | |
api_password: !secret api_password | |
ota_password: !secret ota_password | |
esphome: | |
name: ${device_name} | |
comment: IKEA LaskaKit ESP-VINDRIKTNING ESP-32 I2C | |
esp32: | |
board: nodemcu-32s | |
framework: | |
type: arduino | |
wifi: | |
ssid: ${wifi_ssid} | |
password: ${wifi_password} | |
api: | |
password: ${api_password} | |
ota: | |
password: ${ota_password} | |
logger: | |
uart: | |
rx_pin: 16 | |
tx_pin: 17 | |
baud_rate: 9600 | |
id: uart2 | |
sensor: | |
- platform: pm1006 | |
pm_2_5: | |
name: "Particulate Matter 2.5µm Concentration" | |
id: pm | |
accuracy_decimals: 1 | |
on_value: | |
then: | |
- if: | |
condition: | |
lambda: 'return x < 30;' | |
then: | |
- light.addressable_set: | |
id: status | |
range_from: 0 | |
range_to: 0 | |
red: 0.0 | |
green: 1.0 | |
blue: 0.0 | |
color_brightness: !lambda |- | |
return id(sun_elevation).state > 0 ? 1.0 : 0.5; | |
else: | |
- if: | |
condition: | |
lambda: 'return x > 90;' | |
then: | |
- light.addressable_set: | |
id: status | |
range_from: 0 | |
range_to: 0 | |
red: 1.0 | |
green: 0.0 | |
blue: 0.0 | |
color_brightness: !lambda |- | |
return id(sun_elevation).state > 0 ? 1.0 : 0.5; | |
else: | |
- light.addressable_set: | |
id: status | |
range_from: 0 | |
range_to: 0 | |
red: 1.0 | |
green: 0.72 | |
blue: 0.0 | |
color_brightness: !lambda |- | |
return id(sun_elevation).state > 0 ? 1.0 : 0.5; | |
uart_id: uart2 | |
update_interval: 20s | |
- platform: scd4x | |
co2: | |
name: "CO2" | |
id: co2 | |
on_value: | |
then: | |
- if: | |
condition: | |
lambda: 'return x < 1000;' | |
then: | |
- light.addressable_set: | |
id: status | |
range_from: 1 | |
range_to: 1 | |
red: 0.0 | |
green: 1.0 | |
blue: 0.0 | |
color_brightness: !lambda |- | |
return id(sun_elevation).state > 0 ? 1.0 : 0.5; | |
else: | |
- if: | |
condition: | |
lambda: 'return x > 1500;' | |
then: | |
- light.addressable_set: | |
id: status | |
range_from: 1 | |
range_to: 1 | |
red: 1.0 | |
green: 0.0 | |
blue: 0.0 | |
color_brightness: !lambda |- | |
return id(sun_elevation).state > 0 ? 1.0 : 0.5; | |
else: | |
- light.addressable_set: | |
id: status | |
range_from: 1 | |
range_to: 1 | |
red: 1.0 | |
green: 0.72 | |
blue: 0.0 | |
color_brightness: !lambda |- | |
return id(sun_elevation).state > 0 ? 1.0 : 0.5; | |
humidity: | |
name: "Humidity" | |
id: humidity | |
on_value: | |
then: | |
- if: | |
condition: | |
lambda: 'return x < 30;' | |
then: | |
- light.addressable_set: | |
id: status | |
range_from: 2 | |
range_to: 2 | |
red: 1.0 | |
green: 0.0 | |
blue: 0.0 | |
color_brightness: !lambda |- | |
return id(sun_elevation).state > 0 ? 1.0 : 0.5; | |
else: | |
- if: | |
condition: | |
lambda: 'return x > 60;' | |
then: | |
- light.addressable_set: | |
id: status | |
range_from: 2 | |
range_to: 2 | |
red: 0.0 | |
green: 0.0 | |
blue: 1.0 | |
color_brightness: !lambda |- | |
return id(sun_elevation).state > 0 ? 1.0 : 0.5; | |
else: | |
- light.addressable_set: | |
id: status | |
range_from: 2 | |
range_to: 2 | |
red: 0.0 | |
green: 1.0 | |
blue: 0.0 | |
color_brightness: !lambda |- | |
return id(sun_elevation).state > 0 ? 1.0 : 0.5; | |
- platform: homeassistant | |
id: sun_elevation | |
entity_id: sun.sun | |
attribute: elevation | |
- platform: wifi_signal | |
name: "Air quality WiFi Signal Sensor" | |
entity_category: diagnostic | |
disabled_by_default: true | |
update_interval: 60s | |
switch: | |
- platform: gpio | |
pin: 12 | |
id: fan | |
restore_mode: ALWAYS_ON | |
disabled_by_default: true | |
entity_category: diagnostic | |
light: | |
- platform: neopixelbus | |
type: GRB | |
variant: WS2812 | |
pin: GPIO25 | |
num_leds: 3 | |
id: status | |
restore_mode: ALWAYS_ON | |
i2c: | |
sda: 21 | |
scl: 22 | |
scan: true | |
id: bus_a | |
button: | |
- platform: restart | |
name: "Restart ${device_name}" | |
disabled_by_default: true | |
entity_category: diagnostic | |
How can I add the temperature?
Thanks!!
I think you can connect a temperature sensor to the i2c connector. I have a Bluetooth room temperature sensor connects via BT proxy to Home Assistant and get it that way
Do you think of of these will work:
LaskaKit BME280 Air pressure, temperature and humidity sensor
LaskaKit BMP280 Air pressure and temperature sensor
Thank you for all your work and for taking the time to answer my question.
You are very kind!!
Felipe Valverde
Brooklyn, NY
…On Wed, Apr 16, 2025 at 3:14 PM Vaclav ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
I think you can connect a temperature sensor to the i2c connector. I have
a Bluetooth room temperature sensor connects via BT proxy to Home Assistant
and get it that way
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/bruxy70/e668e00e94b34bf699488fe1d8de379a#gistcomment-5543628>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BQY276JPFE7IPVBSJJM4ZCT2Z2TZDBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTCNRVG43TAMBXU52HE2LHM5SXFJTDOJSWC5DF>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
By having the SCD41 CO2 connect to the i2c, I thought that that sensor can read temperature.
On the LaskaKit site description says “SCD41 CO2, temperature and air humidity sensor”.
And if that sensor can not read temperature, is it possible to connect both the BME280 and the SCD41 together on the i2c?
Would it be enough space inside the ikea box?
Thanks!!
On your video, you copy from https://esphome.io/components/sensor/scd4x.html the config for the SCD41 …
sensor:
- platform: scd4x
co2:
name: "Workshop CO2"
temperature:
name: "Workshop Temperature"
humidity:
name: "Workshop Humidity"
I see the line for TEMPERATURE, does that mean that the sensor can read it?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you nice job .