Skip to content

Commit

Permalink
Add volume control
Browse files Browse the repository at this point in the history
  • Loading branch information
jesserockz committed Nov 21, 2024
1 parent 780e2ce commit 3190855
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Integrations/ESPHome/Core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 Down Expand Up @@ -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"
Expand Down

0 comments on commit 3190855

Please sign in to comment.