substitutions:
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# bitte nur in diesen nächsten Zeilen Änderungen vornehmen #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Name des ESPHome Geräts (kann frei gewählt werden, keine Sonderzeichen)
name: g32-display
device_description: "Monitor an OW G32 grill"
# Bluetooth MAC des G32 (z.B. zu finden mit der App nrf_Connect)
# oder zum Auslesen unten den 'esp32_ble_tracker:' entkommentieren
g32_mac_address: 94:E6:86:0A:27:52
# Bluetooth MAC des Meater (z.B. zu finden mit der App nrf_Connect)
# oder zum Auslesen unten den 'esp32_ble_tracker:' entkommentieren
mt_mac_address: B8:1F:5E:BF:A6:9E
# Credentials des eigenen Wifi Netzwerks
wifi_ssid: Finkenbusch43
wifi_password: 123456
# hier die Daten aus dem neu erstellten ESPHome Gerät einfügen. Beispiel:
# Enable Home Assistant API
# api:
# encryption:
# key: "OZNMBo2xusQ+BIzO1pfIQepp72VCfBzCWO/pSttPCQg="
#
# ota:
# - platform: esphome
# password: "7fdf9f656d36180bfba92d596c9e7db3"
#
# wifi:
# ssid: !secret wifi_ssid
# password: !secret wifi_password
#
# # Enable fallback hotspot (captive portal) in case wifi connection fails
# ap:
# ssid: "Hztht Fallback Hotspot"
# password: "rXlU1NZRut9K"
api_encryption_key: E1fyywUUE1DWzu0OzhDkyc4yAnfGwyEfsVNvhytrU6k=
ota_password: 39825aefe87449c0928189f9fb2e701a
ap_ssid: G32 Display Fallback Hotspot
ap_password: 4Lytxfy25DNh
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# ab hier bitte nur Änderungen vornehmen, wenn man weiß, was man tut und will #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
esphome:
name: ${name}
platformio_options:
upload_speed: 921600
board_build.flash_mode: dio
board_build.f_flash: 80000000L
board_build.f_cpu: 240000000L
esp32:
board: esp32-s3-devkitc-1
flash_size: 16MB
framework:
type: esp-idf
sdkconfig_options:
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y"
CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"
CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y
CONFIG_SPIRAM_RODATA: y
psram:
mode: octal
speed: 80MHz # 120mhz is not supported and falls back to 40mhz
# Enable logging
logger:
baud_rate: 921600
# Enable Home Assistant API
api:
encryption:
key: ${api_encryption_key}
ota:
- platform: esphome
password: ${ota_password}
wifi:
ssid: ${wifi_ssid}
password: ${wifi_password}
fast_connect: True
on_connect:
then:
- lvgl.widget.show: wifi_connect_label
- rtttl.play: 'Pling1:d=16,o=6,b=140:d6,32p,e6'
- globals.set:
id: wifi_connected
value: 'true'
on_disconnect:
then:
- lvgl.widget.hide: wifi_connect_label
- rtttl.play: 'siren:d=8,o=5,b=100:d,e,d,e,d,e,d,e'
- globals.set:
id: wifi_connected
value: 'false'
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ${ap_ssid}
password: ${ap_password}
#esp32_ble_tracker:
# on_ble_advertise:
# then:
# - lambda: |-
# if (x.get_name().rfind("OWG-G32C", 0) == 0) {
# ESP_LOGI("ble_adv", "G32 gefunden");
# ESP_LOGI("ble_adv", " Name: %s", x.get_name().c_str());
# ESP_LOGI("ble_adv", " MAC address: %s", x.address_str().c_str());
# }
# if (x.get_name().rfind("MEATER+", 0) == 0) {
# ESP_LOGI("ble_adv", "Meater+ gefunden");
# ESP_LOGI("ble_adv", " Name: %s", x.get_name().c_str());
# ESP_LOGI("ble_adv", " MAC address: %s", x.address_str().c_str());
# }
ble_client:
- mac_address: ${g32_mac_address}
id: ow_g32
on_connect:
then:
- lvgl.widget.show: g32_connect_label
- rtttl.play: 'Pling2:d=16,o=6,b=140:e6,32p,d6'
- globals.set:
id: g32_connected
value: 'true'
on_disconnect:
then:
- lvgl.widget.hide: g32_connect_label
- lvgl.widget.hide: [zone1_label, zone2_label, zone3_label, zone4_label]
- lvgl.widget.hide: [sensor1_label, sensor2_label, sensor3_label, sensor4_label]
- lvgl.widget.hide: [gas_percent_label, gas_weight_label, gas_percent_bar]
- rtttl.play: 'siren:d=8,o=5,b=100:d,e,d,e,d,e,d,e'
- globals.set:
id: g32_connected
value: 'false'
- mac_address: ${mt_mac_address}
id: meater
on_connect:
then:
- lvgl.widget.show: meater_connect_label
- lvgl.widget.show: [meater1_arc, meater2_arc]
# - lvgl.widget.show: [meater1_arc, meater2_arc, meater1_label, meater2_label]
- lvgl.widget.hide: [sensor3_arc, sensor4_arc, sensor3_label, sensor4_label]
- lvgl.widget.hide: [sensor3_text, sensor4_text]
- lvgl.widget.show: meater_text
- output.turn_off: helper_low
- rtttl.play: 'Pling3:d=16,o=6,b=140:d6,32p,e6,32p,d6'
# - rtttl.play: 'star_wars:d=16,o=5,b=100:4e,4e,4e,8c,p,g,4e,8c,p,g,4e,4p,4b,4b,4b,8c6,p,g,4d#,8c,p,g,4e,8p'
- globals.set:
id: meater_connected
value: 'true'
on_disconnect:
then:
- lvgl.widget.hide: meater_connect_label
- lvgl.widget.hide: [meater1_arc, meater2_arc, meater1_label, meater2_label]
- lvgl.widget.show: [sensor3_arc, sensor4_arc]
- lvgl.widget.show: [sensor3_arc, sensor4_arc, sensor3_label, sensor4_label]
- lvgl.widget.show: [sensor3_text, sensor4_text]
- lvgl.widget.hide: meater_text
- rtttl.play: 'siren:d=8,o=5,b=100:d,e,d,e,d,e,d,e'
- globals.set:
id: meater_connected
value: 'false'
#-------------------------------------------
# Display qspi
#-------------------------------------------
spi:
id: display_qspi
type: quad
clk_pin: 47
data_pins: [21, 48, 40, 39]
display:
- platform: qspi_dbi
model: axs15231
data_rate: 40MHz
id: my_display
spi_id: display_qspi
dimensions:
height: 480
width: 320
cs_pin:
number: 45
ignore_strapping_warning: true
# rotation: 0 # 0 for portrait
rotation: 90 # 90 for landscape
auto_clear_enabled: false
#-------------------------------------------
# Touchscreen gt911 i2c
#-------------------------------------------
i2c:
sda: 4
scl: 8
id: touchscreen_bus
touchscreen:
- platform: axs15231
id: my_touch
display: my_display
i2c_id: touchscreen_bus
calibration:
x_min: 14
x_max: 461
y_min: 12
y_max: 310
transform:
swap_xy: true
mirror_x: false
mirror_y: true
on_touch:
- lambda: |-
ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%0d",
touch.x,
touch.y,
touch.x_raw,
touch.y_raw
);
on_release:
- if:
condition: lvgl.is_paused
then:
- logger.log: "Display is resuming"
- lvgl.resume:
- lvgl.widget.redraw:
- light.turn_on: backlight
#-------------------------------------------
# Internal outputs
#-------------------------------------------
output:
- id: gpio_backlight_pwm
platform: ledc
pin: 1
- id: helper_low
platform: ledc
pin: 14
- platform: ledc
pin: 9
id: rtttl_out
#-------------------------------------------
# Internal lights
#-------------------------------------------
light:
- id: backlight
name: Backlight
platform: monochromatic
output: gpio_backlight_pwm
restore_mode: ALWAYS_ON
#-------------------------------------------
# Internal RTTTL speaker
#-------------------------------------------
rtttl:
output: rtttl_out
gain: 0.8
globals:
- id: wifi_connected
type: bool
initial_value: 'false'
- id: g32_connected
type: bool
initial_value: 'false'
- id: meater_connected
type: bool
initial_value: 'false'
number:
- platform: template
name: Screen timeout
optimistic: true
id: display_timeout
unit_of_measurement: "s"
initial_value: 300
restore_value: true
min_value: 0 # 0 means 'no timeout'
max_value: 3600
step: 5
mode: box
lvgl:
#full_refresh: true # not needed any longer
draw_rounding: 8 # necessary for the axs15231 display controller
displays: my_display
touchscreens: my_touch
bg_color: 0
border_width: 0
outline_width: 0
theme:
label:
text_color: 0xFFFFFF
bg_color: 0
bg_opa: TRANSP
width: 120
text_align: center
bar:
radius: 5
indicator:
radius: 5
arc_color: red
arc:
radius: 5
arc_color: 0x333333
indicator:
radius: 5
style_definitions:
- id: main_font_style
text_font: MONTSERRAT_18
- id: big_font_style
text_font: MONTSERRAT_26
- id: zone_arc_style
width: 100
height: 120
- id: sensor_arc_style
width: 100
height: 120
on_idle:
timeout: !lambda "return(id(display_timeout).state * 1000);"
then:
- if:
condition:
- lambda: "return id(display_timeout).state > 0;"
then:
- logger.log: "Display is idle"
- light.turn_off: backlight
- lvgl.pause:
pages:
- id: main_page
widgets:
# fixed objects (will not change during runtime)
- label:
x: 0
y: 4 # distance down from top
styles: main_font_style
text: 'T 1'
- label:
x: 120
y: 4 # distance down from top
styles: main_font_style
text: 'T 2'
- label:
x: 240
y: 4 # distance down from top
styles: main_font_style
text: 'T 3'
- label:
x: 360
y: 4 # distance down from top
styles: main_font_style
text: 'T 4'
- label:
x: 0
y: 150 # distance down from top
styles: main_font_style
text: 'Sensor 1'
- label:
x: 120
y: 150 # distance down from top
styles: main_font_style
text: 'Sensor 2'
- label:
id: sensor3_text
x: 240
y: 150 # distance down from top
styles: main_font_style
text: 'Sensor 3'
- label:
id: sensor4_text
x: 360
y: 150 # distance down from top
styles: main_font_style
text: 'Sensor 4'
- label:
id: meater_text
x: 240
y: 150 # distance down from top
styles: main_font_style
width: 240
text: 'KT Meater GT'
hidden: true
- label:
x: 0
y: 104 # distance down from top
styles: main_font_style
text: '°C'
- label:
x: 120
y: 104 # distance down from top
styles: main_font_style
text: '°C'
- label:
x: 240
y: 104 # distance down from top
styles: main_font_style
text: '°C'
- label:
x: 360
y: 104 # distance down from top
styles: main_font_style
text: '°C'
- label:
x: 0
y: 250 # distance down from top
styles: main_font_style
text: '°C'
- label:
x: 120
y: 250 # distance down from top
styles: main_font_style
text: '°C'
- label:
x: 240
y: 250 # distance down from top
styles: main_font_style
text: '°C'
- label:
x: 360
y: 250 # distance down from top
styles: main_font_style
text: '°C'
- label:
x: 24
y: 294 # distance down from top
styles: main_font_style
text_align: LEFT
text: 'Gas:'
# variable objects (may change at runtime)
- label:
id: wifi_connect_label
x: 0
y: 4
styles: main_font_style
text_color: 0x00ff00
text_align: LEFT
width: 20
text: "\uF1EB"
hidden: true
- label:
id: battery_empty_label
x: 220
y: 4
styles: main_font_style
text_color: 0xff0000
text_align: CENTER
width: 40
text: "\uF243"
hidden: true
- label:
id: g32_connect_label
x: 459
y: 4
styles: main_font_style
text_color: 0x00ff00
text_align: LEFT
width: 20
text: "\uF293"
hidden: true
- label:
id: meater_connect_label
x: 350
y: 180
styles: main_font_style
text_color: 0x00ff00
text_align: CENTER
width: 20
text: "\uF293"
hidden: true
- label:
id: gas_percent_label
x: 260
y: 294 # distance down from top
styles: main_font_style
text: '-- %'
hidden: true
- label:
id: gas_weight_label
x: 360
y: 294 # distance down from top
styles: main_font_style
text: '--- g'
hidden: true
- label:
id: zone1_label
x: 0
y: 64 # distance down from top
styles: big_font_style
text: '---'
hidden: true
- label:
id: zone2_label
x: 120
y: 64 # distance down from top
styles: big_font_style
text: '---'
hidden: true
- label:
id: zone3_label
x: 240
y: 64 # distance down from top
styles: big_font_style
text: '---'
hidden: true
- label:
id: zone4_label
x: 360
y: 64 # distance down from top
styles: big_font_style
text: '---'
hidden: true
- label:
id: sensor1_label
x: 0
y: 210 # distance down from top
styles: big_font_style
text: '---'
hidden: true
- label:
id: sensor2_label
x: 120
y: 210 # distance down from top
styles: big_font_style
text: '---'
hidden: true
- label:
id: sensor3_label
x: 240
y: 210 # distance down from top
styles: big_font_style
text: '---'
hidden: true
- label:
id: sensor4_label
x: 360
y: 210 # distance down from top
styles: big_font_style
text: '---'
hidden: true
- label:
id: meater1_label
x: 240
y: 210 # distance down from top
styles: big_font_style
text: '---'
hidden: true
- label:
id: meater2_label
x: 360
y: 210 # distance down from top
styles: big_font_style
text: '---'
hidden: true
- bar:
id: gas_percent_bar
x: 80
y: 299
height: 12
width: 200
radius: 5
min_value: 1
max_value: 100
bg_color: 0xffffff
indicator:
bg_color: 0x00ff00
value: 0
hidden: true
- arc:
id: zone1_arc
x: 10
y: 30
min_value: 1
max_value: 500
indicator:
arc_color: 0xff0000
styles: zone_arc_style
value: 0
- arc:
id: zone2_arc
x: 130
y: 30
min_value: 1
max_value: 500
indicator:
arc_color: 0xff0000
styles: zone_arc_style
value: 0
- arc:
id: zone3_arc
x: 250
y: 30
min_value: 1
max_value: 500
indicator:
arc_color: 0xff0000
styles: zone_arc_style
value: 0
- arc:
id: zone4_arc
x: 370
y: 30
min_value: 1
max_value: 500
indicator:
arc_color: 0xff0000
styles: zone_arc_style
value: 0
- arc:
id: sensor1_arc
x: 10
y: 176
min_value: 1
max_value: 300
indicator:
arc_color: 0xffff00
styles: sensor_arc_style
value: 0
- arc:
id: sensor2_arc
x: 130
y: 176
min_value: 1
max_value: 300
indicator:
arc_color: 0xff0000
styles: sensor_arc_style
value: 0
- arc:
id: sensor3_arc
x: 250
y: 176
min_value: 1
max_value: 300
indicator:
arc_color: 0xffff00
styles: sensor_arc_style
value: 0
- arc:
id: sensor4_arc
x: 370
y: 176
min_value: 1
max_value: 300
indicator:
arc_color: 0xffff00
styles: sensor_arc_style
value: 0
- arc:
id: meater1_arc
x: 250
y: 176
min_value: 1
max_value: 100
indicator:
arc_color: 0xffff00
styles: sensor_arc_style
value: 0
hidden: true
- arc:
id: meater2_arc
x: 370
y: 176
min_value: 1
max_value: 275
indicator:
arc_color: 0xff0000
styles: sensor_arc_style
value: 0
hidden: true
sensor:
# - platform: adc
# pin: 5
# name: "Battery Voltage"
# unit_of_measurement: "V"
# state_class: measurement
# attenuation: 12db
# accuracy_decimals: 2
# samples: 16
# filters:
# - multiply: 1.72
# - sliding_window_moving_average:
# window_size: 15
- platform: adc
pin: 5
name: "Battery SOC"
unit_of_measurement: "%"
state_class: measurement
device_class: battery
attenuation: 12db
accuracy_decimals: 0
samples: 16
filters:
- multiply: 1.72
- sliding_window_moving_average:
window_size: 15
- calibrate_linear:
method: exact
datapoints:
- 3.00 -> 0.0
- 3.36 -> 5.0
- 3.41 -> 10.0
- 3.48 -> 20.0
- 3.52 -> 30.0
- 3.56 -> 40.0
- 3.61 -> 50.0
- 3.70 -> 60.0
- 3.79 -> 70.0
- 3.89 -> 80.0
- 4.00 -> 90.0
- 4.05 -> 100.0
- clamp:
min_value: 0.0
max_value: 100.0
update_interval: 4s
on_value_range:
- below: 20.0
then:
- lvgl.widget.show: battery_empty_label
- above: 20.0
then:
- lvgl.widget.hide: battery_empty_label
- platform: ble_client
ble_client_id: meater
type: characteristic
name: "Meater T1"
id: meater_t1
service_uuid: 'a75cc7fc-c956-488f-ac2a-2dbc08b63a04'
characteristic_uuid: '7edda774-045e-4bbf-909b-45d1991a2876'
device_class: "temperature"
unit_of_measurement: "°C"
accuracy_decimals: 1
update_interval: 10s
lambda: |-
return ((x[0]+x[1]*256.0)/16.0);
on_value:
- lvgl.label.update:
id: meater1_label
hidden: false
text: !lambda |-
if(x == 1500) {return ("---");
} else {
return (to_string(static_cast<int>(x))).c_str();
};
- lvgl.arc.update:
id: meater1_arc
value: !lambda |-
if(x == 1500) {return (0);
} else {
return (x);
};
- platform: ble_client
ble_client_id: meater
type: characteristic
name: "Meater T2"
id: meater_t2
service_uuid: 'a75cc7fc-c956-488f-ac2a-2dbc08b63a04'
characteristic_uuid: '7edda774-045e-4bbf-909b-45d1991a2876'
device_class: "temperature"
unit_of_measurement: "°C"
accuracy_decimals: 0
update_interval: 10s
lambda: |-
if ((x[2]+x[3]*256.0) >= 33) {
return (((x[0]+x[1]*256.0)/16.0)+(((x[2]+x[3]*256.0)-33.0)/2.5));
} else {
return (1500);
};
on_value:
- lvgl.label.update:
id: meater2_label
hidden: false
text: !lambda |-
if(x >= 1500) {return ("---");
} else {
return (to_string(static_cast<int>(x))).c_str();
};
- lvgl.arc.update:
id: meater2_arc
value: !lambda |-
if(x >= 1500) {return (0);
} else {
return (x);
};
- platform: ble_rssi
mac_address: ${g32_mac_address}
name: "BT Signalstärke"
- platform: wifi_signal
name: "WiFi Signal ESP G32"
update_interval: 10s
- platform: internal_temperature
name: "CPU Temperatur ESP G32"
update_interval: 10s
- platform: ble_client
ble_client_id: ow_g32
type: characteristic
name: "G32 Zone 1"
id: g32_T_1
service_uuid: 'dc0f41ea-b6ae-46a8-a19e-1a3bf4342bcb'
characteristic_uuid: 'dc0f41e2-b6ae-46a8-a19e-1a3bf4342bcb'
device_class: "temperature"
unit_of_measurement: "°C"
update_interval: 10s
lambda: |-
return (x[6]*10.0+x[7]/10.0);
on_value:
- lvgl.label.update:
id: zone1_label
hidden: false
text: !lambda |-
if(x >= 1500) {return ("---");
} else {
return (to_string(static_cast<int>(x))).c_str();
};
- lvgl.arc.update:
id: zone1_arc
value: !lambda |-
if(x >= 1500) {return (0);
} else {
return (x);
};
- platform: ble_client
ble_client_id: ow_g32
type: characteristic
name: "G32 Zone 2"
id: g32_T_2
service_uuid: 'dc0f41ea-b6ae-46a8-a19e-1a3bf4342bcb'
characteristic_uuid: 'dc0f41e2-b6ae-46a8-a19e-1a3bf4342bcb'
device_class: "temperature"
unit_of_measurement: "°C"
update_interval: 3000s
lambda: |-
return (x[8]*10.0+x[9]/10.0);
on_value:
- lvgl.label.update:
id: zone2_label
hidden: false
text: !lambda |-
if(x >= 1500) {return ("---");
} else {
return (to_string(static_cast<int>(x))).c_str();
};
- lvgl.arc.update:
id: zone2_arc
value: !lambda |-
if(x >= 1500) {return (0);
} else {
return (x);
};
- platform: ble_client
ble_client_id: ow_g32
type: characteristic
name: "G32 Zone 3"
id: g32_T_3
service_uuid: 'dc0f41ea-b6ae-46a8-a19e-1a3bf4342bcb'
characteristic_uuid: 'dc0f41e2-b6ae-46a8-a19e-1a3bf4342bcb'
device_class: "temperature"
unit_of_measurement: "°C"
update_interval: 3001s
lambda: |-
return (x[10]*10.0+x[11]/10.0);
on_value:
- lvgl.label.update:
id: zone3_label
hidden: false
text: !lambda |-
if(x >= 1500) {return ("---");
} else {
return (to_string(static_cast<int>(x))).c_str();
};
- lvgl.arc.update:
id: zone3_arc
value: !lambda |-
if(x >= 1500) {return (0);
} else {
return (x);
};
- platform: ble_client
ble_client_id: ow_g32
type: characteristic
name: "G32 Zone 4"
id: g32_T_4
service_uuid: 'dc0f41ea-b6ae-46a8-a19e-1a3bf4342bcb'
characteristic_uuid: 'dc0f41e2-b6ae-46a8-a19e-1a3bf4342bcb'
device_class: "temperature"
unit_of_measurement: "°C"
update_interval: 3002s
lambda: |-
return (x[12]*10.0+x[13]/10.0);
on_value:
- lvgl.label.update:
id: zone4_label
hidden: false
text: !lambda |-
if(x >= 1500) {return ("---");
} else {
return (to_string(static_cast<int>(x))).c_str();
};
- lvgl.arc.update:
id: zone4_arc
value: !lambda |-
if(x >= 1500) {return (0);
} else {
return (x);
};
- platform: ble_client
ble_client_id: ow_g32
type: characteristic
name: "G32 Sensor 1"
id: g32_Ext_1
service_uuid: 'dc0f41ea-b6ae-46a8-a19e-1a3bf4342bcb'
characteristic_uuid: 'dc0f41e2-b6ae-46a8-a19e-1a3bf4342bcb'
device_class: "temperature"
unit_of_measurement: "°C"
update_interval: 3003s
lambda: |-
return (x[14]*100.0+x[15])/10;
on_value:
- lvgl.label.update:
id: sensor1_label
hidden: false
text: !lambda |-
if(x >= 1500) {return ("---");
} else {
return (to_string(static_cast<int>(x))).c_str();
};
- lvgl.arc.update:
id: sensor1_arc
value: !lambda |-
if(x >= 1500) {return (0);
} else {
return (x);
};
- platform: ble_client
ble_client_id: ow_g32
type: characteristic
name: "G32 Sensor 2"
id: g32_Ext_2
service_uuid: 'dc0f41ea-b6ae-46a8-a19e-1a3bf4342bcb'
characteristic_uuid: 'dc0f41e2-b6ae-46a8-a19e-1a3bf4342bcb'
device_class: "temperature"
unit_of_measurement: "°C"
update_interval: 3003s
lambda: |-
return (x[16]*100.0+x[17])/10;
on_value:
- lvgl.label.update:
id: sensor2_label
hidden: false
text: !lambda |-
if(x >= 1500) {return ("---");
} else {
return (to_string(static_cast<int>(x))).c_str();
};
- lvgl.arc.update:
id: sensor2_arc
value: !lambda |-
if(x >= 1500) {return (0);
} else {
return (x);
};
- platform: ble_client
ble_client_id: ow_g32
type: characteristic
name: "G32 Sensor 3"
id: g32_Ext_3
service_uuid: 'dc0f41ea-b6ae-46a8-a19e-1a3bf4342bcb'
characteristic_uuid: 'dc0f41e2-b6ae-46a8-a19e-1a3bf4342bcb'
device_class: "temperature"
unit_of_measurement: "°C"
update_interval: 3004s
lambda: |-
return (x[18]*100.0+x[19])/10;
on_value:
- lvgl.label.update:
id: sensor3_label
hidden: !lambda return id(meater_connected) == true;
text: !lambda |-
if(x >= 1500) {
return ("---");
} else {
return (to_string(static_cast<int>(x))).c_str();
};
- lvgl.arc.update:
id: sensor3_arc
value: !lambda |-
if(x >= 1500) {return (0);
} else {
return (x);
};
- platform: ble_client
ble_client_id: ow_g32
type: characteristic
name: "G32 Sensor 4"
id: g32_Ext_4
service_uuid: 'dc0f41ea-b6ae-46a8-a19e-1a3bf4342bcb'
characteristic_uuid: 'dc0f41e2-b6ae-46a8-a19e-1a3bf4342bcb'
device_class: "temperature"
unit_of_measurement: "°C"
update_interval: 3005s
lambda: |-
return (x[20]*100.0+x[21])/10;
on_value:
- lvgl.label.update:
id: sensor4_label
hidden: !lambda return id(meater_connected) == true;
text: !lambda |-
if(x >= 1500) {return ("---");
} else {
return (to_string(static_cast<int>(x))).c_str();
};
- lvgl.arc.update:
id: sensor4_arc
value: !lambda |-
if(x >= 1500) {return (0);
} else {
return (x);
};
- platform: ble_client
ble_client_id: ow_g32
type: characteristic
name: "G32 Gasbuddy Füllstand in g"
id: g32_Gas_g
device_class: weight
state_class: measurement
unit_of_measurement: g
service_uuid: 'dc0f41ea-b6ae-46a8-a19e-1a3bf4342bcb'
characteristic_uuid: 'dc0f41e2-b6ae-46a8-a19e-1a3bf4342bcb'
update_interval: 3006s
lambda: |-
return (x[22]*256+x[23]);
on_value:
- lvgl.label.update:
id: gas_weight_label
hidden: false
text: !lambda |-
if(x >= 20000) {return ("---");
} else {
return (to_string(static_cast<int>(x)) + " g").c_str();
};
- platform: ble_client
ble_client_id: ow_g32
type: characteristic
name: "G32 Gasbuddy Füllstand in %"
state_class: measurement
unit_of_measurement: "%"
id: g32_Gas
service_uuid: 'dc0f41ea-b6ae-46a8-a19e-1a3bf4342bcb'
characteristic_uuid: 'dc0f41e2-b6ae-46a8-a19e-1a3bf4342bcb'
update_interval: 3007s
lambda: |-
return (x[31]);
on_value:
- lvgl.label.update:
id: gas_percent_label
hidden: false
text: !lambda |-
if(x > 100) {return ("---");
} else {
return (to_string(static_cast<int>(x)) + " %").c_str();
};
- lvgl.bar.update:
id: gas_percent_bar
hidden: false
value: !lambda |-
if(x > 100) {return (0);
} else {
return (x);
};
- platform: ble_client
ble_client_id: ow_g32
type: characteristic
name: "G32 Haube"
id: g32_Haube
service_uuid: 'dc0f41ea-b6ae-46a8-a19e-1a3bf4342bcb'
characteristic_uuid: 'dc0f41e2-b6ae-46a8-a19e-1a3bf4342bcb'
update_interval: 3008s
lambda: |-
return (x[24]);
- platform: ble_client
ble_client_id: ow_g32
type: characteristic
name: "G32 Licht"
id: g32_Licht
service_uuid: 'dc0f41ea-b6ae-46a8-a19e-1a3bf4342bcb'
characteristic_uuid: 'dc0f41e2-b6ae-46a8-a19e-1a3bf4342bcb'
update_interval: 3009s
lambda: |-
return (x[25]);
binary_sensor:
- platform: status
name: "Status ESP G32"
- platform: template
name: "G32 Licht"
icon: "mdi:light-flood-down"
lambda: |-
if (id(g32_Licht).state == 1) {
// G32 Haubenlicht ist AN.
return true;
} else {
// G32 Haubenlicht ist AUS.
return false;
}
- platform: template
name: "G32 Haube"
device_class: "door"
icon: "mdi:door"
lambda: |-
if (id(g32_Haube).state == 1) {
// G32 Haube ist offen.
return true;
} else {
// G32 Haube ist geschlossen.
return false;
}