Compare commits
5 Commits
5ac8ceacfe
...
cae28341fe
Author | SHA1 | Date | |
---|---|---|---|
cae28341fe | |||
17cfa429ea | |||
791d7d504f | |||
631cdae751 | |||
06321730e0 |
@@ -1 +1 @@
|
|||||||
2025.7.3
|
2025.8.3
|
110
automations.yaml
110
automations.yaml
@@ -38,7 +38,7 @@
|
|||||||
input:
|
input:
|
||||||
person_entity: person.marcus_scholz
|
person_entity: person.marcus_scholz
|
||||||
zone_entity: zone.home
|
zone_entity: zone.home
|
||||||
notify_device: 6adad2de67b26c864cfcb1a91bd12e48
|
notify_device: 773450cae5e93524731940ad081846d9
|
||||||
- id: '1623526683767'
|
- id: '1623526683767'
|
||||||
alias: Licht bei Sonnenaufgang ausschalten
|
alias: Licht bei Sonnenaufgang ausschalten
|
||||||
description: ''
|
description: ''
|
||||||
@@ -225,23 +225,24 @@
|
|||||||
- id: '1624820688449'
|
- id: '1624820688449'
|
||||||
alias: 'Anruf: Beim Klingeln grün blinken'
|
alias: 'Anruf: Beim Klingeln grün blinken'
|
||||||
description: ''
|
description: ''
|
||||||
trigger:
|
triggers:
|
||||||
- platform: state
|
- entity_id: sensor.fritz_box_7490_call_monitor_dem_commander1024_seine_cloud
|
||||||
entity_id: sensor.fritz_box_7490_call_monitor_dem_commander1024_seine_cloud
|
|
||||||
to: ringing
|
to: ringing
|
||||||
- platform: state
|
trigger: state
|
||||||
entity_id: sensor.le2123_phone_state
|
- entity_id:
|
||||||
|
- sensor.le2123_phone_state_2
|
||||||
to: ringing
|
to: ringing
|
||||||
- platform: state
|
trigger: state
|
||||||
to: ringing
|
- to: ringing
|
||||||
entity_id: sensor.moto_g_100_phone_state
|
entity_id:
|
||||||
condition:
|
- sensor.xt2125_4_phone_state
|
||||||
|
trigger: state
|
||||||
|
conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: person.marcus_scholz
|
entity_id: person.marcus_scholz
|
||||||
state: home
|
state: home
|
||||||
action:
|
actions:
|
||||||
- service: light.turn_on
|
- data:
|
||||||
data:
|
|
||||||
rgb_color:
|
rgb_color:
|
||||||
- 9
|
- 9
|
||||||
- 255
|
- 255
|
||||||
@@ -250,8 +251,8 @@
|
|||||||
entity_id:
|
entity_id:
|
||||||
- light.awtrix_desk_indicator_1
|
- light.awtrix_desk_indicator_1
|
||||||
- light.awtrix_kitchen_indicator_1
|
- light.awtrix_kitchen_indicator_1
|
||||||
- service: scene.create
|
action: light.turn_on
|
||||||
data:
|
- data:
|
||||||
scene_id: wled_last_state
|
scene_id: wled_last_state
|
||||||
snapshot_entities:
|
snapshot_entities:
|
||||||
- light.kuche
|
- light.kuche
|
||||||
@@ -260,51 +261,53 @@
|
|||||||
- select.kuche_color_palette
|
- select.kuche_color_palette
|
||||||
- select.wohnzimmer_vorne_color_palette
|
- select.wohnzimmer_vorne_color_palette
|
||||||
- select.wohnzimmer_hinten_color_palette
|
- select.wohnzimmer_hinten_color_palette
|
||||||
- service: scene.turn_on
|
action: scene.create
|
||||||
target:
|
- target:
|
||||||
entity_id: scene.grun_blinken
|
entity_id: scene.grun_blinken
|
||||||
data: {}
|
data: {}
|
||||||
|
action: scene.turn_on
|
||||||
- delay:
|
- delay:
|
||||||
hours: 0
|
hours: 0
|
||||||
minutes: 0
|
minutes: 0
|
||||||
seconds: 5
|
seconds: 5
|
||||||
milliseconds: 0
|
milliseconds: 0
|
||||||
- service: scene.turn_on
|
- target:
|
||||||
target:
|
|
||||||
entity_id: scene.wled_last_state
|
entity_id: scene.wled_last_state
|
||||||
data: {}
|
data: {}
|
||||||
|
action: scene.turn_on
|
||||||
- delay:
|
- delay:
|
||||||
hours: 0
|
hours: 0
|
||||||
minutes: 0
|
minutes: 0
|
||||||
seconds: 15
|
seconds: 15
|
||||||
milliseconds: 0
|
milliseconds: 0
|
||||||
- service: light.turn_off
|
- data: {}
|
||||||
data: {}
|
|
||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- light.awtrix_desk_indicator_1
|
- light.awtrix_desk_indicator_1
|
||||||
- light.awtrix_kitchen_indicator_1
|
- light.awtrix_kitchen_indicator_1
|
||||||
|
action: light.turn_off
|
||||||
mode: single
|
mode: single
|
||||||
- id: '1625481640348'
|
- id: '1625481640348'
|
||||||
alias: 'Anruf: Beim Telefonieren Musik pausieren'
|
alias: 'Anruf: Beim Telefonieren Musik pausieren'
|
||||||
description: ''
|
description: ''
|
||||||
trigger:
|
triggers:
|
||||||
- platform: state
|
- entity_id: sensor.fritz_box_7490_call_monitor_telefonbuch
|
||||||
entity_id: sensor.fritz_box_7490_call_monitor_telefonbuch
|
|
||||||
to: talking
|
to: talking
|
||||||
- platform: state
|
trigger: state
|
||||||
entity_id: sensor.le2123_phone_state
|
- entity_id:
|
||||||
|
- sensor.le2123_phone_state_2
|
||||||
to: talking
|
to: talking
|
||||||
- platform: state
|
trigger: state
|
||||||
entity_id: sensor.moto_g_100_phone_state
|
- entity_id:
|
||||||
|
- sensor.xt2125_4_phone_state
|
||||||
to: talking
|
to: talking
|
||||||
condition:
|
trigger: state
|
||||||
|
conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: person.marcus_scholz
|
entity_id: person.marcus_scholz
|
||||||
state: home
|
state: home
|
||||||
action:
|
actions:
|
||||||
- service: scene.create
|
- data:
|
||||||
data:
|
|
||||||
scene_id: media_last_state
|
scene_id: media_last_state
|
||||||
snapshot_entities:
|
snapshot_entities:
|
||||||
- media_player.wohnzimmer_main
|
- media_player.wohnzimmer_main
|
||||||
@@ -312,24 +315,27 @@
|
|||||||
- media_player.ccze
|
- media_player.ccze
|
||||||
- media_player.spotify_marcus_scholz
|
- media_player.spotify_marcus_scholz
|
||||||
- media_player.xboxonex
|
- media_player.xboxonex
|
||||||
- service: media_player.media_pause
|
action: scene.create
|
||||||
target:
|
- target:
|
||||||
area_id:
|
area_id:
|
||||||
- schlafzimmer
|
- schlafzimmer
|
||||||
- wohnzimmer
|
- wohnzimmer
|
||||||
|
action: media_player.media_pause
|
||||||
|
data: {}
|
||||||
- wait_for_trigger:
|
- wait_for_trigger:
|
||||||
- platform: state
|
- entity_id: sensor.j9110_phone_state
|
||||||
entity_id: sensor.j9110_phone_state
|
|
||||||
to: idle
|
to: idle
|
||||||
from: talking
|
from: talking
|
||||||
- platform: state
|
trigger: state
|
||||||
entity_id: sensor.fritz_box_7490_call_monitor_telefonbuch
|
- entity_id: sensor.fritz_box_7490_call_monitor_telefonbuch
|
||||||
to: idle
|
to: idle
|
||||||
from: talking
|
from: talking
|
||||||
- service: scene.turn_on
|
trigger: state
|
||||||
target:
|
- target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- scene.media_last_state
|
- scene.media_last_state
|
||||||
|
action: scene.turn_on
|
||||||
|
data: {}
|
||||||
mode: single
|
mode: single
|
||||||
- id: '1628972104416'
|
- id: '1628972104416'
|
||||||
alias: Raumduft nach einer Stunde wieder ausschalten
|
alias: Raumduft nach einer Stunde wieder ausschalten
|
||||||
@@ -874,41 +880,41 @@
|
|||||||
input:
|
input:
|
||||||
remote: bd97db2ae9b0104d50dc6a343315608b
|
remote: bd97db2ae9b0104d50dc6a343315608b
|
||||||
double_dot_single_press:
|
double_dot_single_press:
|
||||||
- service: light.turn_off
|
- target:
|
||||||
target:
|
|
||||||
device_id:
|
device_id:
|
||||||
- 68868390eda35e969ec60a13020f2407
|
- 68868390eda35e969ec60a13020f2407
|
||||||
data: {}
|
data: {}
|
||||||
|
action: light.turn_off
|
||||||
double_dot_double_press:
|
double_dot_double_press:
|
||||||
- service: light.turn_off
|
- metadata: {}
|
||||||
metadata: {}
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
device_id: 3c86ddd39979139f29645308815c0271
|
device_id: 3c86ddd39979139f29645308815c0271
|
||||||
|
action: light.turn_off
|
||||||
single_dot_single_press:
|
single_dot_single_press:
|
||||||
- service: light.turn_on
|
- metadata: {}
|
||||||
metadata: {}
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
device_id: 68868390eda35e969ec60a13020f2407
|
device_id: 68868390eda35e969ec60a13020f2407
|
||||||
|
action: light.turn_on
|
||||||
single_dot_double_press:
|
single_dot_double_press:
|
||||||
- service: light.turn_on
|
- metadata: {}
|
||||||
metadata: {}
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
device_id: 3c86ddd39979139f29645308815c0271
|
device_id: 3c86ddd39979139f29645308815c0271
|
||||||
|
action: light.turn_on
|
||||||
double_dot_long_press:
|
double_dot_long_press:
|
||||||
- service: switch.turn_off
|
- metadata: {}
|
||||||
metadata: {}
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
device_id: b7c1c80b21406c5608e38aa0c7e7e439
|
device_id: b7c1c80b21406c5608e38aa0c7e7e439
|
||||||
|
action: switch.turn_off
|
||||||
single_dot_long_press:
|
single_dot_long_press:
|
||||||
- service: switch.turn_on
|
- metadata: {}
|
||||||
metadata: {}
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
device_id: b7c1c80b21406c5608e38aa0c7e7e439
|
device_id: b7c1c80b21406c5608e38aa0c7e7e439
|
||||||
|
action: switch.turn_on
|
||||||
- id: '1705488817426'
|
- id: '1705488817426'
|
||||||
alias: Let's Encrypt
|
alias: Let's Encrypt
|
||||||
description: Zertifikat prüfen und verlängern via Addon
|
description: Zertifikat prüfen und verlängern via Addon
|
||||||
|
@@ -49,7 +49,7 @@ i2c:
|
|||||||
scl: 7
|
scl: 7
|
||||||
scan: true
|
scan: true
|
||||||
|
|
||||||
# DHT22 sensor
|
# Temp/humidity sensors
|
||||||
sensor:
|
sensor:
|
||||||
- platform: dht
|
- platform: dht
|
||||||
model: dht22
|
model: dht22
|
||||||
|
114
esphome/kamera-balkon.yaml
Normal file
114
esphome/kamera-balkon.yaml
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
substitutions:
|
||||||
|
name: kamera-balkon
|
||||||
|
friendly_name: Kamera Balkon
|
||||||
|
|
||||||
|
esphome:
|
||||||
|
name: ${name}
|
||||||
|
friendly_name: ${friendly_name}
|
||||||
|
name_add_mac_suffix: false
|
||||||
|
project:
|
||||||
|
name: sensor.camera
|
||||||
|
version: "1.0"
|
||||||
|
min_version: 2022.1.0
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
board: esp32cam
|
||||||
|
framework:
|
||||||
|
type: arduino
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: "Voltage-legacy"
|
||||||
|
password: !secret voltage_legacy_psk
|
||||||
|
# use_address: cam-balcony.home
|
||||||
|
power_save_mode: high
|
||||||
|
fast_connect: on
|
||||||
|
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
ap:
|
||||||
|
ssid: "Cam Balkon Fallback Hotspot"
|
||||||
|
password: !secret fallback_psk
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
encryption:
|
||||||
|
key: !secret apikey
|
||||||
|
|
||||||
|
ota:
|
||||||
|
platform: esphome
|
||||||
|
password: !secret ota
|
||||||
|
|
||||||
|
# Initialize I²C
|
||||||
|
i2c:
|
||||||
|
- id: bus_a
|
||||||
|
sda: GPIO13
|
||||||
|
scl: GPIO14
|
||||||
|
scan: true
|
||||||
|
- id: bus_c
|
||||||
|
sda: GPIO26
|
||||||
|
scl: GPIO27
|
||||||
|
|
||||||
|
# Camera
|
||||||
|
esp32_camera:
|
||||||
|
name: ${friendly_name}
|
||||||
|
external_clock:
|
||||||
|
pin: GPIO0
|
||||||
|
frequency: 20MHz
|
||||||
|
i2c_id:
|
||||||
|
bus_c
|
||||||
|
data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
|
||||||
|
vsync_pin: GPIO25
|
||||||
|
href_pin: GPIO23
|
||||||
|
pixel_clock_pin: GPIO22
|
||||||
|
power_down_pin: GPIO32
|
||||||
|
resolution: SVGA
|
||||||
|
max_framerate: 24 fps
|
||||||
|
idle_framerate: 0.2 fps
|
||||||
|
jpeg_quality: 30
|
||||||
|
agc_mode: auto
|
||||||
|
agc_gain_ceiling: 2x
|
||||||
|
wb_mode: auto
|
||||||
|
vertical_flip: true
|
||||||
|
horizontal_mirror: true
|
||||||
|
|
||||||
|
esp32_camera_web_server:
|
||||||
|
- port: 8080
|
||||||
|
mode: stream
|
||||||
|
- port: 8081
|
||||||
|
mode: snapshot
|
||||||
|
|
||||||
|
# Temp/humidity sensors
|
||||||
|
sensor:
|
||||||
|
- platform: wifi_signal
|
||||||
|
name: "WiFi Signalstärke"
|
||||||
|
update_interval: 60s
|
||||||
|
- platform: sht3xd
|
||||||
|
i2c_id:
|
||||||
|
bus_a
|
||||||
|
temperature:
|
||||||
|
name: "Balkon Temperatur"
|
||||||
|
filters:
|
||||||
|
- offset: -4.4
|
||||||
|
humidity:
|
||||||
|
name: "Balkon Luftfeuchtigkeit"
|
||||||
|
address: 0x44
|
||||||
|
heater_enabled: True
|
||||||
|
update_interval: 60s
|
||||||
|
|
||||||
|
# Flash LED
|
||||||
|
output:
|
||||||
|
- platform: ledc
|
||||||
|
pin: GPIO4
|
||||||
|
id: flash
|
||||||
|
channel: 2
|
||||||
|
|
||||||
|
# Define RGB mode for LED
|
||||||
|
light:
|
||||||
|
- platform: monochromatic
|
||||||
|
id: flashlight
|
||||||
|
name: "Blitzlicht"
|
||||||
|
output: flash
|
@@ -19,7 +19,7 @@ esp32:
|
|||||||
wifi:
|
wifi:
|
||||||
ssid: "Voltage-legacy"
|
ssid: "Voltage-legacy"
|
||||||
password: !secret voltage_legacy_psk
|
password: !secret voltage_legacy_psk
|
||||||
use_address: ${name}.home
|
use_address: cam-livingroom.home
|
||||||
power_save_mode: high
|
power_save_mode: high
|
||||||
fast_connect: on
|
fast_connect: on
|
||||||
|
|
||||||
@@ -60,9 +60,23 @@ esp32_camera:
|
|||||||
max_framerate: 24 fps
|
max_framerate: 24 fps
|
||||||
idle_framerate: 0.2 fps
|
idle_framerate: 0.2 fps
|
||||||
jpeg_quality: 30
|
jpeg_quality: 30
|
||||||
|
agc_mode: auto
|
||||||
|
agc_gain_ceiling: 2x
|
||||||
|
wb_mode: auto
|
||||||
vertical_flip: true
|
vertical_flip: true
|
||||||
horizontal_mirror: true
|
horizontal_mirror: true
|
||||||
|
|
||||||
|
esp32_camera_web_server:
|
||||||
|
- port: 8080
|
||||||
|
mode: stream
|
||||||
|
- port: 8081
|
||||||
|
mode: snapshot
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: wifi_signal
|
||||||
|
name: "WiFi Signalstärke"
|
||||||
|
update_interval: 60s
|
||||||
|
|
||||||
# Flash LED
|
# Flash LED
|
||||||
output:
|
output:
|
||||||
- platform: ledc
|
- platform: ledc
|
||||||
|
@@ -73,7 +73,7 @@ micro_wake_word:
|
|||||||
# - model: alexa
|
# - model: alexa
|
||||||
# vad:
|
# vad:
|
||||||
microphone: luxe_mic
|
microphone: luxe_mic
|
||||||
on_wake_word_detected:
|
on_wake_word_detected:
|
||||||
- voice_assistant.start:
|
- voice_assistant.start:
|
||||||
wake_word: !lambda return wake_word;
|
wake_word: !lambda return wake_word;
|
||||||
|
|
||||||
@@ -113,13 +113,44 @@ output:
|
|||||||
globals:
|
globals:
|
||||||
- id: Vol
|
- id: Vol
|
||||||
type: float
|
type: float
|
||||||
initial_value: '0.6'
|
initial_value: '0.6'
|
||||||
- id: phase
|
- id: phase
|
||||||
type: int
|
type: int
|
||||||
initial_value: '0'
|
initial_value: '0'
|
||||||
- id: mute
|
- id: mute
|
||||||
type: bool
|
type: bool
|
||||||
initial_value: 'false'
|
initial_value: 'false'
|
||||||
|
- id: muteH
|
||||||
|
type: bool
|
||||||
|
initial_value: 'false'
|
||||||
|
|
||||||
|
interval:
|
||||||
|
- interval: 0.1sec
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- speaker.is_stopped:
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- not:
|
||||||
|
- lambda: 'return(id(muteH));'
|
||||||
|
then:
|
||||||
|
- output.turn_on: dac_mute
|
||||||
|
- lambda: id(muteH) = true;
|
||||||
|
- logger.log: "====> hardware mute"
|
||||||
|
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- speaker.is_playing:
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- lambda: 'return(id(muteH));'
|
||||||
|
then:
|
||||||
|
- output.turn_off: dac_mute
|
||||||
|
- lambda: id(muteH) = false;
|
||||||
|
- logger.log: "====> hardware unmute"
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: adc
|
- platform: adc
|
||||||
@@ -191,13 +222,13 @@ binary_sensor:
|
|||||||
pullup: true
|
pullup: true
|
||||||
name: Volume Up
|
name: Volume Up
|
||||||
on_click:
|
on_click:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
id(Vol) += 0.05;
|
id(Vol) += 0.05;
|
||||||
if(id(Vol) > 1) id(Vol) = 1;
|
if(id(Vol) > 1) id(Vol) = 1;
|
||||||
- media_player.volume_set:
|
- media_player.volume_set:
|
||||||
id: luxe_media_player
|
id: luxe_media_player
|
||||||
volume: !lambda return id(Vol);
|
volume: !lambda return id(Vol);
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
pin:
|
pin:
|
||||||
number: GPIO32
|
number: GPIO32
|
||||||
@@ -207,13 +238,13 @@ binary_sensor:
|
|||||||
pullup: true
|
pullup: true
|
||||||
name: Volume Down
|
name: Volume Down
|
||||||
on_click:
|
on_click:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
id(Vol) -= 0.05;
|
id(Vol) -= 0.05;
|
||||||
if(id(Vol) < 0) id(Vol) = 0;
|
if(id(Vol) < 0) id(Vol) = 0;
|
||||||
- media_player.volume_set:
|
- media_player.volume_set:
|
||||||
id: luxe_media_player
|
id: luxe_media_player
|
||||||
volume: !lambda return id(Vol);
|
volume: !lambda return id(Vol);
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
pin:
|
pin:
|
||||||
number: GPIO12
|
number: GPIO12
|
||||||
@@ -222,16 +253,16 @@ binary_sensor:
|
|||||||
input: true
|
input: true
|
||||||
pullup: true
|
pullup: true
|
||||||
name: Mute
|
name: Mute
|
||||||
on_click:
|
on_click:
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
- lambda: 'return(id(mute));'
|
- lambda: 'return(id(mute));'
|
||||||
then:
|
then:
|
||||||
- script.execute: mute_off
|
- script.execute: mute_off
|
||||||
- lambda: id(mute) = false;
|
- lambda: id(mute) = false;
|
||||||
else:
|
else:
|
||||||
- script.execute: mute_on
|
- script.execute: mute_on
|
||||||
- lambda: id(mute) = true;
|
- lambda: id(mute) = true;
|
||||||
on_double_click:
|
on_double_click:
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
@@ -271,9 +302,9 @@ microphone:
|
|||||||
sample_rate: 16000
|
sample_rate: 16000
|
||||||
i2s_din_pin: GPIO35
|
i2s_din_pin: GPIO35
|
||||||
bits_per_sample: 16bit
|
bits_per_sample: 16bit
|
||||||
channel: left
|
channel: stereo
|
||||||
adc_type: external
|
adc_type: external
|
||||||
|
|
||||||
speaker:
|
speaker:
|
||||||
- platform: i2s_audio
|
- platform: i2s_audio
|
||||||
id: luxe_speaker
|
id: luxe_speaker
|
||||||
@@ -282,8 +313,8 @@ speaker:
|
|||||||
sample_rate: 48000
|
sample_rate: 48000
|
||||||
bits_per_sample: 16bit
|
bits_per_sample: 16bit
|
||||||
channel: stereo
|
channel: stereo
|
||||||
buffer_duration: 100ms
|
buffer_duration: 100ms
|
||||||
|
|
||||||
media_player:
|
media_player:
|
||||||
- platform: speaker
|
- platform: speaker
|
||||||
name: None
|
name: None
|
||||||
@@ -294,37 +325,36 @@ media_player:
|
|||||||
speaker: luxe_speaker
|
speaker: luxe_speaker
|
||||||
format: FLAC
|
format: FLAC
|
||||||
sample_rate: 48000
|
sample_rate: 48000
|
||||||
num_channels: 2
|
num_channels: 2
|
||||||
files:
|
files:
|
||||||
- id: little_sound
|
- id: little_sound
|
||||||
file: https://github.com/esphome/home-assistant-voice-pe/raw/dev/sounds/timer_finished.flac
|
file: https://github.com/esphome/home-assistant-voice-pe/raw/dev/sounds/timer_finished.flac
|
||||||
on_announcement:
|
on_announcement:
|
||||||
- micro_wake_word.stop:
|
- micro_wake_word.stop:
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
lambda: 'return(id(phase) != 2);'
|
lambda: 'return(id(phase) != 2);'
|
||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
if(id(phase) == 1) id(phase) = 2;
|
if(id(phase) == 1) id(phase) = 2;
|
||||||
- script.execute: mute_off
|
- script.execute: mute_off
|
||||||
- script.execute: update_led
|
- script.execute: update_led
|
||||||
|
|
||||||
on_idle:
|
on_idle:
|
||||||
- wait_until:
|
- wait_until:
|
||||||
and:
|
and:
|
||||||
- not:
|
- not:
|
||||||
media_player.is_announcing:
|
media_player.is_announcing:
|
||||||
- not:
|
- not:
|
||||||
voice_assistant.is_running:
|
voice_assistant.is_running:
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
lambda: 'return((id(phase) == 4) || (id(phase) == 2));'
|
lambda: 'return((id(phase) == 4) || (id(phase) == 2));'
|
||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
id(phase) = 1;
|
id(phase) = 1;
|
||||||
- micro_wake_word.start:
|
- micro_wake_word.start:
|
||||||
- script.execute: update_led
|
- script.execute: update_led
|
||||||
|
|
||||||
|
|
||||||
voice_assistant:
|
voice_assistant:
|
||||||
id: va
|
id: va
|
||||||
@@ -336,10 +366,10 @@ voice_assistant:
|
|||||||
volume_multiplier: 2.0
|
volume_multiplier: 2.0
|
||||||
|
|
||||||
on_listening:
|
on_listening:
|
||||||
- logger.log: "listening 3 => phase"
|
- logger.log: "listening 3 => phase"
|
||||||
- micro_wake_word.stop:
|
- micro_wake_word.stop:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
id(phase) = 3;
|
id(phase) = 3;
|
||||||
- script.execute: update_led
|
- script.execute: update_led
|
||||||
|
|
||||||
on_stt_end:
|
on_stt_end:
|
||||||
@@ -353,53 +383,53 @@ voice_assistant:
|
|||||||
|
|
||||||
|
|
||||||
on_tts_start:
|
on_tts_start:
|
||||||
- logger.log: "answering 4 => phase"
|
- logger.log: "answering 4 => phase"
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
id(phase) = 4;
|
id(phase) = 4;
|
||||||
- script.execute: update_led
|
- script.execute: update_led
|
||||||
|
|
||||||
on_error:
|
on_error:
|
||||||
- logger.log: "ERROR!!!!!!!!!!!!!!!!"
|
- logger.log: "ERROR!!!!!!!!!!!!!!!!"
|
||||||
- light.turn_on:
|
- light.turn_on:
|
||||||
id: top_led
|
id: top_led
|
||||||
blue: 0%
|
blue: 0%
|
||||||
red: 100%
|
red: 100%
|
||||||
green: 0%
|
green: 0%
|
||||||
effect: pulse
|
effect: pulse
|
||||||
- delay: 3s
|
- delay: 3s
|
||||||
- lambda: id(phase) = 1;
|
- lambda: id(phase) = 1;
|
||||||
- script.execute: update_led
|
- script.execute: update_led
|
||||||
|
|
||||||
|
|
||||||
#########
|
#########
|
||||||
# Scripts
|
# Scripts
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- id: update_led
|
- id: update_led
|
||||||
then:
|
then:
|
||||||
- logger.log: "==>>>update_led"
|
- logger.log: "==>>>update_led"
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
if(id(phase) == 0)id(start).execute();
|
if(id(phase) == 0)id(start).execute();
|
||||||
if(id(phase) == 1)id(waiting).execute();
|
if(id(phase) == 1)id(waiting).execute();
|
||||||
if(id(phase) == 2)id(external_player).execute();
|
if(id(phase) == 2)id(external_player).execute();
|
||||||
if(id(phase) == 3)id(listening).execute();
|
if(id(phase) == 3)id(listening).execute();
|
||||||
if(id(phase) == 4)id(answering).execute();
|
if(id(phase) == 4)id(answering).execute();
|
||||||
|
|
||||||
- id: start
|
- id: start
|
||||||
then:
|
then:
|
||||||
- light.turn_on:
|
- light.turn_on:
|
||||||
id: top_led
|
id: top_led
|
||||||
effect: slow_pulse
|
effect: slow_pulse
|
||||||
red: 80%
|
red: 80%
|
||||||
green: 0%
|
green: 0%
|
||||||
blue: 80%
|
blue: 80%
|
||||||
- delay: 5sec
|
- delay: 5sec
|
||||||
- lambda: id(my_es8388).setup();
|
- lambda: id(my_es8388).setup();
|
||||||
- output.turn_off: dac_mute
|
- output.turn_off: dac_mute
|
||||||
- lambda: id(phase) = 1;
|
- lambda: id(phase) = 1;
|
||||||
- media_player.speaker.play_on_device_media_file:
|
- media_player.speaker.play_on_device_media_file:
|
||||||
media_file: little_sound
|
media_file: little_sound
|
||||||
announcement: true
|
announcement: true
|
||||||
- script.execute: update_led
|
- script.execute: update_led
|
||||||
|
|
||||||
- id: waiting
|
- id: waiting
|
||||||
@@ -411,8 +441,8 @@ script:
|
|||||||
green: 0%
|
green: 0%
|
||||||
blue: 100%
|
blue: 100%
|
||||||
brightness: 100%
|
brightness: 100%
|
||||||
- voice_assistant.stop:
|
- voice_assistant.stop:
|
||||||
- micro_wake_word.start:
|
- micro_wake_word.start:
|
||||||
|
|
||||||
|
|
||||||
- id: listening
|
- id: listening
|
||||||
@@ -422,8 +452,8 @@ script:
|
|||||||
effect: pulse
|
effect: pulse
|
||||||
red: 0%
|
red: 0%
|
||||||
green: 100%
|
green: 100%
|
||||||
blue: 0%
|
blue: 0%
|
||||||
brightness: 100%
|
brightness: 100%
|
||||||
|
|
||||||
- id: answering
|
- id: answering
|
||||||
then:
|
then:
|
||||||
@@ -432,8 +462,8 @@ script:
|
|||||||
effect: none
|
effect: none
|
||||||
red: 100%
|
red: 100%
|
||||||
green: 100%
|
green: 100%
|
||||||
blue: 0%
|
blue: 0%
|
||||||
brightness: 100%
|
brightness: 100%
|
||||||
|
|
||||||
- id: external_player
|
- id: external_player
|
||||||
then:
|
then:
|
||||||
@@ -442,7 +472,7 @@ script:
|
|||||||
effect: none
|
effect: none
|
||||||
red: 80%
|
red: 80%
|
||||||
green: 40%
|
green: 40%
|
||||||
blue: 0%
|
blue: 0%
|
||||||
|
|
||||||
- id: mute_on
|
- id: mute_on
|
||||||
then:
|
then:
|
||||||
|
Reference in New Issue
Block a user