|
@@ -3,25 +3,25 @@ substitutions:
|
|
|
low_devicename: ff_bath_bt_proxy_02
|
|
low_devicename: ff_bath_bt_proxy_02
|
|
|
friendly_devicename: FF Bath Bluetooth Proxy
|
|
friendly_devicename: FF Bath Bluetooth Proxy
|
|
|
|
|
|
|
|
-globals:
|
|
|
|
|
- - id: asia_low
|
|
|
|
|
- type: float
|
|
|
|
|
- initial_value: '60.0'
|
|
|
|
|
- - id: asia_high
|
|
|
|
|
- type: float
|
|
|
|
|
- initial_value: '94.95'
|
|
|
|
|
- - id: patryk_low
|
|
|
|
|
- type: float
|
|
|
|
|
- initial_value: '95.0'
|
|
|
|
|
- - id: patryk_high
|
|
|
|
|
- type: float
|
|
|
|
|
- initial_value: '120.0'
|
|
|
|
|
- - id: ala_low
|
|
|
|
|
- type: float
|
|
|
|
|
- initial_value: '10.0'
|
|
|
|
|
- - id: ala_high
|
|
|
|
|
- type: float
|
|
|
|
|
- initial_value: '20.0'
|
|
|
|
|
|
|
+# globals:
|
|
|
|
|
+# - id: asia_low
|
|
|
|
|
+# type: float
|
|
|
|
|
+# initial_value: '60.0'
|
|
|
|
|
+# - id: asia_high
|
|
|
|
|
+# type: float
|
|
|
|
|
+# initial_value: '94.95'
|
|
|
|
|
+# - id: patryk_low
|
|
|
|
|
+# type: float
|
|
|
|
|
+# initial_value: '95.0'
|
|
|
|
|
+# - id: patryk_high
|
|
|
|
|
+# type: float
|
|
|
|
|
+# initial_value: '120.0'
|
|
|
|
|
+# - id: ala_low
|
|
|
|
|
+# type: float
|
|
|
|
|
+# initial_value: '10.0'
|
|
|
|
|
+# - id: ala_high
|
|
|
|
|
+# type: float
|
|
|
|
|
+# initial_value: '20.0'
|
|
|
|
|
|
|
|
esphome:
|
|
esphome:
|
|
|
name: $devicename
|
|
name: $devicename
|
|
@@ -30,8 +30,8 @@ esphome:
|
|
|
esp32:
|
|
esp32:
|
|
|
board: esp32dev
|
|
board: esp32dev
|
|
|
framework:
|
|
framework:
|
|
|
- type: arduino
|
|
|
|
|
-# type: esp-idf
|
|
|
|
|
|
|
+# type: arduino
|
|
|
|
|
+ type: esp-idf
|
|
|
# sdkconfig_options:
|
|
# sdkconfig_options:
|
|
|
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED: y
|
|
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED: y
|
|
|
# CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
|
|
# CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
|
|
@@ -69,14 +69,34 @@ esp32_ble_tracker:
|
|
|
# bluetooth_proxy:
|
|
# bluetooth_proxy:
|
|
|
# active: true
|
|
# active: true
|
|
|
|
|
|
|
|
|
|
+time:
|
|
|
|
|
+ - platform: homeassistant
|
|
|
|
|
+ id: esptime
|
|
|
|
|
+
|
|
|
sensor:
|
|
sensor:
|
|
|
|
|
+ - platform: template
|
|
|
|
|
+ name: "Xiaomi Mi Scale Weight Time"
|
|
|
|
|
+ id: xiaomi_weight_time
|
|
|
|
|
+ lambda: "return id(xiaomi_weight_time).state;"
|
|
|
|
|
+ device_class: timestamp
|
|
|
|
|
+
|
|
|
- platform: xiaomi_miscale
|
|
- platform: xiaomi_miscale
|
|
|
mac_address: 'd0:3e:7d:3e:e3:5e'
|
|
mac_address: 'd0:3e:7d:3e:e3:5e'
|
|
|
clear_impedance: true
|
|
clear_impedance: true
|
|
|
weight:
|
|
weight:
|
|
|
name: "Xiaomi Mi Scale Weight"
|
|
name: "Xiaomi Mi Scale Weight"
|
|
|
id: weight_miscale
|
|
id: weight_miscale
|
|
|
- force_update: true
|
|
|
|
|
|
|
+ # force_update: true
|
|
|
|
|
+ filters:
|
|
|
|
|
+ - timeout:
|
|
|
|
|
+ timeout: 30s
|
|
|
|
|
+ value: !lambda return 0;
|
|
|
|
|
+ on_value:
|
|
|
|
|
+ then:
|
|
|
|
|
+ - sensor.template.publish:
|
|
|
|
|
+ id: xiaomi_weight_time
|
|
|
|
|
+ state: !lambda "return id(esptime).now().timestamp;"
|
|
|
|
|
+
|
|
|
# on_value:
|
|
# on_value:
|
|
|
# then:
|
|
# then:
|
|
|
# - lambda: |-
|
|
# - lambda: |-
|
|
@@ -90,7 +110,11 @@ sensor:
|
|
|
impedance:
|
|
impedance:
|
|
|
name: "Xiaomi Mi Scale Impedance"
|
|
name: "Xiaomi Mi Scale Impedance"
|
|
|
id: impedance_miscale
|
|
id: impedance_miscale
|
|
|
- force_update: true
|
|
|
|
|
|
|
+ # force_update: true
|
|
|
|
|
+ filters:
|
|
|
|
|
+ - timeout:
|
|
|
|
|
+ timeout: 30s
|
|
|
|
|
+ value: !lambda return 0;
|
|
|
# on_value:
|
|
# on_value:
|
|
|
# then:
|
|
# then:
|
|
|
# - lambda: |-
|
|
# - lambda: |-
|