move dhw entities from mixer/solar to new water device, add pool device

This commit is contained in:
MichaelDvP
2023-11-04 15:24:43 +01:00
parent 6c17d61baf
commit 3101f5e6ae
36 changed files with 842 additions and 715 deletions

View File

@@ -54,7 +54,7 @@
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"concurrently": "^8.2.2",
"eslint": "^8.52.0",
"eslint": "^8.53.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^9.0.0",
@@ -65,7 +65,7 @@
"eslint-plugin-prettier": "alpha",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"preact": "^10.18.1",
"preact": "^10.18.2",
"prettier": "^3.0.3",
"rollup-plugin-visualizer": "^5.9.2",
"terser": "^5.24.0",

View File

@@ -382,6 +382,21 @@ const MqttSettingsForm: FC = () => {
margin="normal"
/>
</Grid>
<Grid item xs={12} sm={6} md={4}>
<TextField
name="publish_time_water"
label={LL.MQTT_INT_WATER()}
InputProps={{
endAdornment: <InputAdornment position="end">{LL.SECONDS()}</InputAdornment>
}}
fullWidth
variant="outlined"
value={numberValue(data.publish_time_water)}
type="number"
onChange={updateFormValue}
margin="normal"
/>
</Grid>
<Grid item xs={12} sm={6} md={4}>
<TextField
name="publish_time_sensor"

View File

@@ -246,6 +246,7 @@ const de: Translation = {
MQTT_INT_THERMOSTATS: 'Thermostate',
MQTT_INT_SOLAR: 'Solarmodule',
MQTT_INT_MIXER: 'Mischermodule',
MQTT_INT_WATER: 'Warmwassermodule',
MQTT_QUEUE: 'MQTT Queue',
DEFAULT: 'Standard',
MQTT_ENTITY_FORMAT: 'Entitäts-ID Format',

View File

@@ -246,6 +246,7 @@ const en: Translation = {
MQTT_INT_THERMOSTATS: 'Thermostats',
MQTT_INT_SOLAR: 'Solar Modules',
MQTT_INT_MIXER: 'Mixer Modules',
MQTT_INT_WATER: 'Water Modules',
MQTT_QUEUE: 'MQTT Queue',
DEFAULT: 'Default',
MQTT_ENTITY_FORMAT: 'Entity ID format',

View File

@@ -246,6 +246,7 @@ const fr: Translation = {
MQTT_INT_THERMOSTATS: 'Thermostats',
MQTT_INT_SOLAR: 'Modules solaires',
MQTT_INT_MIXER: 'Modules mélangeurs',
MQTT_INT_WATER: 'Modules eau',
MQTT_QUEUE: 'Queue MQTT',
DEFAULT: 'Défaut',
MQTT_ENTITY_FORMAT: 'Entity ID format', // TODO translate

View File

@@ -248,6 +248,7 @@ const it: Translation = {
MQTT_INT_THERMOSTATS: 'Termostati',
MQTT_INT_SOLAR: 'Moduli solari',
MQTT_INT_MIXER: 'Moduli Mixer',
MQTT_INT_WATER: 'Moduli Acqua',
MQTT_QUEUE: 'Coda MQTT',
DEFAULT: 'Predefinito',
MQTT_ENTITY_FORMAT: 'Formato ID entità',

View File

@@ -246,6 +246,7 @@ const nl: Translation = {
MQTT_INT_THERMOSTATS: 'Thermostaten',
MQTT_INT_SOLAR: 'Solar Modules',
MQTT_INT_MIXER: 'Mixer Modules',
MQTT_INT_WATER: 'Water Modules',
MQTT_QUEUE: 'MQTT Queue',
DEFAULT: 'Default',
MQTT_ENTITY_FORMAT: 'Entity ID formaat',

View File

@@ -246,6 +246,7 @@ const no: Translation = {
MQTT_INT_THERMOSTATS: 'Termostat',
MQTT_INT_SOLAR: 'Solpaneler',
MQTT_INT_MIXER: 'Blandeventil',
MQTT_INT_WATER: 'Water Modules', // TODO translate
MQTT_QUEUE: 'MQTT Queue',
DEFAULT: 'Standard',
MQTT_ENTITY_FORMAT: 'Enhets ID format',

View File

@@ -246,6 +246,7 @@ const pl: BaseTranslation = {
MQTT_INT_THERMOSTATS: 'Termostaty',
MQTT_INT_SOLAR: 'Panele solarne',
MQTT_INT_MIXER: 'Mieszacze',
MQTT_INT_WATER: 'Water Modules', // TODO translate
MQTT_QUEUE: 'Kolejka MQTT',
DEFAULT: '{{Pozostałe|Domyślna|}}',
MQTT_ENTITY_FORMAT: 'Format "Entity ID"',

View File

@@ -246,6 +246,7 @@ const sv: Translation = {
MQTT_INT_THERMOSTATS: 'Termostater',
MQTT_INT_SOLAR: 'Solpaneler',
MQTT_INT_MIXER: 'Blandningsventiler',
MQTT_INT_WATER: 'Water Modules', // TODO translate
MQTT_QUEUE: 'MQTT-kö',
DEFAULT: 'Standard',
MQTT_ENTITY_FORMAT: 'Entitets-ID format',

View File

@@ -246,6 +246,7 @@ const tr: Translation = {
MQTT_INT_THERMOSTATS: 'Termostatlar',
MQTT_INT_SOLAR: 'Güneş Enerjisi Modülleri',
MQTT_INT_MIXER: 'Karışım Modülleri',
MQTT_INT_WATER: 'Water Modules', // TODO translate
MQTT_QUEUE: 'MQTT Sırası',
DEFAULT: 'Varsayılan',
MQTT_ENTITY_FORMAT: 'Varlık Kimlik biçimi',

View File

@@ -2,8 +2,8 @@ import { AiOutlineControl, AiOutlineGateway, AiOutlineAlert } from 'react-icons/
import { CgSmartHomeBoiler } from 'react-icons/cg';
import { FaSolarPanel } from 'react-icons/fa';
import { GiHeatHaze } from 'react-icons/gi';
import { MdThermostatAuto, MdOutlineSensors, MdOutlineExtension, MdOutlineDevices } from 'react-icons/md';
import { GiHeatHaze, GiTap } from 'react-icons/gi';
import { MdThermostatAuto, MdOutlineSensors, MdOutlineExtension, MdOutlineDevices, MdOutlinePool } from 'react-icons/md';
import { TiFlowSwitch } from 'react-icons/ti';
import { VscVmConnect } from 'react-icons/vsc';
import { DeviceType } from './types';
@@ -40,6 +40,10 @@ const DeviceIcon: FC<DeviceIconProps> = ({ type_id }) => {
return <AiOutlineAlert />;
case DeviceType.EXTENSION:
return <MdOutlineDevices />;
case DeviceType.WATER:
return <GiTap />;
case DeviceType.POOL:
return <MdOutlinePool />;
case DeviceType.CUSTOM:
return <MdOutlineExtension />;
default:

View File

@@ -355,6 +355,7 @@ export const enum DeviceType {
TEMPERATURESENSOR,
ANALOGSENSOR,
SCHEDULER,
CUSTOM,
BOILER,
THERMOSTAT,
MIXER,
@@ -368,7 +369,9 @@ export const enum DeviceType {
EXTENSION,
GENERIC,
HEATSOURCE,
CUSTOM,
VENTILATION,
WATER,
POOL,
UNKNOWN
}

View File

@@ -35,6 +35,7 @@ export interface MqttSettings {
publish_time_thermostat: number;
publish_time_solar: number;
publish_time_mixer: number;
publish_time_water: number;
publish_time_other: number;
publish_time_sensor: number;
publish_time_heartbeat: number;

View File

@@ -641,9 +641,9 @@ __metadata:
languageName: node
linkType: hard
"@eslint/eslintrc@npm:^2.1.2":
version: 2.1.2
resolution: "@eslint/eslintrc@npm:2.1.2"
"@eslint/eslintrc@npm:^2.1.3":
version: 2.1.3
resolution: "@eslint/eslintrc@npm:2.1.3"
dependencies:
ajv: "npm:^6.12.4"
debug: "npm:^4.3.2"
@@ -654,14 +654,14 @@ __metadata:
js-yaml: "npm:^4.1.0"
minimatch: "npm:^3.1.2"
strip-json-comments: "npm:^3.1.1"
checksum: fa25638f2666cac6810f98ee7d0f4b912f191806467c1b40d72bac759fffef0b3357f12a1869817286837b258e4de3517e0c7408520e156ca860fc53a1fbaed9
checksum: 77b70a89232fe702c2f765b5b92970f5e4224b55363b923238b996c66fcd991504f40d3663c0543ae17d6c5049ab9b07ab90b65d7601e6f25e8bcd4caf69ac75
languageName: node
linkType: hard
"@eslint/js@npm:8.52.0":
version: 8.52.0
resolution: "@eslint/js@npm:8.52.0"
checksum: 86beff213d0ae4ced203a922b74e2cc4d767d109e7815f985bf648946ba072198977102e32afc9fa04f7825a6de83a831874f6b6675ba0c1d0743ade2dc2d53d
"@eslint/js@npm:8.53.0":
version: 8.53.0
resolution: "@eslint/js@npm:8.53.0"
checksum: a372d55aa2bbe0d9399acc8de3c892dcfe507fd914d29fde6826ae54a13452619be626aa7eb70b1ec4d4da5302b6ed8e8ac9bf1f830003f15c0ad56c30b4f520
languageName: node
linkType: hard
@@ -1566,7 +1566,7 @@ __metadata:
alova: "npm:^2.13.1"
async-validator: "npm:^4.2.5"
concurrently: "npm:^8.2.2"
eslint: "npm:^8.52.0"
eslint: "npm:^8.53.0"
eslint-config-airbnb: "npm:^19.0.4"
eslint-config-airbnb-typescript: "npm:^17.1.0"
eslint-config-prettier: "npm:^9.0.0"
@@ -1581,7 +1581,7 @@ __metadata:
jwt-decode: "npm:^4.0.0"
lodash-es: "npm:^4.17.21"
mime-types: "npm:^2.1.35"
preact: "npm:^10.18.1"
preact: "npm:^10.18.2"
prettier: "npm:^3.0.3"
react: "npm:latest"
react-dom: "npm:latest"
@@ -3654,14 +3654,14 @@ __metadata:
languageName: node
linkType: hard
"eslint@npm:^8.52.0":
version: 8.52.0
resolution: "eslint@npm:8.52.0"
"eslint@npm:^8.53.0":
version: 8.53.0
resolution: "eslint@npm:8.53.0"
dependencies:
"@eslint-community/eslint-utils": "npm:^4.2.0"
"@eslint-community/regexpp": "npm:^4.6.1"
"@eslint/eslintrc": "npm:^2.1.2"
"@eslint/js": "npm:8.52.0"
"@eslint/eslintrc": "npm:^2.1.3"
"@eslint/js": "npm:8.53.0"
"@humanwhocodes/config-array": "npm:^0.11.13"
"@humanwhocodes/module-importer": "npm:^1.0.1"
"@nodelib/fs.walk": "npm:^1.2.8"
@@ -3698,7 +3698,7 @@ __metadata:
text-table: "npm:^0.2.0"
bin:
eslint: bin/eslint.js
checksum: 01784ab15351d749bc95446039ed7acd5124f7cc84acdbf98c7199272eae06212a8f3ea4a9b47e7cc54ab17ca094c3a664bbfc3002c7de27936220e278b5028a
checksum: e305a71ce2b9a8631b293266fe53e346c76f28bc8d004af33f10e537cf133db1fb87af3599376e70ed6e0f89a78be10c4f08ddd0c1c9c0c497cd143b4a270420
languageName: node
linkType: hard
@@ -6661,10 +6661,10 @@ __metadata:
languageName: node
linkType: hard
"preact@npm:^10.18.1":
version: 10.18.1
resolution: "preact@npm:10.18.1"
checksum: 587c4634b310efc306ef9315f849b8e4ff538435087a1dca626e1394b98570af1ecdc254b7f0bb3060fc7ab87456c5f891f9b8a167d5c34dbbcfcf60b6e993f4
"preact@npm:^10.18.2":
version: 10.18.2
resolution: "preact@npm:10.18.2"
checksum: c7dcd6ea812adb0bdc215366b14aadc44724b6dd6c4e9aadd986126d94abde62f3e02e18d6157a9984873be9877f206c0afa10a09346178c4c828a103a66a0e1
languageName: node
linkType: hard