-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
39 lines (38 loc) · 1.23 KB
/
config.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
name: tf03k
manufacturer: Baiway
model: tf03k coulomb meter
mqtt_server: tcp://192.168.5.180:1883
ha_register: true
serial_port: /dev/ttyUSB0
topic: homeassistant/sensor/tf03k/state
sensors:
- name: Battery_soc
unit: "%"
icon: mdi:battery
state_topic: homeassistant/sensor/tf03k/state
value_template: "{{ value_json.soc }}"
- name: Battery_voltage
unit: "V"
icon: mdi:power-plug
state_topic: homeassistant/sensor/tf03k/state
value_template: "{{ (value_json.decivolt / 100.0) | round(1) }}"
- name: Battery_capacity
unit: "Ah"
icon: mdi:current-dc
state_topic: homeassistant/sensor/tf03k/state
value_template: "{{ (value_json.capamah / 1000.0) | round(1) }}"
- name: Battery_current
unit: "A"
icon: mdi:current-dc
state_topic: homeassistant/sensor/tf03k/state
value_template: "{{ (value_json.currentma / 1000.0) | round(1) }}"
- name: Battery_power
unit: "W"
icon: mdi:current-dc
state_topic: homeassistant/sensor/tf03k/state
value_template: "{{ (value_json.currentma * value_json.decivolt / 100000.0) | round(0) }}"
- name: Battery_sec
unit: "S"
icon: mdi:timer
state_topic: homeassistant/sensor/tf03k/state
value_template: "{{ value_json.remainsec }}"