From 9776838e0b60e88d7b4268bf9d1ba6bb09dbeea1 Mon Sep 17 00:00:00 2001 From: eigger Date: Wed, 29 Jul 2026 23:06:02 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=98=84=EB=8C=80/=EA=B8=B0=EC=95=84=20?= =?UTF-8?q?PID=20=ED=97=A4=EB=8D=94(ATSH743,=20ATSH7E0)=20pre=5Fcommands?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/templates.yaml b/templates.yaml index 58bc7de..f460e34 100644 --- a/templates.yaml +++ b/templates.yaml @@ -113,7 +113,7 @@ templates: - id: obd_hyundai_kia name: "OBD-II + 현대/기아 확장" - description: "RPM, 속도, 연료잔량%, 총 주행거리 (ATSP6 헤더 설정)" + description: "RPM, 속도, 연료잔량(계기판/743), 총 주행거리(ECU/7E0)" device: id: car_obd_hk name: "Hyundai/Kia OBD" @@ -123,17 +123,23 @@ templates: tx_char_uuid: "2AF1" rx_char_uuid: "2AF0" tx_delay: 50ms - init_commands: ["ATZ", "ATE0", "ATL0", "ATS0", "ATH0", "ATSP6"] + init_commands: ["ATSP6"] sensors: - { key: rpm, preset: rpm, update_interval: 1s } - { key: speed, preset: speed, update_interval: 1s } - - key: fuel_level - preset: fuel_level + - key: fuel_level_hk + mode: "22" + pid: "2203" + pre_commands: ["ATSH743"] + formula: "(a*256+b)*0.009994" + unit: "L" + state_class: measurement update_interval: 30s publish: { deadband: 0.5, min_interval: 60s } - key: odometer_hk mode: "22" pid: "F22E" + pre_commands: ["ATSH7E0"] formula: "(((a*256*256*256)+b*256*256)+c*256)+d" unit: "km" device_class: distance