From 3ac8e38f751bb3d94d24ec64a61e8ae582593f21 Mon Sep 17 00:00:00 2001 From: pszafer Date: Mon, 20 May 2024 09:07:31 +0200 Subject: [PATCH] move dimmer and buzzer to main dimmer file --- boneio-dimmer_2rgbw-v0_3.yaml | 35 +++++++++++++++++++++++++++++++---- boneio-dimmer_4cct-v0_3.yaml | 35 +++++++++++++++++++++++++++++++---- boneio-dimmer_8ch-v0_3.yaml | 35 +++++++++++++++++++++++++++++++---- devices/dimmer_buzzer.yaml | 10 ---------- devices/dimmer_lm75.yaml | 19 ------------------- 5 files changed, 93 insertions(+), 41 deletions(-) delete mode 100644 devices/dimmer_buzzer.yaml delete mode 100644 devices/dimmer_lm75.yaml diff --git a/boneio-dimmer_2rgbw-v0_3.yaml b/boneio-dimmer_2rgbw-v0_3.yaml index 632e858..22d7f6f 100644 --- a/boneio-dimmer_2rgbw-v0_3.yaml +++ b/boneio-dimmer_2rgbw-v0_3.yaml @@ -13,16 +13,18 @@ esphome: esp32: board: esp32dev +external_components: + - source: github://boneIO-eu/esphome-LM75@main #Original source and thank you note for BTomala https://github.com/boneIO-eu/esphome-lm75 + components: [lm75] + packages: internals_packages: url: https://github.com/boneIO-eu/esphome - ref: v1.0.7 + ref: v1.0.8 files: [ - 'devices/dimmer_buzzer.yaml', 'devices/dimmer_i2c.yaml', 'devices/dimmer_ina219.yaml', - 'devices/dimmer_lm75.yaml', 'devices/dimmer_outputs.yaml', ] @@ -36,7 +38,7 @@ ethernet: power_pin: GPIO16 dashboard_import: - package_import_url: github://boneIO-eu/esphome/boneio-dimmer_2rgbw-v0_3.yaml@v1.0.7 + package_import_url: github://boneIO-eu/esphome/boneio-dimmer_2rgbw-v0_3.yaml@v1.0.8 import_full_config: true pcf8574: @@ -140,3 +142,28 @@ light: white: chr04 default_transition_length: 2s gamma_correct: 0 + +sensor: + - platform: lm75 + id: boneIO_temp + name: 'Temperature' + update_interval: 30s + entity_category: diagnostic + on_value_range: + - above: 70.0 + then: + - switch.turn_on: buzzer + - below: 70.0 + then: + - switch.turn_off: buzzer + +switch: + - platform: gpio + id: buzzer + name: 'Buzzer' + pin: + pcf8574: pcf_inputs + number: 0 + mode: + output: true + inverted: true diff --git a/boneio-dimmer_4cct-v0_3.yaml b/boneio-dimmer_4cct-v0_3.yaml index 3f82cac..c332b6f 100644 --- a/boneio-dimmer_4cct-v0_3.yaml +++ b/boneio-dimmer_4cct-v0_3.yaml @@ -13,16 +13,18 @@ esphome: esp32: board: esp32dev +external_components: + - source: github://boneIO-eu/esphome-LM75@main #Original source and thank you note for BTomala https://github.com/boneIO-eu/esphome-lm75 + components: [lm75] + packages: internals_packages: url: https://github.com/boneIO-eu/esphome - ref: v1.0.7 + ref: v1.0.8 files: [ - 'devices/dimmer_buzzer.yaml', 'devices/dimmer_i2c.yaml', 'devices/dimmer_ina219.yaml', - 'devices/dimmer_lm75.yaml', 'devices/dimmer_outputs.yaml', ] @@ -36,7 +38,7 @@ ethernet: power_pin: GPIO16 dashboard_import: - package_import_url: github://boneIO-eu/esphome/boneio-dimmer_4cct-v0_3.yaml@v1.0.7 + package_import_url: github://boneIO-eu/esphome/boneio-dimmer_4cct-v0_3.yaml@v1.0.8 import_full_config: true pcf8574: @@ -150,3 +152,28 @@ light: warm_white: chl04 cold_white_color_temperature: 6536 K warm_white_color_temperature: 2000 K + +sensor: + - platform: lm75 + id: boneIO_temp + name: 'Temperature' + update_interval: 30s + entity_category: diagnostic + on_value_range: + - above: 70.0 + then: + - switch.turn_on: buzzer + - below: 70.0 + then: + - switch.turn_off: buzzer + +switch: + - platform: gpio + id: buzzer + name: 'Buzzer' + pin: + pcf8574: pcf_inputs + number: 0 + mode: + output: true + inverted: true diff --git a/boneio-dimmer_8ch-v0_3.yaml b/boneio-dimmer_8ch-v0_3.yaml index d2892cc..1a8a27f 100644 --- a/boneio-dimmer_8ch-v0_3.yaml +++ b/boneio-dimmer_8ch-v0_3.yaml @@ -13,16 +13,18 @@ esphome: esp32: board: esp32dev +external_components: + - source: github://boneIO-eu/esphome-LM75@main #Original source and thank you note for BTomala https://github.com/boneIO-eu/esphome-lm75 + components: [lm75] + packages: internals_packages: url: https://github.com/boneIO-eu/esphome - ref: v1.0.7 + ref: v1.0.8 files: [ - 'devices/dimmer_buzzer.yaml', 'devices/dimmer_i2c.yaml', 'devices/dimmer_ina219.yaml', - 'devices/dimmer_lm75.yaml', 'devices/dimmer_outputs.yaml', ] @@ -36,7 +38,7 @@ ethernet: power_pin: GPIO16 dashboard_import: - package_import_url: github://boneIO-eu/esphome/boneio-dimmer_8ch-v0_3.yaml@v1.0.7 + package_import_url: github://boneIO-eu/esphome/boneio-dimmer_8ch-v0_3.yaml@v1.0.8 import_full_config: true pcf8574: @@ -173,3 +175,28 @@ light: id: chr_04 default_transition_length: 2s gamma_correct: 0 + +sensor: + - platform: lm75 + id: boneIO_temp + name: 'Temperature' + update_interval: 30s + entity_category: diagnostic + on_value_range: + - above: 70.0 + then: + - switch.turn_on: buzzer + - below: 70.0 + then: + - switch.turn_off: buzzer + +switch: + - platform: gpio + id: buzzer + name: 'Buzzer' + pin: + pcf8574: pcf_inputs + number: 0 + mode: + output: true + inverted: true diff --git a/devices/dimmer_buzzer.yaml b/devices/dimmer_buzzer.yaml deleted file mode 100644 index 02ad356..0000000 --- a/devices/dimmer_buzzer.yaml +++ /dev/null @@ -1,10 +0,0 @@ -switch: - - platform: gpio - id: buzzer - name: 'Buzzer' - pin: - pcf8574: pcf_inputs - number: 0 - mode: - output: true - inverted: true diff --git a/devices/dimmer_lm75.yaml b/devices/dimmer_lm75.yaml deleted file mode 100644 index 5502de5..0000000 --- a/devices/dimmer_lm75.yaml +++ /dev/null @@ -1,19 +0,0 @@ -#i2c address: 0x48 output lm75b temp -#LM75B -external_components: - - source: github://boneIO-eu/esphome-LM75@main #Original source and thank you note for BTomala https://github.com/boneIO-eu/esphome-lm75 - components: [lm75] - -sensor: - - platform: lm75 - id: boneIO_temp - name: 'Temperature' - update_interval: 30s - entity_category: diagnostic - on_value_range: - - above: 70.0 - then: - - switch.turn_on: buzzer - - below: 70.0 - then: - - switch.turn_off: buzzer