Compare commits
4 Commits
e4c1ab1ac2
...
master
Author | SHA1 | Date | |
---|---|---|---|
4f0dc7082a | |||
a03e12dfa7 | |||
1f7df559b1 | |||
d75a7d26a6 |
14
README.md
14
README.md
@ -27,14 +27,7 @@ To Use:
|
|||||||
* Add/adopt the SuperSensor to HomeAssistant using the automatic name.
|
* Add/adopt the SuperSensor to HomeAssistant using the automatic name.
|
||||||
* Tune the SuperSensor values to your needs.
|
* Tune the SuperSensor values to your needs.
|
||||||
|
|
||||||
Note: Once programmed, the output LED will flash continuously until connected
|
For more details, please [see my first blog post on the original SuperSensor project](https://www.boniface.me/the-supersensor/)
|
||||||
to HomeAssistant, and a bit longer to establish if the wake word
|
|
||||||
functionality is enabled. This is by design, so you know if your sensors
|
|
||||||
are connected or not. If you do not want this, comment out the
|
|
||||||
`light.turn_on` block starting on line 38 of the ESPHome configuration
|
|
||||||
to disable this functionality.
|
|
||||||
|
|
||||||
For more details, please [see my first blog post on the SuperSensor project](https://www.boniface.me/the-supersensor/)
|
|
||||||
and [my update post on version 2.0](https://www.boniface.me/the-supersensor-2.0).
|
and [my update post on version 2.0](https://www.boniface.me/the-supersensor-2.0).
|
||||||
|
|
||||||
**NOTE: For those with v1.x hardware, see [the repository for that code instead](https://github.com/joshuaboniface/supersensor).**
|
**NOTE: For those with v1.x hardware, see [the repository for that code instead](https://github.com/joshuaboniface/supersensor).**
|
||||||
@ -142,9 +135,8 @@ configurable. See [the documentation](https://esphome.io/components/sensor/ld241
|
|||||||
### Enable Voice Support (switch)
|
### Enable Voice Support (switch)
|
||||||
|
|
||||||
If enabled (the default), the SuperSensor's voice functionality including
|
If enabled (the default), the SuperSensor's voice functionality including
|
||||||
wake word will be started. Disabling this defeats most of the point of the
|
wake word will be started, or it can be disabled to use the SuperSensor
|
||||||
SuperSensor, but can be done if desired, for instance if you have multiple
|
purely as a presence/environmental sensor.
|
||||||
SuperSensors in a single room and only want one to respond to voice commands.
|
|
||||||
|
|
||||||
### Enable Presence LED (switch)
|
### Enable Presence LED (switch)
|
||||||
|
|
||||||
|
@ -383,7 +383,7 @@ micro_wake_word:
|
|||||||
id: mww
|
id: mww
|
||||||
microphone:
|
microphone:
|
||||||
microphone: mic
|
microphone: mic
|
||||||
gain_factor: 4
|
gain_factor: 8
|
||||||
stop_after_detection: false
|
stop_after_detection: false
|
||||||
models:
|
models:
|
||||||
- model: github://genehand/Custom_V2_MicroWakeWords/models/computer/computer.json@update-json
|
- model: github://genehand/Custom_V2_MicroWakeWords/models/computer/computer.json@update-json
|
||||||
@ -634,7 +634,6 @@ sensor:
|
|||||||
humidity: sht45_humidity
|
humidity: sht45_humidity
|
||||||
id: sht45_absolute_humidity
|
id: sht45_absolute_humidity
|
||||||
|
|
||||||
# Dew Point
|
|
||||||
- platform: template
|
- platform: template
|
||||||
name: "SHT45 Dew Point"
|
name: "SHT45 Dew Point"
|
||||||
icon: mdi:thermometer-water
|
icon: mdi:thermometer-water
|
||||||
@ -649,6 +648,40 @@ sensor:
|
|||||||
return (b * alpha) / (a - alpha);
|
return (b * alpha) / (a - alpha);
|
||||||
update_interval: 15s
|
update_interval: 15s
|
||||||
|
|
||||||
|
- platform: template
|
||||||
|
name: "Room Health Score"
|
||||||
|
id: room_health_score
|
||||||
|
unit_of_measurement: "%"
|
||||||
|
accuracy_decimals: 0
|
||||||
|
icon: mdi:home-heart
|
||||||
|
lambda: |-
|
||||||
|
float voc_index = id(sgp41_voc_index).state;
|
||||||
|
float temp = id(sht45_temperature).state;
|
||||||
|
float humidity = id(sht45_humidity).state;
|
||||||
|
|
||||||
|
// VOC Score (0–100)
|
||||||
|
float voc_score = 0;
|
||||||
|
if (voc_index <= 100) voc_score = 100;
|
||||||
|
else if (voc_index <= 200) voc_score = 80;
|
||||||
|
else if (voc_index <= 300) voc_score = 60;
|
||||||
|
else if (voc_index <= 400) voc_score = 40;
|
||||||
|
else if (voc_index <= 500) voc_score = 50;
|
||||||
|
else voc_score = 0;
|
||||||
|
|
||||||
|
// Temperature Score (0–100)
|
||||||
|
float temp_score = 100.0 - abs(temp - 23.0) * 10.0;
|
||||||
|
if (temp_score < 0) temp_score = 0;
|
||||||
|
|
||||||
|
// Humidity Score (0–100), ideal range 35–55%
|
||||||
|
float humidity_score = 100.0 - abs(humidity - 50.0) * 3.0;
|
||||||
|
if (humidity_score < 0) humidity_score = 0;
|
||||||
|
|
||||||
|
// Weighted average
|
||||||
|
float overall_score = (voc_score * 0.5 + temp_score * 0.25 + humidity_score * 0.25);
|
||||||
|
|
||||||
|
return round(overall_score);
|
||||||
|
update_interval: 15s
|
||||||
|
|
||||||
- platform: tsl2591
|
- platform: tsl2591
|
||||||
address: 0x29
|
address: 0x29
|
||||||
update_interval: 1s
|
update_interval: 1s
|
||||||
@ -699,10 +732,9 @@ binary_sensor:
|
|||||||
name: "SuperSensor Occupancy"
|
name: "SuperSensor Occupancy"
|
||||||
id: supersensor_occupancy
|
id: supersensor_occupancy
|
||||||
device_class: occupancy
|
device_class: occupancy
|
||||||
on_press:
|
on_state:
|
||||||
- script.execute: light_off
|
then:
|
||||||
on_release:
|
- script.execute: light_off
|
||||||
- script.execute: light_off
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "PIR GPIO"
|
name: "PIR GPIO"
|
||||||
@ -777,6 +809,34 @@ text_sensor:
|
|||||||
mac_address:
|
mac_address:
|
||||||
name: "LD2410C MAC Address"
|
name: "LD2410C MAC Address"
|
||||||
|
|
||||||
|
- platform: template
|
||||||
|
name: "Chemical Pollution"
|
||||||
|
id: sgp41_chemical_pollution
|
||||||
|
icon: mdi:molecule
|
||||||
|
lambda: |-
|
||||||
|
float voc_index = id(sgp41_voc_index).state;
|
||||||
|
if (voc_index < 1 || voc_index > 500) return {"Unknown"};
|
||||||
|
if (voc_index <= 100) return {"Excellent"};
|
||||||
|
else if (voc_index <= 200) return {"Good"};
|
||||||
|
else if (voc_index <= 300) return {"Moderate"};
|
||||||
|
else if (voc_index <= 400) return {"Unhealthy"};
|
||||||
|
else return {"Hazardous"};
|
||||||
|
update_interval: 15s
|
||||||
|
|
||||||
|
- platform: template
|
||||||
|
name: "Room Health"
|
||||||
|
id: room_health_text
|
||||||
|
icon: mdi:home-heart
|
||||||
|
lambda: |-
|
||||||
|
float score = id(room_health_score).state;
|
||||||
|
if (score < 0) return {"Unknown"};
|
||||||
|
else if (score >= 90.0) return {"Great"};
|
||||||
|
else if (score >= 80.0) return {"Good"};
|
||||||
|
else if (score >= 60.0) return {"Fair"};
|
||||||
|
else if (score >= 40.0) return {"Poor"};
|
||||||
|
else return {"Bad"};
|
||||||
|
update_interval: 15s
|
||||||
|
|
||||||
button:
|
button:
|
||||||
- platform: ld2410
|
- platform: ld2410
|
||||||
restart:
|
restart:
|
||||||
|
Reference in New Issue
Block a user