Skip to content

Commit

Permalink
Merge pull request #89 from EverythingSmartHome/configurable_offsets
Browse files Browse the repository at this point in the history
Add configurable offsets
  • Loading branch information
EverythingSmartHome authored Jul 26, 2023
2 parents 7c4aa94 + 209caa0 commit 09d6215
Showing 1 changed file with 61 additions and 4 deletions.
65 changes: 61 additions & 4 deletions everything-presence-one.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ substitutions:
name: "everything-presence-one"
friendly_name: "Everything Presence One"
project_name: "Everything Smart Technology.Everything Presence One"
project_version: "1.1.5"
project_version: "1.1.6"
temperature_offset: "-3"
humidity_offset: "5"
temperature_update_interval: "60s"
Expand Down Expand Up @@ -43,7 +43,7 @@ esp32_improv:
authorizer: none

dashboard_import:
package_import_url: github://everythingsmarthome/presence-one/everything-presence-one.yaml@main
package_import_url: github://everythingsmarthome/everything-presence-one/everything-presence-one.yaml@main
import_full_config: false

light:
Expand Down Expand Up @@ -85,20 +85,28 @@ i2c:

sensor:
- platform: shtcx
id: "shtc3_sensor"
temperature:
name: Temperature
id: temperature_sensor
filters:
offset: ${temperature_offset}
- offset: ${temperature_offset}
- lambda: "return x + id(temperature_offset_ui).state;"
humidity:
name: Humidity
id: humidity_sensor
filters:
offset: ${humidity_offset}
- offset: ${humidity_offset}
- lambda: "return x + id(humidity_offset_ui).state;"
address: 0x70
update_interval: ${temperature_update_interval}
- platform: bh1750
name: Illuminance
id: illuminance_sensor
address: 0x23
update_interval: ${illuminance_update_interval}
filters:
- lambda: "return x + id(illuminance_offset_ui).state;"

binary_sensor:
- platform: gpio
Expand Down Expand Up @@ -303,6 +311,55 @@ number:
- delay: 1s
- switch.turn_on: mmwave_sensor

- platform: template
name: "Temperature Offset"
id: temperature_offset_ui
unit_of_measurement: "°C"
min_value: -20
max_value: 20
step: 0.1
mode: box
update_interval: never
optimistic: true
restore_value: true
initial_value: 0
icon: "mdi:thermometer"
entity_category: config
on_value:
- lambda: 'id(shtc3_sensor).update();'
- platform: template
name: "Humidity Offset"
id: humidity_offset_ui
unit_of_measurement: "%"
min_value: -50
max_value: 50
step: 0.1
mode: box
update_interval: never
optimistic: true
restore_value: true
initial_value: 0
icon: "mdi:water-percent"
entity_category: config
on_value:
- lambda: 'id(shtc3_sensor).update();'
- platform: template
name: "Illuminance Offset"
id: illuminance_offset_ui
unit_of_measurement: "lx"
min_value: -50
max_value: 50
step: 1
mode: box
update_interval: never
optimistic: true
restore_value: true
initial_value: 0
icon: "mdi:brightness-5"
entity_category: config
on_value:
- lambda: 'id(illuminance_sensor).update();'

button:
- platform: restart
id: restart_internal
Expand Down

0 comments on commit 09d6215

Please sign in to comment.