From 3190855d50d7bcb65c0031f6080de9e28eb1530d Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 21 Nov 2024 17:35:02 +1300 Subject: [PATCH 1/3] Add volume control --- Integrations/ESPHome/Core.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 9f5162d..673e8d9 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -10,8 +10,11 @@ output: - platform: ledc pin: GPIO10 id: buzzer + max_power: 60% + rtttl: - output: buzzer + id: rtttl_buzzer + output: buzzer globals: - id: cycleCounter @@ -109,6 +112,18 @@ number: - lambda: |- id(deep_sleep_1).set_sleep_duration(x * 60 * 60 * 1000); + - platform: template + name: Volume + min_value: 0 + max_value: 100 + initial_value: 100 + unit_of_measurement: "%" + step: 1 + optimistic: true + restore_value: true + on_value: + - lambda: id(rtttl_buzzer).set_gain(pow(x / 100.0f, 3)); + text: - platform: template name: "Song Single Click" From 44d3480b9eaab018336a163c2996c00a4e58826f Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 21 Nov 2024 19:18:45 +1300 Subject: [PATCH 2/3] Use rtttl PR as external component until release --- Integrations/ESPHome/Core.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 673e8d9..ae317ff 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -37,6 +37,8 @@ globals: external_components: - source: github://ApolloAutomation/esphome-battery-component components: [max17048] #Forked OptionZero + - source: github://pr#7793 + components: rtttl i2c: sda: GPIO1 From a1e0aacf6b15e1dfc7f55bb83282b600d797ab0a Mon Sep 17 00:00:00 2001 From: Trevor Schirmer <24777085+TrevorSchirmer@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:21:11 -0500 Subject: [PATCH 3/3] Update Version --- Integrations/ESPHome/Core.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index ae317ff..5235162 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,5 +1,5 @@ substitutions: - version: "24.11.7.1" + version: "24.11.24.1" esp32: board: esp32-c3-devkitm-1 @@ -422,4 +422,4 @@ script: green: 0% blue: 0% - light.turn_off: - id: rgb_light \ No newline at end of file + id: rgb_light