Fix typo and DEYE CAN module calculation

This commit is contained in:
k2dp2k committed 2025-06-08 21:52:02 +02:00
1 parent 358a87ca2f
commit a74a69a740
4 files changed
+24 -3

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
name: yamllint
on:
push:
paths:
- '**/*.yml'
- '**/*.yaml'
pull_request:
paths:
- '**/*.yml'
- '**/*.yaml'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install yamllint
run: sudo apt-get update && sudo apt-get install -y yamllint
- name: Run yamllint
run: yamllint .
+1 -1
View File
@@ -23,7 +23,7 @@ The `GPS` port sometimes called `RS485` is not an `RS485` port but `3V3 UART-TTL
│ O O O O │
│GND RX TX VBAT│
└────────────────┘
│ │ │ └ VBAT is full battery volatge eg. 56V (possible to use it via an isolated DC-DC converter)
│ │ │ └ VBAT is full battery voltage eg. 56V (possible to use it via an isolated DC-DC converter)
│ │ └──── TX to TTL-isolator AI (input)
│ └──────── RX to TTL-isolator AO (output)
└──────────── GND to TTL-isolator GND
@@ -120,7 +120,7 @@ canbus:
- lambda: |-
float charged = ((x[3] << 24) | (x[2] << 16) | (x[1] << 8) | x[0]) / 1000.0;
id(bms${bms_id}_charged).publish_state(charged);
float discharged = ((x[7] << 24) | (x[6] << 16) | (x[5] << 8) | x[5]) / 1000.0;
float discharged = ((x[7] << 24) | (x[6] << 16) | (x[5] << 8) | x[4]) / 1000.0;
id(bms${bms_id}_discharged).publish_state(discharged);
# ESP_LOGI("canid 0x550:", "%.3f kWh, %.3f kWh", charged, discharged );
# ESP_LOGI("canid 0x550:", "%02x %02x %02x %02x %02x %02x %02x %02x", x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]);
@@ -86,7 +86,7 @@ canbus:
- lambda: |-
float charged = ((x[3] << 24) | (x[2] << 16) | (x[1] << 8) | x[0]) / 1000.0;
id(bms${bms_id}_charged).publish_state(charged);
float discharged = ((x[7] << 24) | (x[6] << 16) | (x[5] << 8) | x[5]) / 1000.0;
float discharged = ((x[7] << 24) | (x[6] << 16) | (x[5] << 8) | x[4]) / 1000.0;
id(bms${bms_id}_discharged).publish_state(discharged);
binary_sensor: