From 781fe03b5d7f39cf2816fbae9d23f9490a41d61e Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Mon, 21 Nov 2022 18:08:16 +0100 Subject: [PATCH] Command `values` for analog/dallas sensors, writeable for analog-out, #758 --- CHANGELOG_LATEST.md | 3 ++ interface/src/project/DashboardData.tsx | 4 +- src/analogsensor.cpp | 61 ++++++++++++++++++++----- src/analogsensor.h | 5 +- src/command.cpp | 42 +++++++++++------ src/command.h | 13 +++--- src/dallassensor.cpp | 25 +++++++--- src/locale_common.h | 2 + 8 files changed, 112 insertions(+), 43 deletions(-) diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index 1734c9f32..d0b5685c1 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -18,6 +18,7 @@ - Add MD5 check [#637](https://github.com/emsesp/EMS-ESP32/issues/637) - Add more bus-ids [#673](https://github.com/emsesp/EMS-ESP32/issues/673) - Use HA connectivity device class for Status [#751](https://github.com/emsesp/EMS-ESP32/issues/751) +- Add commands for analog sensors outputs ## Fixed @@ -30,6 +31,8 @@ - render mqtt float json values with trailing zero - removed flash strings - reload page after restart button is pressed +- analog/dallas values command as list like ems-devices +- analog/dallas HA-entities based on id ## **BREAKING CHANGES:** diff --git a/interface/src/project/DashboardData.tsx b/interface/src/project/DashboardData.tsx index 7c502eb21..1ab2d86e7 100644 --- a/interface/src/project/DashboardData.tsx +++ b/interface/src/project/DashboardData.tsx @@ -1141,7 +1141,7 @@ const DashboardData: FC = () => { )} - {analog.t === AnalogType.DIGITAL_OUT && (analog.id === '25' || analog.id === '26') && ( + {analog.t === AnalogType.DIGITAL_OUT && (analog.g === 25 || analog.g === 26) && ( <> { )} - {analog.t === AnalogType.DIGITAL_OUT && analog.id !== '25' && analog.id !== '26' && ( + {analog.t === AnalogType.DIGITAL_OUT && analog.g !== 25 && analog.g !== 26 && ( <>