20260326
This commit is contained in:
88
esphome/interfaces/CH224K.yaml
Normal file
88
esphome/interfaces/CH224K.yaml
Normal file
@@ -0,0 +1,88 @@
|
||||
---
|
||||
select:
|
||||
- platform: template
|
||||
name: "PD Modus"
|
||||
id: pd_voltage
|
||||
optimistic: true
|
||||
options:
|
||||
- "Off"
|
||||
- "5V"
|
||||
- "9V"
|
||||
- "12V"
|
||||
- "15V"
|
||||
- "20V"
|
||||
initial_option: "Off"
|
||||
on_value:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "Voltage set: %s (index %d)"
|
||||
args: ["x.c_str()", "i"]
|
||||
- if:
|
||||
condition:
|
||||
lambda: |-
|
||||
return (id(pd_voltage).active_index() == 0);
|
||||
then:
|
||||
- logger.log: "Off"
|
||||
|
||||
- if:
|
||||
condition:
|
||||
lambda: |-
|
||||
return (id(pd_voltage).active_index() == 1);
|
||||
then:
|
||||
- logger.log: "5V"
|
||||
- output.turn_on: pd_cfg1
|
||||
- output.turn_off: pd_cfg2
|
||||
- output.turn_off: pd_cfg3
|
||||
|
||||
- if:
|
||||
condition:
|
||||
lambda: |-
|
||||
return (id(pd_voltage).active_index() == 2);
|
||||
then:
|
||||
- logger.log: "9V"
|
||||
- output.turn_off: pd_cfg1
|
||||
- output.turn_off: pd_cfg2
|
||||
- output.turn_off: pd_cfg3
|
||||
|
||||
- if:
|
||||
condition:
|
||||
lambda: |-
|
||||
return (id(pd_voltage).active_index() == 3);
|
||||
then:
|
||||
- logger.log: "12V"
|
||||
- output.turn_off: pd_cfg1
|
||||
- output.turn_off: pd_cfg2
|
||||
- output.turn_on: pd_cfg3
|
||||
|
||||
- if:
|
||||
condition:
|
||||
lambda: |-
|
||||
return (id(pd_voltage).active_index() == 4);
|
||||
then:
|
||||
- logger.log: "15V"
|
||||
- output.turn_off: pd_cfg1
|
||||
- output.turn_on: pd_cfg2
|
||||
- output.turn_on: pd_cfg3
|
||||
|
||||
- if:
|
||||
condition:
|
||||
lambda: |-
|
||||
return (id(pd_voltage).active_index() == 5);
|
||||
then:
|
||||
- logger.log: "20V"
|
||||
- output.turn_off: pd_cfg1
|
||||
- output.turn_on: pd_cfg2
|
||||
- output.turn_off: pd_cfg3
|
||||
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: ${pin_pd_cfg1}
|
||||
id: pd_cfg1
|
||||
- platform: gpio
|
||||
pin: ${pin_pd_cfg2}
|
||||
id: pd_cfg2
|
||||
- platform: gpio
|
||||
pin: ${pin_pd_cfg3}
|
||||
id: pd_cfg3
|
||||
|
||||
44
esphome/interfaces/audio.yaml
Normal file
44
esphome/interfaces/audio.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: ${pin_amp_ctrl}
|
||||
name: "amp control"
|
||||
id: ampctrl
|
||||
restore_mode: ALWAYS_ON
|
||||
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin: ${pin_amp_lrclk}
|
||||
i2s_bclk_pin: ${pin_amp_bclk}
|
||||
#sample_rate: 48000
|
||||
speaker:
|
||||
- platform: i2s_audio
|
||||
id: speaker_id
|
||||
dac_type: external
|
||||
i2s_dout_pin: ${pin_amp_data}
|
||||
sample_rate: 48000
|
||||
- platform: mixer
|
||||
id: mixer_speaker_id
|
||||
output_speaker: speaker_id
|
||||
source_speakers:
|
||||
- id: announcement_spk_mixer_input
|
||||
- id: media_spk_mixer_input
|
||||
- platform: resampler
|
||||
id: media_spk_resampling_input
|
||||
output_speaker: media_spk_mixer_input
|
||||
- platform: resampler
|
||||
id: announcement_spk_resampling_input
|
||||
output_speaker: announcement_spk_mixer_input
|
||||
media_player:
|
||||
- platform: speaker
|
||||
name: "Speaker Media Player"
|
||||
id: speaker_media_player_id
|
||||
media_pipeline:
|
||||
speaker: media_spk_resampling_input
|
||||
num_channels: 2
|
||||
announcement_pipeline:
|
||||
speaker: announcement_spk_resampling_input
|
||||
num_channels: 1
|
||||
on_mute:
|
||||
- switch.turn_off: ampctrl
|
||||
on_unmute:
|
||||
- switch.turn_on: ampctrl
|
||||
25
esphome/interfaces/eth_W5500.yaml
Normal file
25
esphome/interfaces/eth_W5500.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
ethernet:
|
||||
type: w5500
|
||||
clk_pin: ${pin_eth_clk}
|
||||
mosi_pin: ${pin_eth_mosi}
|
||||
miso_pin: ${pin_eth_miso}
|
||||
cs_pin: ${pin_eth_cs}
|
||||
interrupt_pin: ${pin_eth_irq}
|
||||
reset_pin: ${pin_eth_rst}
|
||||
#clock_speed: 30 # optional defaults to 30
|
||||
|
||||
# manual_ip:
|
||||
# static_ip: ${ip}
|
||||
# gateway: ${gateway}
|
||||
# subnet: ${subnet}
|
||||
# dns1: ${dns1}
|
||||
# dns2: ${dns2}
|
||||
|
||||
text_sensor:
|
||||
- platform: ethernet_info
|
||||
ip_address:
|
||||
name: IP Address
|
||||
dns_address:
|
||||
name: DNS Address
|
||||
mac_address:
|
||||
name: MAC Address
|
||||
Reference in New Issue
Block a user