Skip to content

Commit

Permalink
Format esp32-s3-box-3.yaml (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesserockz authored Jan 17, 2024
1 parent 65d39ef commit 735ea09
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 36 deletions.
49 changes: 49 additions & 0 deletions bluetooth-proxy/esp32-generic-c3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
substitutions:
name: esp32-bluetooth-proxy
friendly_name: Bluetooth Proxy

esphome:
name: ${name}
friendly_name: ${friendly_name}
name_add_mac_suffix: true
project:
name: esphome.bluetooth-proxy
version: "1.0"
platformio_options:
board_build.f_flash: 40000000L
board_build.flash_mode: dio
board_build.flash_size: 4MB

esp32:
board: esp32-c3-devkitm-1
framework:
type: esp-idf
sdkconfig_options:
CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED: n

wifi:
ap:

api:
logger:
ota:
improv_serial:

dashboard_import:
package_import_url: github://esphome/firmware/bluetooth-proxy/esp32-generic.yaml@main

esp32_ble_tracker:
scan_parameters:
# We currently use the defaults to ensure Bluetooth
# can co-exist with WiFi In the future we may be able to
# enable the built-in coexistence logic in ESP-IDF
active: true

bluetooth_proxy:
active: true

button:
- platform: safe_mode
name: Safe Mode Boot
entity_category: diagnostic
69 changes: 33 additions & 36 deletions voice-assistant/esp32-s3-box-lite.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
substitutions:
name: esp32-s3-box-lite
friendly_name: ESP32 S3 Box Lite
Expand All @@ -9,20 +8,20 @@ substitutions:
replying_illustration_file: https://github.com/esphome/firmware/raw/main/voice-assistant/casita/replying_320_240.png
error_illustration_file: https://github.com/esphome/firmware/raw/main/voice-assistant/casita/error_320_240.png

loading_illustration_background_color: '000000'
idle_illustration_background_color: '000000'
listening_illustration_background_color: 'FFFFFF'
thinking_illustration_background_color: 'FFFFFF'
replying_illustration_background_color: 'FFFFFF'
error_illustration_background_color: '000000'
loading_illustration_background_color: "000000"
idle_illustration_background_color: "000000"
listening_illustration_background_color: "FFFFFF"
thinking_illustration_background_color: "FFFFFF"
replying_illustration_background_color: "FFFFFF"
error_illustration_background_color: "000000"

voice_assist_idle_phase_id: '1'
voice_assist_listening_phase_id: '2'
voice_assist_thinking_phase_id: '3'
voice_assist_replying_phase_id: '4'
voice_assist_not_ready_phase_id: '10'
voice_assist_error_phase_id: '11'
voice_assist_muted_phase_id: '12'
voice_assist_idle_phase_id: "1"
voice_assist_listening_phase_id: "2"
voice_assist_thinking_phase_id: "3"
voice_assist_replying_phase_id: "4"
voice_assist_not_ready_phase_id: "10"
voice_assist_error_phase_id: "11"
voice_assist_muted_phase_id: "12"

esphome:
name: ${name}
Expand All @@ -35,16 +34,16 @@ esphome:
version: "1.0"
min_version: 2023.11.5
on_boot:
priority: 600
then:
- script.execute: draw_display
- delay: 30s
- if:
condition:
lambda: return id(init_in_progress);
then:
- lambda: id(init_in_progress) = false;
- script.execute: draw_display
priority: 600
then:
- script.execute: draw_display
- delay: 30s
- if:
condition:
lambda: return id(init_in_progress);
then:
- lambda: id(init_in_progress) = false;
- script.execute: draw_display

esp32:
board: esp32s3box
Expand Down Expand Up @@ -84,8 +83,8 @@ wifi:
ap:
on_connect:
- script.execute: draw_display
- delay: 5s # Gives time for improv results to be transmitted
- ble.disable:
- delay: 5s # Gives time for improv results to be transmitted
- ble.disable:
on_disconnect:
- script.execute: draw_display
- ble.enable:
Expand Down Expand Up @@ -226,7 +225,7 @@ voice_assistant:
condition:
lambda: return !id(init_in_progress);
then:
- lambda: id(voice_assistant_phase) = ${voice_assist_error_phase_id};
- lambda: id(voice_assistant_phase) = ${voice_assist_error_phase_id};
- script.execute: draw_display
- delay: 1s
- if:
Expand All @@ -248,13 +247,12 @@ voice_assistant:
- lambda: id(voice_assistant_phase) = ${voice_assist_idle_phase_id};
else:
- lambda: id(voice_assistant_phase) = ${voice_assist_muted_phase_id};
- lambda: id(init_in_progress) = false;
- lambda: id(init_in_progress) = false;
- script.execute: draw_display
on_client_disconnected:
- lambda: id(voice_assistant_phase) = ${voice_assist_not_ready_phase_id};
- lambda: id(voice_assistant_phase) = ${voice_assist_not_ready_phase_id};
- script.execute: draw_display


script:
- id: draw_display
then:
Expand Down Expand Up @@ -321,7 +319,7 @@ switch:
- if:
condition:
lambda: return !id(init_in_progress);
then:
then:
- lambda: id(va).set_use_wake_word(true);
- lambda: id(voice_assistant_phase) = ${voice_assist_idle_phase_id};
- if:
Expand All @@ -335,7 +333,7 @@ switch:
- if:
condition:
lambda: return !id(init_in_progress);
then:
then:
- voice_assistant.stop
- lambda: id(va).set_use_wake_word(false);
- lambda: id(voice_assistant_phase) = ${voice_assist_muted_phase_id};
Expand All @@ -345,7 +343,7 @@ globals:
- id: init_in_progress
type: bool
restore_value: no
initial_value: 'true'
initial_value: "true"
- id: voice_assistant_phase
type: int
restore_value: no
Expand Down Expand Up @@ -391,7 +389,7 @@ image:
id: error_no_ha
resize: 320x240
type: RGB24
use_transparency: true
use_transparency: true

color:
- id: idle_color
Expand All @@ -406,7 +404,7 @@ color:
hex: ${loading_illustration_background_color}
- id: error_color
hex: ${error_illustration_background_color}

spi:
clk_pin: 7
mosi_pin: 6
Expand Down Expand Up @@ -454,4 +452,3 @@ display:
- id: muted_page
lambda: |-
it.fill(Color::BLACK);

0 comments on commit 735ea09

Please sign in to comment.