diff --git a/interface/package.json b/interface/package.json index f1227b8b7..9849e10ab 100644 --- a/interface/package.json +++ b/interface/package.json @@ -26,8 +26,8 @@ "@alova/adapter-xhr": "2.3.1", "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", - "@mui/icons-material": "^7.3.6", - "@mui/material": "^7.3.6", + "@mui/icons-material": "^7.3.7", + "@mui/material": "^7.3.7", "@preact/compat": "^18.3.1", "@table-library/react-table-library": "4.1.15", "alova": "3.4.1", diff --git a/interface/pnpm-lock.yaml b/interface/pnpm-lock.yaml index aefe975b8..8cf9c497f 100644 --- a/interface/pnpm-lock.yaml +++ b/interface/pnpm-lock.yaml @@ -18,11 +18,11 @@ importers: specifier: ^11.14.1 version: 11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3) '@mui/icons-material': - specifier: ^7.3.6 - version: 7.3.6(@mui/material@7.3.6(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(@types/react@19.2.7)(react@19.2.3) + specifier: ^7.3.7 + version: 7.3.7(@mui/material@7.3.7(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(@types/react@19.2.7)(react@19.2.3) '@mui/material': - specifier: ^7.3.6 - version: 7.3.6(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + specifier: ^7.3.7 + version: 7.3.7(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@preact/compat': specifier: ^18.3.1 version: 18.3.1(preact@10.28.2) @@ -534,27 +534,27 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} - '@mui/core-downloads-tracker@7.3.6': - resolution: {integrity: sha512-QaYtTHlr8kDFN5mE1wbvVARRKH7Fdw1ZuOjBJcFdVpfNfRYKF3QLT4rt+WaB6CKJvpqxRsmEo0kpYinhH5GeHg==} + '@mui/core-downloads-tracker@7.3.7': + resolution: {integrity: sha512-8jWwS6FweMkpyRkrJooamUGe1CQfO1yJ+lM43IyUJbrhHW/ObES+6ry4vfGi8EKaldHL3t3BG1bcLcERuJPcjg==} - '@mui/icons-material@7.3.6': - resolution: {integrity: sha512-0FfkXEj22ysIq5pa41A2NbcAhJSvmcZQ/vcTIbjDsd6hlslG82k5BEBqqS0ZJprxwIL3B45qpJ+bPHwJPlF7uQ==} + '@mui/icons-material@7.3.7': + resolution: {integrity: sha512-3Q+ulAqG+A1+R4ebgoIs7AccaJhIGy+Xi/9OnvX376jQ6wcy+rz4geDGrxQxCGzdjOQr4Z3NgyFSZCz4T999lA==} engines: {node: '>=14.0.0'} peerDependencies: - '@mui/material': ^7.3.6 + '@mui/material': ^7.3.7 '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 react: ^17.0.0 || ^18.0.0 || ^19.0.0 peerDependenciesMeta: '@types/react': optional: true - '@mui/material@7.3.6': - resolution: {integrity: sha512-R4DaYF3dgCQCUAkr4wW1w26GHXcf5rCmBRHVBuuvJvaGLmZdD8EjatP80Nz5JCw0KxORAzwftnHzXVnjR8HnFw==} + '@mui/material@7.3.7': + resolution: {integrity: sha512-6bdIxqzeOtBAj2wAsfhWCYyMKPLkRO9u/2o5yexcL0C3APqyy91iGSWgT3H7hg+zR2XgE61+WAu12wXPON8b6A==} engines: {node: '>=14.0.0'} peerDependencies: '@emotion/react': ^11.5.0 '@emotion/styled': ^11.3.0 - '@mui/material-pigment-css': ^7.3.6 + '@mui/material-pigment-css': ^7.3.7 '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 react: ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -568,8 +568,8 @@ packages: '@types/react': optional: true - '@mui/private-theming@7.3.6': - resolution: {integrity: sha512-Ws9wZpqM+FlnbZXaY/7yvyvWQo1+02Tbx50mVdNmzWEi51C51y56KAbaDCYyulOOBL6BJxuaqG8rNNuj7ivVyw==} + '@mui/private-theming@7.3.7': + resolution: {integrity: sha512-w7r1+CYhG0syCAQUWAuV5zSaU2/67WA9JXUderdb7DzCIJdp/5RmJv6L85wRjgKCMsxFF0Kfn0kPgPbPgw/jdw==} engines: {node: '>=14.0.0'} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -578,8 +578,8 @@ packages: '@types/react': optional: true - '@mui/styled-engine@7.3.6': - resolution: {integrity: sha512-+wiYbtvj+zyUkmDB+ysH6zRjuQIJ+CM56w0fEXV+VDNdvOuSywG+/8kpjddvvlfMLsaWdQe5oTuYGBcodmqGzQ==} + '@mui/styled-engine@7.3.7': + resolution: {integrity: sha512-y/QkNXv6cF6dZ5APztd/dFWfQ6LHKPx3skyYO38YhQD4+Cxd6sFAL3Z38WMSSC8LQz145Mpp3CcLrSCLKPwYAg==} engines: {node: '>=14.0.0'} peerDependencies: '@emotion/react': ^11.4.1 @@ -591,8 +591,8 @@ packages: '@emotion/styled': optional: true - '@mui/system@7.3.6': - resolution: {integrity: sha512-8fehAazkHNP1imMrdD2m2hbA9sl7Ur6jfuNweh5o4l9YPty4iaZzRXqYvBCWQNwFaSHmMEj2KPbyXGp7Bt73Rg==} + '@mui/system@7.3.7': + resolution: {integrity: sha512-DovL3k+FBRKnhmatzUMyO5bKkhMLlQ9L7Qw5qHrre3m8zCZmE+31NDVBFfqrbrA7sq681qaEIHdkWD5nmiAjyQ==} engines: {node: '>=14.0.0'} peerDependencies: '@emotion/react': ^11.5.0 @@ -607,16 +607,16 @@ packages: '@types/react': optional: true - '@mui/types@7.4.9': - resolution: {integrity: sha512-dNO8Z9T2cujkSIaCnWwprfeKmTWh97cnjkgmpFJ2sbfXLx8SMZijCYHOtP/y5nnUb/Rm2omxbDMmtUoSaUtKaw==} + '@mui/types@7.4.10': + resolution: {integrity: sha512-0+4mSjknSu218GW3isRqoxKRTOrTLd/vHi/7UC4+wZcUrOAqD9kRk7UQRL1mcrzqRoe7s3UT6rsRpbLkW5mHpQ==} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 peerDependenciesMeta: '@types/react': optional: true - '@mui/utils@7.3.6': - resolution: {integrity: sha512-jn+Ba02O6PiFs7nKva8R2aJJ9kJC+3kQ2R0BbKNY3KQQ36Qng98GnPRFTlbwYTdMD6hLEBKaMLUktyg/rTfd2w==} + '@mui/utils@7.3.7': + resolution: {integrity: sha512-+YjnjMRnyeTkWnspzoxRdiSOgkrcpTikhNPoxOZW0APXx+urHtUoXJ9lbtCZRCA5a4dg5gSbd19alL1DvRs5fg==} engines: {node: '>=14.0.0'} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -1132,8 +1132,8 @@ packages: resolution: {integrity: sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==} engines: {node: '>=0.10.0'} - caniuse-lite@1.0.30001762: - resolution: {integrity: sha512-PxZwGNvH7Ak8WX5iXzoK1KPZttBXNPuaOvI2ZYU7NrlM+d9Ov+TUvlLOBNGzVXAntMSMMlJPd+jY6ovrVjSmUw==} + caniuse-lite@1.0.30001763: + resolution: {integrity: sha512-mh/dGtq56uN98LlNX9qdbKnzINhX0QzhiWBFEkFfsFO4QyCvL8YegrJAazCwXIeqkIob8BlZPGM3xdnY+sgmvQ==} caw@2.0.1: resolution: {integrity: sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==} @@ -3499,23 +3499,23 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 - '@mui/core-downloads-tracker@7.3.6': {} + '@mui/core-downloads-tracker@7.3.7': {} - '@mui/icons-material@7.3.6(@mui/material@7.3.6(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(@types/react@19.2.7)(react@19.2.3)': + '@mui/icons-material@7.3.7(@mui/material@7.3.7(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(@types/react@19.2.7)(react@19.2.3)': dependencies: '@babel/runtime': 7.28.4 - '@mui/material': 7.3.6(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@mui/material': 7.3.7(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 - '@mui/material@7.3.6(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + '@mui/material@7.3.7(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@babel/runtime': 7.28.4 - '@mui/core-downloads-tracker': 7.3.6 - '@mui/system': 7.3.6(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3) - '@mui/types': 7.4.9(@types/react@19.2.7) - '@mui/utils': 7.3.6(@types/react@19.2.7)(react@19.2.3) + '@mui/core-downloads-tracker': 7.3.7 + '@mui/system': 7.3.7(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3) + '@mui/types': 7.4.10(@types/react@19.2.7) + '@mui/utils': 7.3.7(@types/react@19.2.7)(react@19.2.3) '@popperjs/core': 2.11.8 '@types/react-transition-group': 4.4.12(@types/react@19.2.7) clsx: 2.1.1 @@ -3530,16 +3530,16 @@ snapshots: '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3) '@types/react': 19.2.7 - '@mui/private-theming@7.3.6(@types/react@19.2.7)(react@19.2.3)': + '@mui/private-theming@7.3.7(@types/react@19.2.7)(react@19.2.3)': dependencies: '@babel/runtime': 7.28.4 - '@mui/utils': 7.3.6(@types/react@19.2.7)(react@19.2.3) + '@mui/utils': 7.3.7(@types/react@19.2.7)(react@19.2.3) prop-types: 15.8.1 react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 - '@mui/styled-engine@7.3.6(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(react@19.2.3)': + '@mui/styled-engine@7.3.7(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(react@19.2.3)': dependencies: '@babel/runtime': 7.28.4 '@emotion/cache': 11.14.0 @@ -3552,13 +3552,13 @@ snapshots: '@emotion/react': 11.14.0(@types/react@19.2.7)(react@19.2.3) '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3) - '@mui/system@7.3.6(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3)': + '@mui/system@7.3.7(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3)': dependencies: '@babel/runtime': 7.28.4 - '@mui/private-theming': 7.3.6(@types/react@19.2.7)(react@19.2.3) - '@mui/styled-engine': 7.3.6(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(react@19.2.3) - '@mui/types': 7.4.9(@types/react@19.2.7) - '@mui/utils': 7.3.6(@types/react@19.2.7)(react@19.2.3) + '@mui/private-theming': 7.3.7(@types/react@19.2.7)(react@19.2.3) + '@mui/styled-engine': 7.3.7(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3))(react@19.2.3) + '@mui/types': 7.4.10(@types/react@19.2.7) + '@mui/utils': 7.3.7(@types/react@19.2.7)(react@19.2.3) clsx: 2.1.1 csstype: 3.2.3 prop-types: 15.8.1 @@ -3568,16 +3568,16 @@ snapshots: '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.2.7)(react@19.2.3))(@types/react@19.2.7)(react@19.2.3) '@types/react': 19.2.7 - '@mui/types@7.4.9(@types/react@19.2.7)': + '@mui/types@7.4.10(@types/react@19.2.7)': dependencies: '@babel/runtime': 7.28.4 optionalDependencies: '@types/react': 19.2.7 - '@mui/utils@7.3.6(@types/react@19.2.7)(react@19.2.3)': + '@mui/utils@7.3.7(@types/react@19.2.7)(react@19.2.3)': dependencies: '@babel/runtime': 7.28.4 - '@mui/types': 7.4.9(@types/react@19.2.7) + '@mui/types': 7.4.10(@types/react@19.2.7) '@types/prop-types': 15.7.15 clsx: 2.1.1 prop-types: 15.8.1 @@ -4040,7 +4040,7 @@ snapshots: browserslist@4.28.1: dependencies: baseline-browser-mapping: 2.9.12 - caniuse-lite: 1.0.30001762 + caniuse-lite: 1.0.30001763 electron-to-chromium: 1.5.267 node-releases: 2.0.27 update-browserslist-db: 1.2.3(browserslist@4.28.1) @@ -4099,7 +4099,7 @@ snapshots: camelcase@2.1.1: {} - caniuse-lite@1.0.30001762: {} + caniuse-lite@1.0.30001763: {} caw@2.0.1: dependencies: diff --git a/interface/src/app/settings/MqttSettings.tsx b/interface/src/app/settings/MqttSettings.tsx index 2d02f94b3..662f9a620 100644 --- a/interface/src/app/settings/MqttSettings.tsx +++ b/interface/src/app/settings/MqttSettings.tsx @@ -411,6 +411,20 @@ const MqttSettings = () => { + + + Box + Slider + + )} diff --git a/interface/src/i18n/cz/index.ts b/interface/src/i18n/cz/index.ts index efc1c6887..cc8173df0 100644 --- a/interface/src/i18n/cz/index.ts +++ b/interface/src/i18n/cz/index.ts @@ -219,6 +219,7 @@ const cz: Translation = { MQTT_PUBLISH_TEXT_3: 'Povolit MQTT Discovery', MQTT_PUBLISH_TEXT_4: 'Prefix pro Discovery témata', MQTT_PUBLISH_TEXT_5: 'Typ Discovery', + MQTT_PUBLISH_TEXT_6: 'Number mode', MQTT_PUBLISH_INTERVALS: 'Intervaly publikování', MQTT_INT_BOILER: 'Kotle a tepelná čerpadla', MQTT_INT_THERMOSTATS: 'Termostaty', diff --git a/interface/src/i18n/de/index.ts b/interface/src/i18n/de/index.ts index 8aa4e1dc8..969708d2d 100644 --- a/interface/src/i18n/de/index.ts +++ b/interface/src/i18n/de/index.ts @@ -219,6 +219,7 @@ const de: Translation = { MQTT_PUBLISH_TEXT_3: 'Aktiviere `MQTT Discovery`', MQTT_PUBLISH_TEXT_4: 'Prefix für die `Discovery`-Topics', MQTT_PUBLISH_TEXT_5: 'Discovery Typ', + MQTT_PUBLISH_TEXT_6: 'Number mode', MQTT_PUBLISH_INTERVALS: 'Veröffentlichungs-Intervalle', MQTT_INT_BOILER: 'Boiler und Wärmepumpen', MQTT_INT_THERMOSTATS: 'Thermostate', diff --git a/interface/src/i18n/en/index.ts b/interface/src/i18n/en/index.ts index bdb05a480..c561cd0ba 100644 --- a/interface/src/i18n/en/index.ts +++ b/interface/src/i18n/en/index.ts @@ -219,6 +219,7 @@ const en: Translation = { MQTT_PUBLISH_TEXT_3: 'Enable MQTT Discovery', MQTT_PUBLISH_TEXT_4: 'Prefix for the Discovery topics', MQTT_PUBLISH_TEXT_5: 'Discovery type', + MQTT_PUBLISH_TEXT_6: 'Number mode', MQTT_PUBLISH_INTERVALS: 'Publish Intervals', MQTT_INT_BOILER: 'Boilers and Heat Pumps', MQTT_INT_THERMOSTATS: 'Thermostats', diff --git a/interface/src/i18n/fr/index.ts b/interface/src/i18n/fr/index.ts index 008df1fcd..80499a5df 100644 --- a/interface/src/i18n/fr/index.ts +++ b/interface/src/i18n/fr/index.ts @@ -219,6 +219,7 @@ const fr: Translation = { MQTT_PUBLISH_TEXT_3: 'Activer la découverte MQTT', MQTT_PUBLISH_TEXT_4: 'Préfixe pour les topics découverte', MQTT_PUBLISH_TEXT_5: 'Type de découverte', + MQTT_PUBLISH_TEXT_6: 'Number mode', MQTT_PUBLISH_INTERVALS: 'Intervalles de publication', MQTT_INT_BOILER: 'Chaudières et pompes à chaleur', MQTT_INT_THERMOSTATS: 'Thermostats', diff --git a/interface/src/i18n/it/index.ts b/interface/src/i18n/it/index.ts index cd38ed18a..f8d557d94 100644 --- a/interface/src/i18n/it/index.ts +++ b/interface/src/i18n/it/index.ts @@ -219,6 +219,7 @@ const it: Translation = { MQTT_PUBLISH_TEXT_3: 'Abilita rilevamento MQTT (Home Assistant, Domoticz)', MQTT_PUBLISH_TEXT_4: 'Prefisso per gli argomenti di scoperta', MQTT_PUBLISH_TEXT_5: 'Discovery type', + MQTT_PUBLISH_TEXT_6: 'Number mode', MQTT_PUBLISH_INTERVALS: 'Pubblica intervalli', MQTT_INT_BOILER: 'Caldaie e Pompe di Calore', MQTT_INT_THERMOSTATS: 'Termostati', diff --git a/interface/src/i18n/nl/index.ts b/interface/src/i18n/nl/index.ts index 3f23c42db..57d026140 100644 --- a/interface/src/i18n/nl/index.ts +++ b/interface/src/i18n/nl/index.ts @@ -219,6 +219,7 @@ const nl: Translation = { MQTT_PUBLISH_TEXT_3: 'Activeer MQTT Discovery', MQTT_PUBLISH_TEXT_4: 'Prefix voor de Discovery topics', MQTT_PUBLISH_TEXT_5: 'Discovery type', + MQTT_PUBLISH_TEXT_6: 'Number mode', MQTT_PUBLISH_INTERVALS: 'Publicatie intervallen', MQTT_INT_BOILER: 'CV ketels en warmtepompen', MQTT_INT_THERMOSTATS: 'Thermostaten', diff --git a/interface/src/i18n/no/index.ts b/interface/src/i18n/no/index.ts index 88af2bc43..60d0a485d 100644 --- a/interface/src/i18n/no/index.ts +++ b/interface/src/i18n/no/index.ts @@ -219,6 +219,7 @@ const no: Translation = { MQTT_PUBLISH_TEXT_3: 'Aktiver MQTT Discovery', MQTT_PUBLISH_TEXT_4: 'Prefiks for Discovery topics', MQTT_PUBLISH_TEXT_5: 'Discovery type', + MQTT_PUBLISH_TEXT_6: 'Number mode', MQTT_PUBLISH_INTERVALS: 'Publiseringsintervall', MQTT_INT_BOILER: 'Fyr/Varmepumpe', MQTT_INT_THERMOSTATS: 'Termostat', diff --git a/interface/src/i18n/pl/index.ts b/interface/src/i18n/pl/index.ts index 07b003447..2135d8e97 100644 --- a/interface/src/i18n/pl/index.ts +++ b/interface/src/i18n/pl/index.ts @@ -219,6 +219,7 @@ const pl: BaseTranslation = { MQTT_PUBLISH_TEXT_3: 'Włącz opcję "MQTT discovery"', MQTT_PUBLISH_TEXT_4: 'Prefiks dla "MQTT discovery"', MQTT_PUBLISH_TEXT_5: 'Typ "MQTT discovery"', + MQTT_PUBLISH_TEXT_6: 'Number mode', MQTT_PUBLISH_INTERVALS: 'Interwały publikowania', MQTT_INT_BOILER: 'Kotły i pompy ciepła', MQTT_INT_THERMOSTATS: 'Termostaty', diff --git a/interface/src/i18n/sk/index.ts b/interface/src/i18n/sk/index.ts index 7950f2e05..635d1eb4c 100644 --- a/interface/src/i18n/sk/index.ts +++ b/interface/src/i18n/sk/index.ts @@ -219,6 +219,7 @@ const sk: Translation = { MQTT_PUBLISH_TEXT_3: 'Povolenie zisťovania MQTT', MQTT_PUBLISH_TEXT_4: 'Predpona tém Discovery', MQTT_PUBLISH_TEXT_5: 'Typ zistenia', + MQTT_PUBLISH_TEXT_6: 'Number mode', MQTT_PUBLISH_INTERVALS: 'Intervaly zverejňovania', MQTT_INT_BOILER: 'Kotly a tepelné čerpadlá', MQTT_INT_THERMOSTATS: 'Termostaty', diff --git a/interface/src/i18n/sv/index.ts b/interface/src/i18n/sv/index.ts index a8fd58d23..79bee288f 100644 --- a/interface/src/i18n/sv/index.ts +++ b/interface/src/i18n/sv/index.ts @@ -219,6 +219,7 @@ const sv: Translation = { MQTT_PUBLISH_TEXT_3: 'Aktivera MQTT Discovery', MQTT_PUBLISH_TEXT_4: 'Prefix för Discovery topics', MQTT_PUBLISH_TEXT_5: 'Discoverytyp', + MQTT_PUBLISH_TEXT_6: 'Number mode', MQTT_PUBLISH_INTERVALS: 'Publiceringsintervall', MQTT_INT_BOILER: 'Värmepump/panna', MQTT_INT_THERMOSTATS: 'Termostater', diff --git a/interface/src/i18n/tr/index.ts b/interface/src/i18n/tr/index.ts index d931077f1..f27982ca8 100644 --- a/interface/src/i18n/tr/index.ts +++ b/interface/src/i18n/tr/index.ts @@ -219,6 +219,7 @@ const tr: Translation = { MQTT_PUBLISH_TEXT_3: 'MQTT keşfi etkinleştir (Home Assistant, Domoticz)', MQTT_PUBLISH_TEXT_4: 'Keşif konuları için ön ek', MQTT_PUBLISH_TEXT_5: 'Domoticz Format', + MQTT_PUBLISH_TEXT_6: 'Number mode', MQTT_PUBLISH_INTERVALS: 'Yayınlama aralıkları', MQTT_INT_BOILER: 'Kazanlar ve Isı Pompaları', MQTT_INT_THERMOSTATS: 'Termostatlar', diff --git a/interface/src/types/mqtt.ts b/interface/src/types/mqtt.ts index 738dafa75..346df7fe6 100644 --- a/interface/src/types/mqtt.ts +++ b/interface/src/types/mqtt.ts @@ -49,4 +49,5 @@ export interface MqttSettingsType { publish_single2cmd: boolean; discovery_prefix: string; discovery_type: number; + ha_number_mode: number; } diff --git a/lib_standalone/ESP32React.h b/lib_standalone/ESP32React.h index 23e3a5736..cb5644db6 100644 --- a/lib_standalone/ESP32React.h +++ b/lib_standalone/ESP32React.h @@ -36,6 +36,7 @@ class DummySettings { uint8_t nested_format = 1; // 1=nested 2=single String discovery_prefix = "homeassistant"; uint8_t discovery_type = 0; // HA + uint8_t ha_number_mode = 0; // box bool ha_enabled = true; String base = "ems-esp"; bool publish_single = false; diff --git a/src/ESP32React/MqttSettingsService.cpp b/src/ESP32React/MqttSettingsService.cpp index d616f3491..11c84462e 100644 --- a/src/ESP32React/MqttSettingsService.cpp +++ b/src/ESP32React/MqttSettingsService.cpp @@ -248,6 +248,7 @@ void MqttSettings::read(MqttSettings & settings, JsonObject root) { root["nested_format"] = settings.nested_format; root["discovery_prefix"] = settings.discovery_prefix; root["discovery_type"] = settings.discovery_type; + root["ha_number_mode"] = settings.ha_number_mode; root["publish_single"] = settings.publish_single; root["publish_single2cmd"] = settings.publish_single2cmd; root["send_response"] = settings.send_response; @@ -288,6 +289,7 @@ StateUpdateResult MqttSettings::update(JsonObject root, MqttSettings & settings) newSettings.nested_format = static_cast(root["nested_format"] | EMSESP_DEFAULT_NESTED_FORMAT); newSettings.discovery_prefix = root["discovery_prefix"] | EMSESP_DEFAULT_DISCOVERY_PREFIX; newSettings.discovery_type = static_cast(root["discovery_type"] | EMSESP_DEFAULT_DISCOVERY_TYPE); + newSettings.ha_number_mode = static_cast(root["ha_number_mode"] | EMSESP_DEFAULT_HA_NUMBER_MODE); newSettings.publish_single = root["publish_single"] | EMSESP_DEFAULT_PUBLISH_SINGLE; newSettings.publish_single2cmd = root["publish_single2cmd"] | EMSESP_DEFAULT_PUBLISH_SINGLE2CMD; newSettings.send_response = root["send_response"] | EMSESP_DEFAULT_SEND_RESPONSE; diff --git a/src/ESP32React/MqttSettingsService.h b/src/ESP32React/MqttSettingsService.h index b31859201..83cf751dd 100644 --- a/src/ESP32React/MqttSettingsService.h +++ b/src/ESP32React/MqttSettingsService.h @@ -93,6 +93,7 @@ class MqttSettings { uint8_t nested_format = EMSESP_DEFAULT_NESTED_FORMAT; String discovery_prefix = EMSESP_DEFAULT_DISCOVERY_PREFIX; uint8_t discovery_type = EMSESP_DEFAULT_DISCOVERY_TYPE; + uint8_t ha_number_mode = EMSESP_DEFAULT_HA_NUMBER_MODE; bool publish_single = EMSESP_DEFAULT_PUBLISH_SINGLE; bool publish_single2cmd = EMSESP_DEFAULT_PUBLISH_SINGLE2CMD; bool send_response = EMSESP_DEFAULT_SEND_RESPONSE; diff --git a/src/core/default_settings.h b/src/core/default_settings.h index 6ef742329..86a2683b1 100644 --- a/src/core/default_settings.h +++ b/src/core/default_settings.h @@ -210,6 +210,10 @@ #define EMSESP_DEFAULT_DISCOVERY_TYPE 0 // HA #endif +#ifndef EMSESP_DEFAULT_HA_NUMBER_MODE +#define EMSESP_DEFAULT_HA_NUMBER_MODE 0 // BOX +#endif + #ifndef EMSESP_DEFAULT_PUBLISH_SINGLE #define EMSESP_DEFAULT_PUBLISH_SINGLE false #endif diff --git a/src/core/mqtt.cpp b/src/core/mqtt.cpp index e1e664d71..03d9b2eb5 100644 --- a/src/core/mqtt.cpp +++ b/src/core/mqtt.cpp @@ -43,6 +43,7 @@ bool Mqtt::ha_enabled_; uint8_t Mqtt::nested_format_; std::string Mqtt::discovery_prefix_; uint8_t Mqtt::discovery_type_; +uint8_t Mqtt::ha_number_mode_; bool Mqtt::send_response_; bool Mqtt::publish_single_; bool Mqtt::publish_single2cmd_; @@ -343,6 +344,7 @@ void Mqtt::load_settings() { discovery_prefix_ = mqttSettings.discovery_prefix.c_str(); entity_format_ = mqttSettings.entity_format; discovery_type_ = mqttSettings.discovery_type; + ha_number_mode_ = mqttSettings.ha_number_mode; // convert to milliseconds publish_time_boiler_ = mqttSettings.publish_time_boiler * 1000; @@ -1024,8 +1026,12 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev snprintf(sample_val, sizeof(sample_val), "'%s'", Helpers::translated_word(options[0])); } } else if (type != DeviceValueType::STRING && type != DeviceValueType::BOOL) { - // For numeric's add the range - doc["mode"] = "box"; // auto, slider or box + // For numeric's add the range and mode + if (ha_number_mode_ == 1 && (dv_set_max - dv_set_min) <= 100) { + doc["mode"] = "slider"; + } else { + doc["mode"] = "box"; // auto, slider or box + } if (num_op > 0) { doc["step"] = 1.0 / num_op; } else if (num_op < 0) { diff --git a/src/core/mqtt.h b/src/core/mqtt.h index 8a2f82137..c6e754fb4 100644 --- a/src/core/mqtt.h +++ b/src/core/mqtt.h @@ -341,6 +341,7 @@ class Mqtt { static uint8_t entity_format_; static std::string discovery_prefix_; static uint8_t discovery_type_; + static uint8_t ha_number_mode_; static bool publish_single_; static bool publish_single2cmd_; static bool send_response_; diff --git a/src/emsesp_version.h b/src/emsesp_version.h index 31504019a..e742bfd83 100644 --- a/src/emsesp_version.h +++ b/src/emsesp_version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.8.1-dev.5" +#define EMSESP_APP_VERSION "3.8.1-dev.6"