Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8dc781a6b1 | |||
| 6c91cc2d59 | |||
| ba2a56a15b | |||
| 9e7684e294 | |||
| 818b06f3d7 | |||
| 99bb2594e2 | |||
| 9104cd8fdc | |||
| 96b88624d9 | |||
| c1ba3012d4 | |||
| e77d9ee8d2 | |||
| bf49633fac | |||
| 99579a30f7 | |||
| 250bfa94bd | |||
| c342efc08f | |||
| 13e58355da | |||
| ee814c4afe | |||
| 6149a9e994 | |||
| 3b7c30634e | |||
| 38da2cebdd | |||
| 3da69c19ab | |||
| 35e7f81224 |
+1
-1
@@ -1 +1 @@
|
|||||||
2026.7.1
|
2026.7.2
|
||||||
@@ -1438,3 +1438,22 @@
|
|||||||
device_id: 6d1be741876624a70ab5b01b54c6fd6f
|
device_id: 6d1be741876624a70ab5b01b54c6fd6f
|
||||||
entity_id: 621e4377a089b7f5d92c7c9f2cc171a1
|
entity_id: 621e4377a089b7f5d92c7c9f2cc171a1
|
||||||
domain: switch
|
domain: switch
|
||||||
|
|
||||||
|
- id: epaper_daily_demotivational_quote
|
||||||
|
alias: Epaper tägliches Demotivationszitat
|
||||||
|
description: Wählt täglich ein festes Zitat aus der lokalen Zitatbibliothek aus.
|
||||||
|
triggers:
|
||||||
|
- trigger: homeassistant
|
||||||
|
event: start
|
||||||
|
- trigger: time
|
||||||
|
at: "00:00:00"
|
||||||
|
conditions: []
|
||||||
|
actions:
|
||||||
|
- action: input_select.select_option
|
||||||
|
target:
|
||||||
|
entity_id: input_select.epaper_demotivationszitat
|
||||||
|
data:
|
||||||
|
option: >-
|
||||||
|
{% set quotes = state_attr('input_select.epaper_demotivationszitat', 'options') %}
|
||||||
|
{{ quotes[(now().strftime('%j') | int - 1) % (quotes | count)] }}
|
||||||
|
mode: single
|
||||||
|
|||||||
@@ -35,6 +35,12 @@ utility_meter: !include utility_meters.yaml
|
|||||||
mqtt: !include mqtt.yaml
|
mqtt: !include mqtt.yaml
|
||||||
mqtt_statestream: !include mqtt_statestream.yaml
|
mqtt_statestream: !include mqtt_statestream.yaml
|
||||||
|
|
||||||
|
# Calendar data is normalised in a sandboxed script before ESPHome receives it.
|
||||||
|
python_script:
|
||||||
|
|
||||||
|
# Home Assistant-managed e-paper quote library
|
||||||
|
input_select: !include input_select.yaml
|
||||||
|
|
||||||
# Template sensors
|
# Template sensors
|
||||||
template: !include template.yaml
|
template: !include template.yaml
|
||||||
|
|
||||||
|
|||||||
+730
-265
File diff suppressed because it is too large
Load Diff
@@ -3,16 +3,16 @@
|
|||||||
substitutions:
|
substitutions:
|
||||||
name: m5stack-atom-echo
|
name: m5stack-atom-echo
|
||||||
friendly_name: M5Stack Atom Echo
|
friendly_name: M5Stack Atom Echo
|
||||||
micro_wake_word_model: okay_nabu # alexa, hey_jarvis, hey_mycroft are also supported
|
|
||||||
|
|
||||||
esphome:
|
esphome:
|
||||||
name: ${name}
|
name: ${name}
|
||||||
name_add_mac_suffix: False
|
name_add_mac_suffix: false
|
||||||
friendly_name: ${friendly_name}
|
friendly_name: ${friendly_name}
|
||||||
min_version: 2025.2.0
|
min_version: 2025.5.0
|
||||||
|
|
||||||
esp32:
|
esp32:
|
||||||
board: m5stack-atom
|
board: m5stack-atom
|
||||||
|
cpu_frequency: 240MHz
|
||||||
framework:
|
framework:
|
||||||
type: esp-idf
|
type: esp-idf
|
||||||
|
|
||||||
@@ -63,14 +63,17 @@ microphone:
|
|||||||
i2s_din_pin: GPIO23
|
i2s_din_pin: GPIO23
|
||||||
adc_type: external
|
adc_type: external
|
||||||
pdm: true
|
pdm: true
|
||||||
|
sample_rate: 16000
|
||||||
|
correct_dc_offset: true
|
||||||
|
|
||||||
speaker:
|
speaker:
|
||||||
- platform: i2s_audio
|
- platform: i2s_audio
|
||||||
id: echo_speaker
|
id: echo_speaker
|
||||||
i2s_dout_pin: GPIO22
|
i2s_dout_pin: GPIO22
|
||||||
dac_type: external
|
dac_type: external
|
||||||
bits_per_sample: 32bit
|
bits_per_sample: 16bit
|
||||||
channel: right
|
sample_rate: 16000
|
||||||
|
channel: stereo # The Echo has poor playback audio quality when using mon audio
|
||||||
buffer_duration: 60ms
|
buffer_duration: 60ms
|
||||||
|
|
||||||
media_player:
|
media_player:
|
||||||
@@ -80,7 +83,6 @@ media_player:
|
|||||||
announcement_pipeline:
|
announcement_pipeline:
|
||||||
speaker: echo_speaker
|
speaker: echo_speaker
|
||||||
format: WAV
|
format: WAV
|
||||||
codec_support_enabled: false
|
|
||||||
buffer_size: 6000
|
buffer_size: 6000
|
||||||
volume_min: 0.4
|
volume_min: 0.4
|
||||||
files:
|
files:
|
||||||
@@ -91,14 +93,7 @@ media_player:
|
|||||||
condition:
|
condition:
|
||||||
- microphone.is_capturing:
|
- microphone.is_capturing:
|
||||||
then:
|
then:
|
||||||
- if:
|
- script.execute: stop_wake_word
|
||||||
condition:
|
|
||||||
lambda: return id(wake_word_engine_location).state == "On device";
|
|
||||||
then:
|
|
||||||
- micro_wake_word.stop:
|
|
||||||
else:
|
|
||||||
- voice_assistant.stop:
|
|
||||||
- script.execute: reset_led
|
|
||||||
- light.turn_on:
|
- light.turn_on:
|
||||||
id: led
|
id: led
|
||||||
blue: 100%
|
blue: 100%
|
||||||
@@ -108,14 +103,18 @@ media_player:
|
|||||||
effect: none
|
effect: none
|
||||||
on_idle:
|
on_idle:
|
||||||
- script.execute: start_wake_word
|
- script.execute: start_wake_word
|
||||||
|
- script.execute: reset_led
|
||||||
|
|
||||||
voice_assistant:
|
voice_assistant:
|
||||||
id: va
|
id: va
|
||||||
|
micro_wake_word:
|
||||||
|
microphone:
|
||||||
microphone: echo_microphone
|
microphone: echo_microphone
|
||||||
|
channels: 0
|
||||||
|
gain_factor: 4
|
||||||
media_player: echo_media_player
|
media_player: echo_media_player
|
||||||
noise_suppression_level: 2
|
noise_suppression_level: 2
|
||||||
auto_gain: 31dBFS
|
auto_gain: 31dBFS
|
||||||
volume_multiplier: 2.0
|
|
||||||
on_listening:
|
on_listening:
|
||||||
- light.turn_on:
|
- light.turn_on:
|
||||||
id: led
|
id: led
|
||||||
@@ -139,8 +138,26 @@ voice_assistant:
|
|||||||
brightness: 100%
|
brightness: 100%
|
||||||
effect: none
|
effect: none
|
||||||
on_end:
|
on_end:
|
||||||
- delay: 100ms
|
# Handle the "nevermind" case where there is no announcement
|
||||||
- script.execute: start_wake_word
|
- wait_until:
|
||||||
|
condition:
|
||||||
|
- media_player.is_announcing:
|
||||||
|
timeout: 0.5s
|
||||||
|
# Restart only mWW if enabled; streaming wake words automatically restart
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- lambda: |-
|
||||||
|
return id(wake_word_engine_location).current_option() == "On device";
|
||||||
|
then:
|
||||||
|
- wait_until:
|
||||||
|
- and:
|
||||||
|
- not:
|
||||||
|
voice_assistant.is_running:
|
||||||
|
- not:
|
||||||
|
speaker.is_playing:
|
||||||
|
- lambda: id(va).set_use_wake_word(false);
|
||||||
|
- micro_wake_word.start:
|
||||||
|
- script.execute: reset_led
|
||||||
on_error:
|
on_error:
|
||||||
- light.turn_on:
|
- light.turn_on:
|
||||||
id: led
|
id: led
|
||||||
@@ -155,11 +172,9 @@ voice_assistant:
|
|||||||
- delay: 2s # Give the api server time to settle
|
- delay: 2s # Give the api server time to settle
|
||||||
- script.execute: start_wake_word
|
- script.execute: start_wake_word
|
||||||
on_client_disconnected:
|
on_client_disconnected:
|
||||||
- voice_assistant.stop:
|
- script.execute: stop_wake_word
|
||||||
- micro_wake_word.stop:
|
|
||||||
on_timer_finished:
|
on_timer_finished:
|
||||||
- voice_assistant.stop:
|
- script.execute: stop_wake_word
|
||||||
- micro_wake_word.stop:
|
|
||||||
- wait_until:
|
- wait_until:
|
||||||
not:
|
not:
|
||||||
microphone.is_capturing:
|
microphone.is_capturing:
|
||||||
@@ -235,7 +250,8 @@ script:
|
|||||||
then:
|
then:
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
- lambda: return id(wake_word_engine_location).state == "On device";
|
- lambda: |-
|
||||||
|
return id(wake_word_engine_location).current_option() == "On device";
|
||||||
- switch.is_on: use_listen_light
|
- switch.is_on: use_listen_light
|
||||||
then:
|
then:
|
||||||
- light.turn_on:
|
- light.turn_on:
|
||||||
@@ -248,7 +264,8 @@ script:
|
|||||||
else:
|
else:
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
- lambda: return id(wake_word_engine_location).state != "On device";
|
- lambda: |-
|
||||||
|
return id(wake_word_engine_location).current_option() == "On device";
|
||||||
- switch.is_on: use_listen_light
|
- switch.is_on: use_listen_light
|
||||||
then:
|
then:
|
||||||
- light.turn_on:
|
- light.turn_on:
|
||||||
@@ -262,27 +279,41 @@ script:
|
|||||||
- light.turn_off: led
|
- light.turn_off: led
|
||||||
- id: start_wake_word
|
- id: start_wake_word
|
||||||
then:
|
then:
|
||||||
- wait_until:
|
|
||||||
and:
|
|
||||||
- media_player.is_idle:
|
|
||||||
- speaker.is_stopped:
|
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
lambda: return id(wake_word_engine_location).state == "On device";
|
and:
|
||||||
|
- not:
|
||||||
|
- voice_assistant.is_running:
|
||||||
|
- lambda: |-
|
||||||
|
return id(wake_word_engine_location).current_option() == "On device";
|
||||||
then:
|
then:
|
||||||
- voice_assistant.stop
|
- lambda: id(va).set_use_wake_word(false);
|
||||||
- micro_wake_word.stop:
|
|
||||||
- delay: 1s
|
|
||||||
- script.execute: reset_led
|
|
||||||
- script.wait: reset_led
|
|
||||||
- micro_wake_word.start:
|
- micro_wake_word.start:
|
||||||
else:
|
|
||||||
- if:
|
- if:
|
||||||
condition: voice_assistant.is_running
|
condition:
|
||||||
|
and:
|
||||||
|
- not:
|
||||||
|
- voice_assistant.is_running:
|
||||||
|
- lambda: |-
|
||||||
|
return id(wake_word_engine_location).current_option() == "In Home Assistant";
|
||||||
then:
|
then:
|
||||||
- voice_assistant.stop:
|
- lambda: id(va).set_use_wake_word(true);
|
||||||
- script.execute: reset_led
|
|
||||||
- voice_assistant.start_continuous:
|
- voice_assistant.start_continuous:
|
||||||
|
- id: stop_wake_word
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
lambda: |-
|
||||||
|
return id(wake_word_engine_location).current_option() == "In Home Assistant";
|
||||||
|
then:
|
||||||
|
- lambda: id(va).set_use_wake_word(false);
|
||||||
|
- voice_assistant.stop:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
lambda: |-
|
||||||
|
return id(wake_word_engine_location).current_option() == "On device";
|
||||||
|
then:
|
||||||
|
- micro_wake_word.stop:
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- platform: template
|
- platform: template
|
||||||
@@ -342,7 +373,7 @@ select:
|
|||||||
condition:
|
condition:
|
||||||
lambda: return x == "In Home Assistant";
|
lambda: return x == "In Home Assistant";
|
||||||
then:
|
then:
|
||||||
- micro_wake_word.stop
|
- micro_wake_word.stop:
|
||||||
- delay: 500ms
|
- delay: 500ms
|
||||||
- lambda: id(va).set_use_wake_word(true);
|
- lambda: id(va).set_use_wake_word(true);
|
||||||
- voice_assistant.start_continuous:
|
- voice_assistant.start_continuous:
|
||||||
@@ -351,9 +382,9 @@ select:
|
|||||||
lambda: return x == "On device";
|
lambda: return x == "On device";
|
||||||
then:
|
then:
|
||||||
- lambda: id(va).set_use_wake_word(false);
|
- lambda: id(va).set_use_wake_word(false);
|
||||||
- voice_assistant.stop
|
- voice_assistant.stop:
|
||||||
- delay: 500ms
|
- delay: 500ms
|
||||||
- micro_wake_word.start
|
- micro_wake_word.start:
|
||||||
|
|
||||||
micro_wake_word:
|
micro_wake_word:
|
||||||
on_wake_word_detected:
|
on_wake_word_detected:
|
||||||
@@ -361,4 +392,9 @@ micro_wake_word:
|
|||||||
wake_word: !lambda return wake_word;
|
wake_word: !lambda return wake_word;
|
||||||
vad:
|
vad:
|
||||||
models:
|
models:
|
||||||
- model: ${micro_wake_word_model}
|
- model: okay_nabu
|
||||||
|
id: okay_nabu
|
||||||
|
- model: hey_mycroft
|
||||||
|
id: hey_mycroft
|
||||||
|
- model: hey_jarvis
|
||||||
|
id: hey_jarvis
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Source: https://github.com/wildekek/rdtech-esphome
|
||||||
|
|
||||||
substitutions:
|
substitutions:
|
||||||
name: "riden-labornetzteil-18a"
|
name: "riden-labornetzteil-18a"
|
||||||
friendly_name: "Riden Labornetzteil 18A"
|
friendly_name: "Riden Labornetzteil 18A"
|
||||||
@@ -16,6 +18,8 @@ substitutions:
|
|||||||
RD6006_current_maximum: "6"
|
RD6006_current_maximum: "6"
|
||||||
RD6006_current_accuracy: "3"
|
RD6006_current_accuracy: "3"
|
||||||
RD6006_current_multiplier: "0.001"
|
RD6006_current_multiplier: "0.001"
|
||||||
|
RD6006_power_accuracy: "2"
|
||||||
|
RD6006_power_multiplier: "0.01"
|
||||||
|
|
||||||
RD6006P_voltage_maximum: "60"
|
RD6006P_voltage_maximum: "60"
|
||||||
RD6006P_voltage_accuracy: "3"
|
RD6006P_voltage_accuracy: "3"
|
||||||
@@ -23,6 +27,8 @@ substitutions:
|
|||||||
RD6006P_current_maximum: "6"
|
RD6006P_current_maximum: "6"
|
||||||
RD6006P_current_accuracy: "4"
|
RD6006P_current_accuracy: "4"
|
||||||
RD6006P_current_multiplier: "0.0001"
|
RD6006P_current_multiplier: "0.0001"
|
||||||
|
RD6006P_power_accuracy: "3"
|
||||||
|
RD6006P_power_multiplier: "0.001"
|
||||||
|
|
||||||
RD6012_voltage_maximum: "60"
|
RD6012_voltage_maximum: "60"
|
||||||
RD6012_voltage_accuracy: "2"
|
RD6012_voltage_accuracy: "2"
|
||||||
@@ -30,6 +36,8 @@ substitutions:
|
|||||||
RD6012_current_maximum: "12"
|
RD6012_current_maximum: "12"
|
||||||
RD6012_current_accuracy: "2"
|
RD6012_current_accuracy: "2"
|
||||||
RD6012_current_multiplier: "0.01"
|
RD6012_current_multiplier: "0.01"
|
||||||
|
RD6012_power_accuracy: "2"
|
||||||
|
RD6012_power_multiplier: "0.01"
|
||||||
|
|
||||||
RD6018_voltage_maximum: "60"
|
RD6018_voltage_maximum: "60"
|
||||||
RD6018_voltage_accuracy: "2"
|
RD6018_voltage_accuracy: "2"
|
||||||
@@ -37,6 +45,8 @@ substitutions:
|
|||||||
RD6018_current_maximum: "18"
|
RD6018_current_maximum: "18"
|
||||||
RD6018_current_accuracy: "2"
|
RD6018_current_accuracy: "2"
|
||||||
RD6018_current_multiplier: "0.01"
|
RD6018_current_multiplier: "0.01"
|
||||||
|
RD6018_power_accuracy: "2"
|
||||||
|
RD6018_power_multiplier: "0.01"
|
||||||
|
|
||||||
esphome:
|
esphome:
|
||||||
name: $device_name
|
name: $device_name
|
||||||
@@ -45,7 +55,7 @@ esphome:
|
|||||||
name_add_mac_suffix: false
|
name_add_mac_suffix: false
|
||||||
project:
|
project:
|
||||||
name: "wildekek.rd6006-controller"
|
name: "wildekek.rd6006-controller"
|
||||||
version: "1.4.1"
|
version: "1.5"
|
||||||
|
|
||||||
esp8266:
|
esp8266:
|
||||||
board: esp12e
|
board: esp12e
|
||||||
@@ -56,7 +66,7 @@ network:
|
|||||||
wifi:
|
wifi:
|
||||||
ssid: "Voltage-legacy"
|
ssid: "Voltage-legacy"
|
||||||
password: !secret voltage_legacy_psk
|
password: !secret voltage_legacy_psk
|
||||||
#use_address: riden-labornetzteil-18a.home
|
use_address: riden-labornetzteil-18a.home
|
||||||
power_save_mode: high
|
power_save_mode: high
|
||||||
fast_connect: on
|
fast_connect: on
|
||||||
min_auth_mode: WPA2
|
min_auth_mode: WPA2
|
||||||
@@ -149,10 +159,10 @@ sensor:
|
|||||||
register_type: holding
|
register_type: holding
|
||||||
value_type: U_WORD
|
value_type: U_WORD
|
||||||
accuracy_decimals: 0
|
accuracy_decimals: 0
|
||||||
on_value:
|
# on_value:
|
||||||
then:
|
# then:
|
||||||
- lambda: |-
|
# - lambda: |-
|
||||||
id(model_name).publish_state(value_accuracy_to_string(x, 0));
|
# id(model_name).publish_state(value_accuracy_to_string(x, 0));
|
||||||
|
|
||||||
- platform: modbus_controller
|
- platform: modbus_controller
|
||||||
name: "Serial Number"
|
name: "Serial Number"
|
||||||
@@ -213,9 +223,9 @@ sensor:
|
|||||||
unit_of_measurement: "W"
|
unit_of_measurement: "W"
|
||||||
register_type: holding
|
register_type: holding
|
||||||
value_type: U_DWORD
|
value_type: U_DWORD
|
||||||
accuracy_decimals: 2
|
accuracy_decimals: ${${model}_power_accuracy}
|
||||||
filters:
|
filters:
|
||||||
- multiply: 0.01
|
- multiply: ${${model}_power_multiplier}
|
||||||
|
|
||||||
- platform: modbus_controller
|
- platform: modbus_controller
|
||||||
modbus_controller_id: powersupply
|
modbus_controller_id: powersupply
|
||||||
@@ -226,9 +236,9 @@ sensor:
|
|||||||
unit_of_measurement: "V"
|
unit_of_measurement: "V"
|
||||||
register_type: holding
|
register_type: holding
|
||||||
value_type: U_WORD
|
value_type: U_WORD
|
||||||
accuracy_decimals: ${${model}_voltage_accuracy}
|
accuracy_decimals: 2
|
||||||
filters:
|
filters:
|
||||||
- multiply: ${${model}_voltage_multiplier}
|
- multiply: 0.01
|
||||||
|
|
||||||
- platform: modbus_controller
|
- platform: modbus_controller
|
||||||
modbus_controller_id: powersupply
|
modbus_controller_id: powersupply
|
||||||
@@ -266,9 +276,9 @@ sensor:
|
|||||||
unit_of_measurement: "V"
|
unit_of_measurement: "V"
|
||||||
register_type: holding
|
register_type: holding
|
||||||
value_type: U_WORD
|
value_type: U_WORD
|
||||||
accuracy_decimals: ${${model}_voltage_accuracy}
|
accuracy_decimals: 2
|
||||||
filters:
|
filters:
|
||||||
- multiply: ${${model}_voltage_multiplier}
|
- multiply: 0.01
|
||||||
|
|
||||||
- platform: modbus_controller
|
- platform: modbus_controller
|
||||||
name: "Temperature"
|
name: "Temperature"
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Source: https://github.com/wildekek/rdtech-esphome
|
||||||
|
|
||||||
substitutions:
|
substitutions:
|
||||||
name: "riden-labornetzteil-6a"
|
name: "riden-labornetzteil-6a"
|
||||||
friendly_name: "Riden Labornetzteil 6A"
|
friendly_name: "Riden Labornetzteil 6A"
|
||||||
@@ -16,6 +18,8 @@ substitutions:
|
|||||||
RD6006_current_maximum: "6"
|
RD6006_current_maximum: "6"
|
||||||
RD6006_current_accuracy: "3"
|
RD6006_current_accuracy: "3"
|
||||||
RD6006_current_multiplier: "0.001"
|
RD6006_current_multiplier: "0.001"
|
||||||
|
RD6006_power_accuracy: "2"
|
||||||
|
RD6006_power_multiplier: "0.01"
|
||||||
|
|
||||||
RD6006P_voltage_maximum: "60"
|
RD6006P_voltage_maximum: "60"
|
||||||
RD6006P_voltage_accuracy: "3"
|
RD6006P_voltage_accuracy: "3"
|
||||||
@@ -23,6 +27,8 @@ substitutions:
|
|||||||
RD6006P_current_maximum: "6"
|
RD6006P_current_maximum: "6"
|
||||||
RD6006P_current_accuracy: "4"
|
RD6006P_current_accuracy: "4"
|
||||||
RD6006P_current_multiplier: "0.0001"
|
RD6006P_current_multiplier: "0.0001"
|
||||||
|
RD6006P_power_accuracy: "3"
|
||||||
|
RD6006P_power_multiplier: "0.001"
|
||||||
|
|
||||||
RD6012_voltage_maximum: "60"
|
RD6012_voltage_maximum: "60"
|
||||||
RD6012_voltage_accuracy: "2"
|
RD6012_voltage_accuracy: "2"
|
||||||
@@ -30,6 +36,8 @@ substitutions:
|
|||||||
RD6012_current_maximum: "12"
|
RD6012_current_maximum: "12"
|
||||||
RD6012_current_accuracy: "2"
|
RD6012_current_accuracy: "2"
|
||||||
RD6012_current_multiplier: "0.01"
|
RD6012_current_multiplier: "0.01"
|
||||||
|
RD6012_power_accuracy: "2"
|
||||||
|
RD6012_power_multiplier: "0.01"
|
||||||
|
|
||||||
RD6018_voltage_maximum: "60"
|
RD6018_voltage_maximum: "60"
|
||||||
RD6018_voltage_accuracy: "2"
|
RD6018_voltage_accuracy: "2"
|
||||||
@@ -37,6 +45,8 @@ substitutions:
|
|||||||
RD6018_current_maximum: "18"
|
RD6018_current_maximum: "18"
|
||||||
RD6018_current_accuracy: "2"
|
RD6018_current_accuracy: "2"
|
||||||
RD6018_current_multiplier: "0.01"
|
RD6018_current_multiplier: "0.01"
|
||||||
|
RD6018_power_accuracy: "2"
|
||||||
|
RD6018_power_multiplier: "0.01"
|
||||||
|
|
||||||
esphome:
|
esphome:
|
||||||
name: $device_name
|
name: $device_name
|
||||||
@@ -56,7 +66,7 @@ network:
|
|||||||
wifi:
|
wifi:
|
||||||
ssid: "Voltage-legacy"
|
ssid: "Voltage-legacy"
|
||||||
password: !secret voltage_legacy_psk
|
password: !secret voltage_legacy_psk
|
||||||
#use_address: riden-labornetzteil-6a.home
|
use_address: riden-labornetzteil-6a.home
|
||||||
power_save_mode: high
|
power_save_mode: high
|
||||||
fast_connect: on
|
fast_connect: on
|
||||||
min_auth_mode: WPA2
|
min_auth_mode: WPA2
|
||||||
@@ -149,10 +159,10 @@ sensor:
|
|||||||
register_type: holding
|
register_type: holding
|
||||||
value_type: U_WORD
|
value_type: U_WORD
|
||||||
accuracy_decimals: 0
|
accuracy_decimals: 0
|
||||||
on_value:
|
# on_value:
|
||||||
then:
|
# then:
|
||||||
- lambda: |-
|
# - lambda: |-
|
||||||
id(model_name).publish_state(value_accuracy_to_string(x, 0));
|
# id(model_name).publish_state(value_accuracy_to_string(x, 0));
|
||||||
|
|
||||||
- platform: modbus_controller
|
- platform: modbus_controller
|
||||||
name: "Serial Number"
|
name: "Serial Number"
|
||||||
@@ -213,9 +223,9 @@ sensor:
|
|||||||
unit_of_measurement: "W"
|
unit_of_measurement: "W"
|
||||||
register_type: holding
|
register_type: holding
|
||||||
value_type: U_DWORD
|
value_type: U_DWORD
|
||||||
accuracy_decimals: 2
|
accuracy_decimals: ${${model}_power_accuracy}
|
||||||
filters:
|
filters:
|
||||||
- multiply: 0.01
|
- multiply: ${${model}_power_multiplier}
|
||||||
|
|
||||||
- platform: modbus_controller
|
- platform: modbus_controller
|
||||||
modbus_controller_id: powersupply
|
modbus_controller_id: powersupply
|
||||||
@@ -226,9 +236,9 @@ sensor:
|
|||||||
unit_of_measurement: "V"
|
unit_of_measurement: "V"
|
||||||
register_type: holding
|
register_type: holding
|
||||||
value_type: U_WORD
|
value_type: U_WORD
|
||||||
accuracy_decimals: ${${model}_voltage_accuracy}
|
accuracy_decimals: 2
|
||||||
filters:
|
filters:
|
||||||
- multiply: ${${model}_voltage_multiplier}
|
- multiply: 0.01
|
||||||
|
|
||||||
- platform: modbus_controller
|
- platform: modbus_controller
|
||||||
modbus_controller_id: powersupply
|
modbus_controller_id: powersupply
|
||||||
@@ -266,9 +276,9 @@ sensor:
|
|||||||
unit_of_measurement: "V"
|
unit_of_measurement: "V"
|
||||||
register_type: holding
|
register_type: holding
|
||||||
value_type: U_WORD
|
value_type: U_WORD
|
||||||
accuracy_decimals: ${${model}_voltage_accuracy}
|
accuracy_decimals: 2
|
||||||
filters:
|
filters:
|
||||||
- multiply: ${${model}_voltage_multiplier}
|
- multiply: 0.01
|
||||||
|
|
||||||
- platform: modbus_controller
|
- platform: modbus_controller
|
||||||
name: "Temperature"
|
name: "Temperature"
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
epaper_demotivationszitat:
|
||||||
|
name: Epaper Demotivationszitat
|
||||||
|
icon: mdi:emoticon-sad-outline
|
||||||
|
options:
|
||||||
|
- "Erwarte nichts. Dann kann dich auch wenig enttäuschen."
|
||||||
|
- "Du musst nicht scheitern. Es reicht, es nie zu versuchen."
|
||||||
|
- "Der Weg ist das Ziel. Leider führt er im Kreis."
|
||||||
|
- "Auch ein Rückschritt ist Bewegung. Nur eben rückwärts."
|
||||||
|
- "Nicht jeder Tag muss gut sein. Dieser hier zum Beispiel nicht."
|
||||||
|
- "Dein Potenzial ist beeindruckend. Seine Nutzung bleibt optional."
|
||||||
|
- "Morgen wird alles besser. Wahrscheinlich aber auch nicht."
|
||||||
|
- "Motivation ist vergänglich. Frust ist zuverlässig."
|
||||||
|
- "Man kann nicht alles haben. Nicht einmal gute Laune."
|
||||||
|
- "Wenn Plan A scheitert, war Plan B vermutlich auch keine Hilfe."
|
||||||
|
- "Es ist nie zu spät, die Erwartungen zu senken."
|
||||||
|
- "Du bist nicht zu spät. Die anderen sind nur früher gescheitert."
|
||||||
|
- "Das wird schon. Nur eben nicht gut."
|
||||||
|
- "Ziele sind wichtig. Besonders wenn man sie verfehlt."
|
||||||
|
- "Die Konkurrenz schläft nicht. Du darfst trotzdem weitermachen."
|
||||||
|
- "Du gibst dein Bestes. Das erklärt einiges."
|
||||||
|
- "Jeder Fehler ist eine Lektion. Du bist bald Experte."
|
||||||
|
- "Heute ist ein neuer Tag. Die Probleme sind dieselben."
|
||||||
|
- "Erfolg braucht Geduld. Enttäuschung ist sofort verfügbar."
|
||||||
|
- "Ein kleiner Schritt für dich. Ein kaum bemerkbarer für alle anderen."
|
||||||
|
- "Wer früh aufgibt, hat länger frei."
|
||||||
|
- "Es gibt keine dummen Fragen. Nur ungünstige Zeitpunkte."
|
||||||
|
- "Deine Komfortzone vermisst dich nicht."
|
||||||
|
- "Manchmal gewinnt man. Meistens lernt man daraus."
|
||||||
|
- "Der erste Schritt ist der schwerste. Die anderen sind nur länger."
|
||||||
|
- "Arbeite hart. Vielleicht merkt es niemand."
|
||||||
|
- "Nicht aufgeben. Es könnte noch schlimmer werden."
|
||||||
|
- "Träume groß. Die Realität übernimmt den Rest."
|
||||||
|
- "Das Glas ist halb voll. Mit Problemen."
|
||||||
|
- "Jeder Tag bietet Chancen. Manche davon sind Termine."
|
||||||
|
- "Du kannst alles schaffen. Außer vielleicht heute."
|
||||||
|
- "Das Leben ist kurz. Besprechungen sind länger."
|
||||||
|
- "Mut steht am Anfang. Die Rechnung kommt später."
|
||||||
|
- "Wenn es einfach wäre, würde es jemand anders machen."
|
||||||
|
- "Deine To-do-Liste glaubt an dich. Sie muss ja nicht mitmachen."
|
||||||
|
- "Perfektion ist erreichbar. Nur nicht von hier."
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
CALENDAR_NAMES = {
|
||||||
|
"calendar.tkrz_kalender": "Arbeit",
|
||||||
|
"calendar.privat": "Privat",
|
||||||
|
}
|
||||||
|
DAY_NAMES = ["Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"]
|
||||||
|
MAX_ENTRIES = 8
|
||||||
|
# Reserve the right side of each row for start and end times.
|
||||||
|
MAX_TITLE_LENGTH = 22
|
||||||
|
MAX_META_LENGTH = 35
|
||||||
|
|
||||||
|
|
||||||
|
def shorten(value, maximum):
|
||||||
|
value = (value or "").strip()
|
||||||
|
if len(value) <= maximum:
|
||||||
|
return value
|
||||||
|
return value[: maximum - 3].rstrip() + "..."
|
||||||
|
|
||||||
|
|
||||||
|
def compact_event(event, calendar_name):
|
||||||
|
start = event.get("start", "")
|
||||||
|
all_day = "T" not in start
|
||||||
|
end = event.get("end", "")
|
||||||
|
time = "ganztägig" if all_day else start[11:16]
|
||||||
|
end_time = "" if all_day or "T" not in end else end[11:16]
|
||||||
|
|
||||||
|
location = (event.get("location") or "").split("\n")[0].strip()
|
||||||
|
meta = calendar_name
|
||||||
|
if location:
|
||||||
|
meta += " / " + location
|
||||||
|
|
||||||
|
return {
|
||||||
|
"title": shorten(event.get("summary", "Ohne Titel"), MAX_TITLE_LENGTH),
|
||||||
|
"time": time,
|
||||||
|
"end": end_time,
|
||||||
|
"meta": shorten(meta, MAX_META_LENGTH),
|
||||||
|
"all_day": int(all_day),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
calendar_data = data.get("calendar", {})
|
||||||
|
today = str(data.get("now", ""))[:10]
|
||||||
|
events_by_date = {}
|
||||||
|
|
||||||
|
for calendar_id, calendar in calendar_data.items():
|
||||||
|
calendar_name = CALENDAR_NAMES.get(calendar_id, calendar_id.split(".")[-1].capitalize())
|
||||||
|
for event in calendar.get("events", []):
|
||||||
|
start = event.get("start", "")
|
||||||
|
end = event.get("end", "")
|
||||||
|
event_date = start[:10]
|
||||||
|
end_date = end[:10]
|
||||||
|
|
||||||
|
# Ignore malformed or already finished entries. All-day event end dates
|
||||||
|
# are exclusive in Home Assistant; timed events ending today may still be
|
||||||
|
# active. Multi-day entries remain visible on today's date rail.
|
||||||
|
all_day = "T" not in start
|
||||||
|
if not event_date or (all_day and end_date <= today) or (not all_day and end_date < today):
|
||||||
|
continue
|
||||||
|
if event_date < today:
|
||||||
|
event_date = today
|
||||||
|
|
||||||
|
events_by_date.setdefault(event_date, []).append(
|
||||||
|
compact_event(event, calendar_name)
|
||||||
|
)
|
||||||
|
|
||||||
|
entries = []
|
||||||
|
entry_count = 0
|
||||||
|
for date in sorted(events_by_date):
|
||||||
|
if entry_count >= MAX_ENTRIES:
|
||||||
|
break
|
||||||
|
|
||||||
|
events = events_by_date[date]
|
||||||
|
events.sort(key=lambda item: (item["all_day"] == 0, item["time"]))
|
||||||
|
remaining = MAX_ENTRIES - entry_count
|
||||||
|
events = events[:remaining]
|
||||||
|
entry_count += len(events)
|
||||||
|
|
||||||
|
parsed_date = dt_util.parse_datetime(date)
|
||||||
|
entries.append(
|
||||||
|
{
|
||||||
|
"day": parsed_date.day,
|
||||||
|
"weekday": DAY_NAMES[parsed_date.weekday()],
|
||||||
|
"today": int(date == today),
|
||||||
|
"events": events,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
output["entries"] = entries
|
||||||
+6
-4
@@ -10,7 +10,8 @@
|
|||||||
unique_id: '3303381540758'
|
unique_id: '3303381540758'
|
||||||
host: !secret router_ip
|
host: !secret router_ip
|
||||||
community: !secret router_community
|
community: !secret router_community
|
||||||
baseoid: .1.3.6.1.2.1.31.1.1.1.6.511
|
# baseoid: .1.3.6.1.2.1.31.1.1.1.6.511
|
||||||
|
baseoid: .1.3.6.1.2.1.2.2.1.10.12
|
||||||
version: 2c
|
version: 2c
|
||||||
unit_of_measurement: "Octets"
|
unit_of_measurement: "Octets"
|
||||||
- platform: snmp
|
- platform: snmp
|
||||||
@@ -18,7 +19,8 @@
|
|||||||
unique_id: '1573258703922'
|
unique_id: '1573258703922'
|
||||||
host: !secret router_ip
|
host: !secret router_ip
|
||||||
community: !secret router_community
|
community: !secret router_community
|
||||||
baseoid: .1.3.6.1.2.1.31.1.1.1.10.511
|
# baseoid: .1.3.6.1.2.1.31.1.1.1.10.511
|
||||||
|
baseoid: .1.3.6.1.2.1.2.2.1.16.12
|
||||||
version: 2c
|
version: 2c
|
||||||
unit_of_measurement: "Octets"
|
unit_of_measurement: "Octets"
|
||||||
|
|
||||||
@@ -38,13 +40,13 @@
|
|||||||
unique_id: '9081721471264'
|
unique_id: '9081721471264'
|
||||||
state_characteristic: mean
|
state_characteristic: mean
|
||||||
entity_id: sensor.internet_speed_in
|
entity_id: sensor.internet_speed_in
|
||||||
sampling_size: 10
|
sampling_size: 2
|
||||||
- platform: statistics
|
- platform: statistics
|
||||||
name: 'WAN Traffic Out'
|
name: 'WAN Traffic Out'
|
||||||
unique_id: '8688955223027'
|
unique_id: '8688955223027'
|
||||||
state_characteristic: mean
|
state_characteristic: mean
|
||||||
entity_id: sensor.internet_speed_out
|
entity_id: sensor.internet_speed_out
|
||||||
sampling_size: 10
|
sampling_size: 2
|
||||||
|
|
||||||
# Sensor for Riemann sum of energy import (W -> Wh)
|
# Sensor for Riemann sum of energy import (W -> Wh)
|
||||||
- platform: integration
|
- platform: integration
|
||||||
|
|||||||
@@ -49,6 +49,11 @@
|
|||||||
name: Sun Setting Template
|
name: Sun Setting Template
|
||||||
state: '{{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom
|
state: '{{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom
|
||||||
(''%H:%M'') }}'
|
(''%H:%M'') }}'
|
||||||
|
- unique_id: epaper_demotivational_quote
|
||||||
|
default_entity_id: sensor.epaper_demotivationszitat
|
||||||
|
name: Epaper Demotivationszitat
|
||||||
|
state: "{{ states('input_select.epaper_demotivationszitat') }}"
|
||||||
|
|
||||||
- name: "power_other"
|
- name: "power_other"
|
||||||
unique_id: '5579422933393'
|
unique_id: '5579422933393'
|
||||||
unit_of_measurement: "W"
|
unit_of_measurement: "W"
|
||||||
@@ -79,6 +84,35 @@
|
|||||||
attributes:
|
attributes:
|
||||||
last_reset: '1970-01-01T00:00:00+00:00'
|
last_reset: '1970-01-01T00:00:00+00:00'
|
||||||
|
|
||||||
|
# Compact calendar feed for the e-paper display. The actual event data lives in
|
||||||
|
# the `entries` attribute, which ESPHome reads as a text sensor.
|
||||||
|
- trigger:
|
||||||
|
- trigger: homeassistant
|
||||||
|
event: start
|
||||||
|
- trigger: time_pattern
|
||||||
|
minutes: /15
|
||||||
|
action:
|
||||||
|
- action: calendar.get_events
|
||||||
|
target:
|
||||||
|
entity_id:
|
||||||
|
- calendar.tkrz_kalender
|
||||||
|
- calendar.privat
|
||||||
|
data:
|
||||||
|
duration:
|
||||||
|
days: 14
|
||||||
|
response_variable: calendar_response
|
||||||
|
- action: python_script.epaper_calendar_data
|
||||||
|
data:
|
||||||
|
calendar: "{{ calendar_response }}"
|
||||||
|
now: "{{ now().date() }}"
|
||||||
|
response_variable: calendar_converted
|
||||||
|
sensor:
|
||||||
|
- name: Epaper Kalenderdaten
|
||||||
|
unique_id: epaper_calendar_data
|
||||||
|
state: "{{ calendar_converted.entries | count }}"
|
||||||
|
attributes:
|
||||||
|
entries: "{{ calendar_converted.entries }}"
|
||||||
|
|
||||||
# Shelly 3EM cumulative sensors (incl. PV)
|
# Shelly 3EM cumulative sensors (incl. PV)
|
||||||
- sensor:
|
- sensor:
|
||||||
# Template sensor for values of power import (active_power > 0)
|
# Template sensor for values of power import (active_power > 0)
|
||||||
|
|||||||
+12
-6
@@ -1,34 +1,40 @@
|
|||||||
# Internet traffic
|
# Internet traffic
|
||||||
internet_usage_in_monthly:
|
internet_usage_in_monthly:
|
||||||
source: sensor.snmp_wan_in
|
source: sensor.wan_in_derivative
|
||||||
name: Monthly internet traffic in
|
name: Monthly internet traffic in
|
||||||
unique_id: monthly_internet_traffic_in
|
unique_id: monthly_internet_traffic_in
|
||||||
cycle: monthly
|
cycle: monthly
|
||||||
|
delta_values: True
|
||||||
internet_usage_out_monthly:
|
internet_usage_out_monthly:
|
||||||
source: sensor.snmp_wan_out
|
source: sensor.wan_out_derivative
|
||||||
name: Monthly internet traffic out
|
name: Monthly internet traffic out
|
||||||
unique_id: monthly_internet_traffic_out
|
unique_id: monthly_internet_traffic_out
|
||||||
cycle: monthly
|
cycle: monthly
|
||||||
|
delta_values: True
|
||||||
internet_usage_in_daily:
|
internet_usage_in_daily:
|
||||||
source: sensor.snmp_wan_in
|
source: sensor.wan_in_derivative
|
||||||
name: Daily internet traffic in
|
name: Daily internet traffic in
|
||||||
unique_id: daily_internet_traffic_in
|
unique_id: daily_internet_traffic_in
|
||||||
cycle: daily
|
cycle: daily
|
||||||
|
delta_values: True
|
||||||
internet_usage_out_daily:
|
internet_usage_out_daily:
|
||||||
source: sensor.snmp_wan_out
|
source: sensor.wan_out_derivative
|
||||||
name: Daily internet traffic out
|
name: Daily internet traffic out
|
||||||
unique_id: daily_internet_traffic_out
|
unique_id: daily_internet_traffic_out
|
||||||
cycle: daily
|
cycle: daily
|
||||||
|
delta_values: True
|
||||||
internet_usage_in_hourly:
|
internet_usage_in_hourly:
|
||||||
source: sensor.snmp_wan_in
|
source: sensor.wan_in_derivative
|
||||||
name: Hourly internet traffic in
|
name: Hourly internet traffic in
|
||||||
unique_id: hourly_internet_traffic_in
|
unique_id: hourly_internet_traffic_in
|
||||||
cycle: hourly
|
cycle: hourly
|
||||||
|
delta_values: True
|
||||||
internet_usage_out_hourly:
|
internet_usage_out_hourly:
|
||||||
source: sensor.snmp_wan_out
|
source: sensor.wan_out_derivative
|
||||||
name: Hourly internet traffic out
|
name: Hourly internet traffic out
|
||||||
unique_id: hourly_internet_traffic_out
|
unique_id: hourly_internet_traffic_out
|
||||||
cycle: hourly
|
cycle: hourly
|
||||||
|
delta_values: True
|
||||||
|
|
||||||
# Energy
|
# Energy
|
||||||
energy_import_daily:
|
energy_import_daily:
|
||||||
|
|||||||
Reference in New Issue
Block a user