|
@@ -15,7 +15,7 @@ globals:
|
|
|
initial_value: '95.0'
|
|
initial_value: '95.0'
|
|
|
- id: patryk_high
|
|
- id: patryk_high
|
|
|
type: float
|
|
type: float
|
|
|
- initial_value: '110.0'
|
|
|
|
|
|
|
+ initial_value: '120.0'
|
|
|
- id: ala_low
|
|
- id: ala_low
|
|
|
type: float
|
|
type: float
|
|
|
initial_value: '10.0'
|
|
initial_value: '10.0'
|
|
@@ -64,12 +64,12 @@ wifi:
|
|
|
password: !secret iot_password
|
|
password: !secret iot_password
|
|
|
domain: .int.mmax.cloud
|
|
domain: .int.mmax.cloud
|
|
|
|
|
|
|
|
-esp32_ble_tracker:
|
|
|
|
|
- scan_parameters:
|
|
|
|
|
|
|
+# esp32_ble_tracker:
|
|
|
|
|
+# scan_parameters:
|
|
|
# We currently use the defaults to ensure Bluetooth
|
|
# We currently use the defaults to ensure Bluetooth
|
|
|
# can co-exist with WiFi In the future we may be able to
|
|
# can co-exist with WiFi In the future we may be able to
|
|
|
# enable the built-in coexistence logic in ESP-IDF
|
|
# enable the built-in coexistence logic in ESP-IDF
|
|
|
- active: true
|
|
|
|
|
|
|
+# active: true
|
|
|
|
|
|
|
|
bluetooth_proxy:
|
|
bluetooth_proxy:
|
|
|
active: true
|
|
active: true
|
|
@@ -77,66 +77,68 @@ bluetooth_proxy:
|
|
|
sensor:
|
|
sensor:
|
|
|
- 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
|
|
|
weight:
|
|
weight:
|
|
|
name: "Xiaomi Mi Scale Weight"
|
|
name: "Xiaomi Mi Scale Weight"
|
|
|
id: weight_miscale
|
|
id: weight_miscale
|
|
|
- on_value:
|
|
|
|
|
- then:
|
|
|
|
|
- - lambda: |-
|
|
|
|
|
- if (id(weight_miscale).state >= id(asia_low) && id(weight_miscale).state <= id(asia_high)) {
|
|
|
|
|
- return id(weight_user_asia).publish_state(x);}
|
|
|
|
|
- else if (id(weight_miscale).state >= id(patryk_low) && id(weight_miscale).state <= id(patryk_high)) {
|
|
|
|
|
- return id(weight_user_patryk).publish_state(x);}
|
|
|
|
|
- else if (id(weight_miscale).state >= id(ala_low) && id(weight_miscale).state <= id(ala_high)) {
|
|
|
|
|
- return id(weight_user_ala).publish_state(x);}
|
|
|
|
|
|
|
+ force_update: true
|
|
|
|
|
+ # on_value:
|
|
|
|
|
+ # then:
|
|
|
|
|
+ # - lambda: |-
|
|
|
|
|
+ # if (id(weight_miscale).state >= id(asia_low) && id(weight_miscale).state <= id(asia_high)) {
|
|
|
|
|
+ # return id(weight_user_asia).publish_state(x);}
|
|
|
|
|
+ # else if (id(weight_miscale).state >= id(patryk_low) && id(weight_miscale).state <= id(patryk_high)) {
|
|
|
|
|
+ # return id(weight_user_patryk).publish_state(x);}
|
|
|
|
|
+ # else if (id(weight_miscale).state >= id(ala_low) && id(weight_miscale).state <= id(ala_high)) {
|
|
|
|
|
+ # return id(weight_user_ala).publish_state(x);}
|
|
|
|
|
|
|
|
impedance:
|
|
impedance:
|
|
|
name: "Xiaomi Mi Scale Impedance"
|
|
name: "Xiaomi Mi Scale Impedance"
|
|
|
id: impedance_miscale
|
|
id: impedance_miscale
|
|
|
- on_value:
|
|
|
|
|
- then:
|
|
|
|
|
- - lambda: |-
|
|
|
|
|
- if (id(weight_miscale).state >= id(asia_low) && id(weight_miscale).state <= id(asia_high)) {
|
|
|
|
|
- return id(impedance_user_asia).publish_state(x);}
|
|
|
|
|
- else if (id(weight_miscale).state >= id(patryk_low) && id(weight_miscale).state <= id(patryk_high)) {
|
|
|
|
|
- return id(impedance_user_patryk).publish_state(x);}
|
|
|
|
|
- else if (id(weight_miscale).state >= id(ala_low) && id(weight_miscale).state <= id(ala_high)) {
|
|
|
|
|
- return id(impedance_user_ala).publish_state(x);}
|
|
|
|
|
- # clear_impedance: True
|
|
|
|
|
|
|
+ force_update: true
|
|
|
|
|
+ # on_value:
|
|
|
|
|
+ # then:
|
|
|
|
|
+ # - lambda: |-
|
|
|
|
|
+ # if (id(weight_miscale).state >= id(asia_low) && id(weight_miscale).state <= id(asia_high)) {
|
|
|
|
|
+ # return id(impedance_user_asia).publish_state(x);}
|
|
|
|
|
+ # else if (id(weight_miscale).state >= id(patryk_low) && id(weight_miscale).state <= id(patryk_high)) {
|
|
|
|
|
+ # return id(impedance_user_patryk).publish_state(x);}
|
|
|
|
|
+ # else if (id(weight_miscale).state >= id(ala_low) && id(weight_miscale).state <= id(ala_high)) {
|
|
|
|
|
+ # return id(impedance_user_ala).publish_state(x);}
|
|
|
|
|
|
|
|
- - platform: template
|
|
|
|
|
- name: Weight Asia
|
|
|
|
|
- id: weight_user_asia
|
|
|
|
|
- unit_of_measurement: 'kg'
|
|
|
|
|
- icon: mdi:weight-kilogram
|
|
|
|
|
- accuracy_decimals: 2
|
|
|
|
|
- - platform: template
|
|
|
|
|
- name: Impedance Asia
|
|
|
|
|
- id: impedance_user_asia
|
|
|
|
|
- unit_of_measurement: 'Ω'
|
|
|
|
|
- icon: mdi:omega
|
|
|
|
|
- accuracy_decimals: 0
|
|
|
|
|
- - platform: template
|
|
|
|
|
- name: Weight Patryk
|
|
|
|
|
- id: weight_user_patryk
|
|
|
|
|
- unit_of_measurement: 'kg'
|
|
|
|
|
- icon: mdi:weight-kilogram
|
|
|
|
|
- accuracy_decimals: 2
|
|
|
|
|
- - platform: template
|
|
|
|
|
- name: Impedance Patryk
|
|
|
|
|
- id: impedance_user_patryk
|
|
|
|
|
- unit_of_measurement: 'Ω'
|
|
|
|
|
- icon: mdi:omega
|
|
|
|
|
- accuracy_decimals: 0
|
|
|
|
|
- - platform: template
|
|
|
|
|
- name: Weight Ala
|
|
|
|
|
- id: weight_user_ala
|
|
|
|
|
- unit_of_measurement: 'kg'
|
|
|
|
|
- icon: mdi:weight-kilogram
|
|
|
|
|
- accuracy_decimals: 2
|
|
|
|
|
- - platform: template
|
|
|
|
|
- name: Impedance Ala
|
|
|
|
|
- id: impedance_user_ala
|
|
|
|
|
- unit_of_measurement: 'Ω'
|
|
|
|
|
- icon: mdi:omega
|
|
|
|
|
- accuracy_decimals: 0
|
|
|
|
|
|
|
+ # - platform: template
|
|
|
|
|
+ # name: Weight Asia
|
|
|
|
|
+ # id: weight_user_asia
|
|
|
|
|
+ # unit_of_measurement: 'kg'
|
|
|
|
|
+ # icon: mdi:weight-kilogram
|
|
|
|
|
+ # accuracy_decimals: 2
|
|
|
|
|
+ # - platform: template
|
|
|
|
|
+ # name: Impedance Asia
|
|
|
|
|
+ # id: impedance_user_asia
|
|
|
|
|
+ # unit_of_measurement: 'Ω'
|
|
|
|
|
+ # icon: mdi:omega
|
|
|
|
|
+ # accuracy_decimals: 0
|
|
|
|
|
+ # - platform: template
|
|
|
|
|
+ # name: Weight Patryk
|
|
|
|
|
+ # id: weight_user_patryk
|
|
|
|
|
+ # unit_of_measurement: 'kg'
|
|
|
|
|
+ # icon: mdi:weight-kilogram
|
|
|
|
|
+ # accuracy_decimals: 2
|
|
|
|
|
+ # - platform: template
|
|
|
|
|
+ # name: Impedance Patryk
|
|
|
|
|
+ # id: impedance_user_patryk
|
|
|
|
|
+ # unit_of_measurement: 'Ω'
|
|
|
|
|
+ # icon: mdi:omega
|
|
|
|
|
+ # accuracy_decimals: 0
|
|
|
|
|
+ # - platform: template
|
|
|
|
|
+ # name: Weight Ala
|
|
|
|
|
+ # id: weight_user_ala
|
|
|
|
|
+ # unit_of_measurement: 'kg'
|
|
|
|
|
+ # icon: mdi:weight-kilogram
|
|
|
|
|
+ # accuracy_decimals: 2
|
|
|
|
|
+ # - platform: template
|
|
|
|
|
+ # name: Impedance Ala
|
|
|
|
|
+ # id: impedance_user_ala
|
|
|
|
|
+ # unit_of_measurement: 'Ω'
|
|
|
|
|
+ # icon: mdi:omega
|
|
|
|
|
+ # accuracy_decimals: 0
|