Skip to content

Commit

Permalink
Streamline configuration examples (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi authored Feb 28, 2023
1 parent 55a8017 commit fed0623
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 69 deletions.
4 changes: 2 additions & 2 deletions esp32-ble-example-faker.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<<: !include esp32-ble-example-debug.yaml

jbd_bms_ble:
- ble_client_id: client0
id: bms0
- id: bms0
ble_client_id: client0
update_interval: 1s
enable_fake_traffic: true
31 changes: 16 additions & 15 deletions esp32-ble-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ esphome:
comment: ${device_description}
project:
name: "syssi.esphome-jbd-bms"
version: 1.3.0
version: 1.4.0

esp32:
board: wemos_d1_mini32
Expand All @@ -28,31 +28,29 @@ wifi:
ota:
logger:

# If you don't use Home Assistant please remove this `api` section and uncomment the `mqtt` component!
api:
# If you use Home Assistant please remove this `mqtt` section and uncomment the native `api` component!
# api:

# The MQTT component is ESP-IDF compatible since ESPHome version 2022.4.0. If
# ESPHome suggests to use the arduino framework instead because of missing ESP-IDF
# framework support you should update your setup.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
mqtt:
broker: !secret mqtt_host
username: !secret mqtt_username
password: !secret mqtt_password
id: mqtt_client

esp32_ble_tracker:

ble_client:
- mac_address: ${mac_address}
id: client0
- id: client0
mac_address: ${mac_address}

jbd_bms_ble:
- ble_client_id: client0
id: bms0
- id: bms0
ble_client_id: client0
update_interval: 2s

binary_sensor:
- platform: jbd_bms_ble
jbd_bms_ble_id: bms0
balancing:
name: "${name} balancing"
charging:
Expand All @@ -62,6 +60,7 @@ binary_sensor:

sensor:
- platform: jbd_bms_ble
jbd_bms_ble_id: bms0
battery_strings:
name: "${name} battery strings"
current:
Expand Down Expand Up @@ -183,6 +182,7 @@ sensor:

text_sensor:
- platform: jbd_bms_ble
jbd_bms_ble_id: bms0
errors:
name: "${name} errors"
operation_status:
Expand All @@ -196,6 +196,7 @@ switch:
name: "${name} enable bluetooth connection"

- platform: jbd_bms_ble
jbd_bms_ble_id: bms0
charging:
name: "${name} charging"
discharging:
Expand Down
4 changes: 2 additions & 2 deletions esp32-ble-scanner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ esphome:
name: ${name}
comment: ${device_description}
project:
name: "syssi.esphome-jk-bms"
version: 1.3.0
name: "syssi.esphome-jbd-bms"
version: 1.4.0

esp32:
board: wemos_d1_mini32
Expand Down
12 changes: 6 additions & 6 deletions esp32-example-debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ logger:
level: DEBUG

uart:
id: uart0
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
debug:
direction: BOTH
- id: uart0
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
debug:
direction: BOTH
8 changes: 5 additions & 3 deletions esp32-example-faker.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<<: !include esp32-example-debug.yaml

jbd_bms:
update_interval: 2s
rx_timeout: ${rx_timeout}
enable_fake_traffic: true
- id: bms0
uart_id: uart0
update_interval: 2s
rx_timeout: ${rx_timeout}
enable_fake_traffic: true
35 changes: 19 additions & 16 deletions esp32-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ esphome:
comment: ${device_description}
project:
name: "syssi.esphome-jbd-bms"
version: 1.3.0
version: 1.4.0

esp32:
board: wemos_d1_mini32
Expand All @@ -30,29 +30,29 @@ wifi:
ota:
logger:

# If you don't use Home Assistant please remove this `api` section and uncomment the `mqtt` component!
api:
# If you use Home Assistant please remove this `mqtt` section and uncomment the native `api` component!
# api:

# The MQTT component is ESP-IDF compatible since ESPHome version 2022.4.0. If
# ESPHome suggests to use the arduino framework instead because of missing ESP-IDF
# framework support you should update your setup.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
mqtt:
broker: !secret mqtt_host
username: !secret mqtt_username
password: !secret mqtt_password
id: mqtt_client

uart:
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
- id: uart0
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}

jbd_bms:
update_interval: 2s
rx_timeout: ${rx_timeout}
- id: bms0
update_interval: 2s
rx_timeout: ${rx_timeout}

binary_sensor:
- platform: jbd_bms
jbd_bms_id: bms0
balancing:
name: "${name} balancing"
charging:
Expand All @@ -62,6 +62,7 @@ binary_sensor:

sensor:
- platform: jbd_bms
jbd_bms_id: bms0
battery_strings:
name: "${name} battery strings"
current:
Expand Down Expand Up @@ -183,6 +184,7 @@ sensor:

text_sensor:
- platform: jbd_bms
jbd_bms_id: bms0
errors:
name: "${name} errors"
operation_status:
Expand All @@ -192,6 +194,7 @@ text_sensor:

switch:
- platform: jbd_bms
jbd_bms_id: bms0
charging:
name: "${name} charging"
discharging:
Expand Down
12 changes: 6 additions & 6 deletions esp8266-example-debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ logger:
level: DEBUG

uart:
id: uart0
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
debug:
direction: BOTH
- id: uart0
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
debug:
direction: BOTH
8 changes: 5 additions & 3 deletions esp8266-example-faker.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<<: !include esp8266-example-debug.yaml

jbd_bms:
update_interval: 2s
rx_timeout: ${rx_timeout}
enable_fake_traffic: true
- id: bms0
uart_id: uart0
update_interval: 2s
rx_timeout: ${rx_timeout}
enable_fake_traffic: true
35 changes: 19 additions & 16 deletions esp8266-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ esphome:
comment: ${device_description}
project:
name: "syssi.esphome-jbd-bms"
version: 1.3.0
version: 1.4.0

esp8266:
board: d1_mini
Expand All @@ -27,29 +27,29 @@ wifi:
ota:
logger:

# If you don't use Home Assistant please remove this `api` section and uncomment the `mqtt` component!
api:
# If you use Home Assistant please remove this `mqtt` section and uncomment the native `api` component!
# api:

# The MQTT component is ESP-IDF compatible since ESPHome version 2022.4.0. If
# ESPHome suggests to use the arduino framework instead because of missing ESP-IDF
# framework support you should update your setup.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
mqtt:
broker: !secret mqtt_host
username: !secret mqtt_username
password: !secret mqtt_password
id: mqtt_client

uart:
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
- id: uart0
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}

jbd_bms:
update_interval: 2s
rx_timeout: ${rx_timeout}
- id: bms0
update_interval: 2s
rx_timeout: ${rx_timeout}

binary_sensor:
- platform: jbd_bms
jbd_bms_id: bms0
balancing:
name: "${name} balancing"
charging:
Expand All @@ -59,6 +59,7 @@ binary_sensor:

sensor:
- platform: jbd_bms
jbd_bms_id: bms0
battery_strings:
name: "${name} battery strings"
current:
Expand Down Expand Up @@ -180,6 +181,7 @@ sensor:

text_sensor:
- platform: jbd_bms
jbd_bms_id: bms0
errors:
name: "${name} errors"
operation_status:
Expand All @@ -189,6 +191,7 @@ text_sensor:

switch:
- platform: jbd_bms
jbd_bms_id: bms0
charging:
name: "${name} charging"
discharging:
Expand Down

0 comments on commit fed0623

Please sign in to comment.