Skip to content

Commit

Permalink
Merge pull request #8 from jesserockz/jesserockz-2024-534
Browse files Browse the repository at this point in the history
Add volume control
  • Loading branch information
TrevorSchirmer authored Nov 25, 2024
2 parents 780e2ce + a1e0aac commit b8210f5
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions Integrations/ESPHome/Core.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
substitutions:
version: "24.11.7.1"
version: "24.11.24.1"

esp32:
board: esp32-c3-devkitm-1
Expand All @@ -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
Expand All @@ -34,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
Expand Down Expand Up @@ -109,6 +114,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"
Expand Down Expand Up @@ -405,4 +422,4 @@ script:
green: 0%
blue: 0%
- light.turn_off:
id: rgb_light
id: rgb_light

0 comments on commit b8210f5

Please sign in to comment.