-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbt-scale.yaml
46 lines (38 loc) · 920 Bytes
/
bt-scale.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# https://smarthomepursuits.com/how-to-add-smart-scale-home-assistant/
esphome:
name: bt-scale
comment: ESP32 Bluetooth Test Scale
platform: ESP32
board: esp32dev
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
wifi:
ssid: "Lovenet IOT"
password: "Portland"
domain: ".thesteamedcrab.com"
fast_connect: true
captive_portal:
esp32_ble_tracker:
sensor:
# XIAOMI MISCALE
- platform: xiaomi_miscale
mac_address: '88:22:B2:EC:C4:E4'
weight:
id: "miscale_weight"
name: "Rob Weight"
icon: mdi:scale-bathroom
accuracy_decimals: 2
on_value:
then:
- lambda: |-
const float bmi_factor = 0.29860551;
return id(miscale_bmi).publish_state(x * bmi_factor);
- platform: template
id: "miscale_bmi"
name: "Rob BMI"
icon: mdi:human-pregnant
unit_of_measurement: ""
accuracy_decimals: 1