@iobroker/gui-components 10.0.16 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -1
- package/build/Components/DeviceType/DeviceTypeIcon.js +34 -10
- package/build/Components/DeviceType/DeviceTypeIcon.js.map +1 -1
- package/build/Components/DeviceType/deviceTypeTranslations.js +2 -0
- package/build/Components/DeviceType/deviceTypeTranslations.js.map +1 -1
- package/build/Components/DeviceType/i18n/de.json +11 -2
- package/build/Components/DeviceType/i18n/en.json +11 -2
- package/build/Components/DeviceType/i18n/es.json +56 -0
- package/build/Components/DeviceType/i18n/fr.json +11 -2
- package/build/Components/DeviceType/i18n/it.json +11 -2
- package/build/Components/DeviceType/i18n/nl.json +11 -2
- package/build/Components/DeviceType/i18n/pl.json +11 -2
- package/build/Components/DeviceType/i18n/pt.json +11 -2
- package/build/Components/DeviceType/i18n/ru.json +11 -2
- package/build/Components/DeviceType/i18n/uk.json +11 -2
- package/build/Components/DeviceType/i18n/zh-cn.json +11 -2
- package/build/Components/ObjectBrowser/ObjectBrowserClass.d.ts +6 -2
- package/build/Components/ObjectBrowser/ObjectBrowserClass.js +73 -35
- package/build/Components/ObjectBrowser/ObjectBrowserClass.js.map +1 -1
- package/build/Components/ObjectBrowser/dialogs.js +1 -1
- package/build/Components/ObjectBrowser/dialogs.js.map +1 -1
- package/build/Components/ObjectBrowser/renderLeaf.js +5 -11
- package/build/Components/ObjectBrowser/renderLeaf.js.map +1 -1
- package/build/Components/ObjectBrowser/styles.js +9 -0
- package/build/Components/ObjectBrowser/styles.js.map +1 -1
- package/build/Components/ObjectBrowser/utils.js +5 -12
- package/build/Components/ObjectBrowser/utils.js.map +1 -1
- package/package.json +10 -8
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ npm create vite@latest src -- --template react-ts
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@emotion/react": "^11.14.0",
|
|
38
38
|
"@emotion/styled": "^11.14.1",
|
|
39
|
-
"@iobroker/gui-components": "^10.0
|
|
39
|
+
"@iobroker/gui-components": "^10.2.0",
|
|
40
40
|
"@mui/icons-material": "^9.0.1",
|
|
41
41
|
"@mui/material": "^9.0.1",
|
|
42
42
|
"react": "^19.2.5",
|
|
@@ -799,6 +799,11 @@ shared is delivered with this package:
|
|
|
799
799
|
const { moduleFederationShared } = require('@iobroker/gui-components/modulefederation.admin.config');
|
|
800
800
|
```
|
|
801
801
|
|
|
802
|
+
Custom components of the JSON config must additionally be built with `manifest: true` and ship the
|
|
803
|
+
generated `mf-manifest.json` next to `customComponents.js`, as the admin reads from it against which
|
|
804
|
+
component library the build was made. See
|
|
805
|
+
[the migration instructions](MIGRATION_8_10.md#6-custom-admin-components) for the details.
|
|
806
|
+
|
|
802
807
|
## Test GUI
|
|
803
808
|
|
|
804
809
|
The `test-gui` directory contains a vite application to develop and test the components visually.
|
|
@@ -812,6 +817,22 @@ npm start
|
|
|
812
817
|
|
|
813
818
|
It expects a running ioBroker admin on `127.0.0.1:8081`.
|
|
814
819
|
|
|
820
|
+
## Checks
|
|
821
|
+
|
|
822
|
+
There is no unit test suite. The following checks run in CI and should be run before a pull request:
|
|
823
|
+
|
|
824
|
+
```bash
|
|
825
|
+
npm run check # type check (tsc --noEmit)
|
|
826
|
+
npm run lint # eslint
|
|
827
|
+
npm run check-device-types # device types are in sync with @iobroker/type-detector
|
|
828
|
+
```
|
|
829
|
+
|
|
830
|
+
`check-device-types` fails if a device type of `@iobroker/type-detector` has no icon in
|
|
831
|
+
`DeviceTypeIcon.tsx` or no name in one of the `src/Components/DeviceType/i18n/*.json` files, if a
|
|
832
|
+
name is left over for a type that no longer exists, or if a language file is not imported by
|
|
833
|
+
`deviceTypeTranslations.ts`. See [the DeviceType readme](src/Components/DeviceType/README.md) for
|
|
834
|
+
the details.
|
|
835
|
+
|
|
815
836
|
## List of adapters that use this library
|
|
816
837
|
|
|
817
838
|
- Admin
|
|
@@ -856,6 +877,20 @@ You can find the migration instructions:
|
|
|
856
877
|
-->
|
|
857
878
|
|
|
858
879
|
## Changelog
|
|
880
|
+
### 10.2.0 (2026-08-26)
|
|
881
|
+
|
|
882
|
+
- (@krobipd) Corrected: the object browser stayed empty after closing the object customization dialog if any object was changed while the dialog was open (ioBroker/ioBroker.admin#3391)
|
|
883
|
+
- (@krobipd) Changed: `ObjectBrowserClass.subscribes` and `.recordStates` are `Set`s instead of arrays now
|
|
884
|
+
- (@krobipd) Improved: object browser performance on large installations — bursts of object changes cause one tree rebuild instead of several, state-change echoes no longer trigger redraws, subscription bookkeeping is no longer quadratic, and rows outside the viewport skip layout and paint
|
|
885
|
+
|
|
886
|
+
### 10.1.0 (2026-08-13)
|
|
887
|
+
|
|
888
|
+
- (@GermanBluefox) Updated `@iobroker/type-detector` to 6.0.0
|
|
889
|
+
- (@GermanBluefox) Added icons and names for the device types `airPurifier`, `airQuality`, `coAlarm`, `contact`, `electricity`, `fan`, `fillLevel`, `flow`, `pressure`, `pump` and `unknown`
|
|
890
|
+
- (@GermanBluefox) Removed the names of the no longer existing device types `url` and `valve`
|
|
891
|
+
- (@GermanBluefox) Corrected the Spanish translations of the device types, as they were never loaded
|
|
892
|
+
- (@GermanBluefox) Added `npm run check-device-types` to detect missing device type icons and names
|
|
893
|
+
|
|
859
894
|
### 10.0.16 (2026-08-10)
|
|
860
895
|
|
|
861
896
|
- (@GermanBluefox) Corrected the text color of the filled alerts (snackbars) in the dark themes
|
|
@@ -5,11 +5,12 @@ import { GoDeviceCameraVideo as TypeIconCamera } from 'react-icons/go';
|
|
|
5
5
|
import {
|
|
6
6
|
// FaExternalLinkSquareAlt as TypeIconURL,
|
|
7
7
|
FaImage as TypeIconImage, FaRegLightbulb as TypeIconDimmer, FaInfoCircle as TypeIconInfo, FaLightbulb as TypeIconLight, FaLock as TypeIconLock, FaStreetView as TypeIconLocation, FaStepForward as TypeIconMedia, FaSlidersH as TypeIconSlider, FaVolumeDown as TypeIconVolume, FaVolumeUp as TypeIconVolumeGroup, FaFan as TypeIconAC, FaWrench as TypeIconInstance, } from 'react-icons/fa';
|
|
8
|
-
import { MdFormatColorFill as TypeIconHUE, MdFormatColorFill as TypeIconCT, MdWarning as TypeIconWarning, MdQuestionMark as TypeIconUnknown, MdOutlineMyLocation as TypeIconLocationOne, MdDeviceHub as TypeIconHub3, MdPolyline as TypeIconNode, MdHub as TypeIconHub5, MdControlCamera as TypeIconController, } from 'react-icons/md';
|
|
8
|
+
import { MdFormatColorFill as TypeIconHUE, MdFormatColorFill as TypeIconCT, MdWarning as TypeIconWarning, MdQuestionMark as TypeIconUnknown, MdOutlineMyLocation as TypeIconLocationOne, MdDeviceHub as TypeIconHub3, MdPolyline as TypeIconNode, MdHub as TypeIconHub5, MdControlCamera as TypeIconController, MdAir as TypeIconAirQuality, MdElectricMeter as TypeIconElectricity, } from 'react-icons/md';
|
|
9
9
|
import { WiCloudy as TypeIconWeather } from 'react-icons/wi';
|
|
10
10
|
import { IoIosRadioButtonOn as TypeIconButtonSensor } from 'react-icons/io';
|
|
11
|
-
import { TbSunElectricity as TypeIconIlluminance } from 'react-icons/tb';
|
|
12
|
-
import { PiPaletteDuotone as TypeIconRGBWSingle } from 'react-icons/pi';
|
|
11
|
+
import { TbSunElectricity as TypeIconIlluminance, TbAlarmSmoke as TypeIconCoAlarm, TbBarrel as TypeIconFillLevel, TbRipple as TypeIconFlow, TbGauge as TypeIconPressure, TbEngine as TypeIconPump, TbCircuitSwitchClosed as TypeIconContact, } from 'react-icons/tb';
|
|
12
|
+
import { PiPaletteDuotone as TypeIconRGBWSingle, PiFan as TypeIconFan } from 'react-icons/pi';
|
|
13
|
+
import { LuAirVent as TypeIconAirPurifier } from 'react-icons/lu';
|
|
13
14
|
import { Types } from '@iobroker/type-detector';
|
|
14
15
|
import { I18n } from '../../i18n';
|
|
15
16
|
import { Icon } from '../Icon';
|
|
@@ -17,23 +18,36 @@ import { Cleaner as TypeIconVacuumCleaner, Humidity as TypeIconHumidity, Jalousi
|
|
|
17
18
|
// HeatValve as TypeIconValve,
|
|
18
19
|
WindowOpened as TypeIconWindow, WindowTilted as TypeIconWindowTilt, } from './icons';
|
|
19
20
|
import { extendDeviceTypeTranslation } from './deviceTypeTranslations';
|
|
21
|
+
/**
|
|
22
|
+
* Icon for every device type.
|
|
23
|
+
*
|
|
24
|
+
* This map is deliberately a complete `Record` over `TypesExtended`: when `@iobroker/type-detector`
|
|
25
|
+
* adds a new member to `Types`, the build fails here until an icon is assigned. Never add keys that
|
|
26
|
+
* are not part of `TypesExtended` (a single `@ts-expect-error` inside the literal would suppress the
|
|
27
|
+
* completeness check for the whole object) — put those in `ROLE_ICONS` below.
|
|
28
|
+
*/
|
|
20
29
|
const TYPE_ICONS = {
|
|
21
30
|
[Types.airCondition]: TypeIconAC,
|
|
31
|
+
[Types.airPurifier]: TypeIconAirPurifier,
|
|
32
|
+
[Types.airQuality]: TypeIconAirQuality,
|
|
22
33
|
[Types.blind]: TypeIconBlinds,
|
|
23
34
|
[Types.blindButtons]: TypeIconBlinds,
|
|
24
35
|
[Types.button]: TypeIconButton,
|
|
25
36
|
[Types.buttonSensor]: TypeIconButtonSensor,
|
|
26
37
|
[Types.camera]: TypeIconCamera,
|
|
27
38
|
[Types.chart]: TypeIconChart,
|
|
39
|
+
[Types.coAlarm]: TypeIconCoAlarm,
|
|
40
|
+
[Types.contact]: TypeIconContact,
|
|
28
41
|
// [Types.url]: TypeIconURL,
|
|
29
42
|
[Types.image]: TypeIconImage,
|
|
30
43
|
[Types.dimmer]: TypeIconDimmer,
|
|
31
44
|
[Types.door]: TypeIconDoor,
|
|
45
|
+
[Types.electricity]: TypeIconElectricity,
|
|
46
|
+
[Types.fan]: TypeIconFan,
|
|
47
|
+
[Types.fillLevel]: TypeIconFillLevel,
|
|
32
48
|
[Types.fireAlarm]: TypeIconFireAlarm,
|
|
33
|
-
// @ts-expect-error special case
|
|
34
|
-
'sensor.alarm.fire': TypeIconFireAlarm,
|
|
35
49
|
[Types.floodAlarm]: TypeIconFloodAlarm,
|
|
36
|
-
|
|
50
|
+
[Types.flow]: TypeIconFlow,
|
|
37
51
|
[Types.gate]: TypeIconGate,
|
|
38
52
|
[Types.humidity]: TypeIconHumidity,
|
|
39
53
|
[Types.illuminance]: TypeIconIlluminance,
|
|
@@ -46,6 +60,8 @@ const TYPE_ICONS = {
|
|
|
46
60
|
[Types.motion]: TypeIconMotion,
|
|
47
61
|
[Types.ct]: TypeIconCT,
|
|
48
62
|
[Types.percentage]: TypeIconSlider,
|
|
63
|
+
[Types.pressure]: TypeIconPressure,
|
|
64
|
+
[Types.pump]: TypeIconPump,
|
|
49
65
|
[Types.rgb]: TypeIconRGB,
|
|
50
66
|
[Types.rgbSingle]: TypeIconRGB,
|
|
51
67
|
[Types.rgbwSingle]: TypeIconRGBWSingle,
|
|
@@ -73,6 +89,15 @@ const TYPE_ICONS = {
|
|
|
73
89
|
hub5: TypeIconHub5,
|
|
74
90
|
controller: TypeIconController,
|
|
75
91
|
};
|
|
92
|
+
/** Icons for state roles that may be given as `src` instead of a device type */
|
|
93
|
+
const ROLE_ICONS = {
|
|
94
|
+
'sensor.alarm.fire': TypeIconFireAlarm,
|
|
95
|
+
'sensor.alarm.flood': TypeIconFloodAlarm,
|
|
96
|
+
};
|
|
97
|
+
const ALL_ICONS = { ...TYPE_ICONS, ...ROLE_ICONS };
|
|
98
|
+
function isKnownIcon(src) {
|
|
99
|
+
return typeof src === 'string' && Object.prototype.hasOwnProperty.call(ALL_ICONS, src);
|
|
100
|
+
}
|
|
76
101
|
const defaultStyle = {
|
|
77
102
|
width: 32,
|
|
78
103
|
height: 32,
|
|
@@ -88,13 +113,12 @@ export function DeviceTypeIcon(props) {
|
|
|
88
113
|
if (!loaded && props.title) {
|
|
89
114
|
return (React.createElement(Box, { style: { ...defaultStyle, ...(props.style || undefined) }, className: props.className, sx: props.sx }));
|
|
90
115
|
}
|
|
91
|
-
// src could contain a device type too, so detect if it is a type
|
|
92
|
-
const type = props.type ||
|
|
93
|
-
(props.src ? Object.keys(TYPE_ICONS).find(type => props.src === type) : undefined);
|
|
116
|
+
// src could contain a device type or a state role too, so detect if it is a type
|
|
117
|
+
const type = props.type || (isKnownIcon(props.src) ? props.src : undefined);
|
|
94
118
|
if (!type && props.src) {
|
|
95
119
|
return (React.createElement(Icon, { style: defaultStyle, ...props, title: props.title === true ? undefined : props.title, src: props.src }));
|
|
96
120
|
}
|
|
97
|
-
const TypeIcon = type &&
|
|
121
|
+
const TypeIcon = type && ALL_ICONS[type];
|
|
98
122
|
if (!TypeIcon) {
|
|
99
123
|
// Show the first letter of a type
|
|
100
124
|
return type ? (React.createElement("span", { style: { ...defaultStyle, ...(props.style || undefined) } }, type[0].toUpperCase())) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceTypeIcon.js","sourceRoot":"./src/","sources":["Components/DeviceType/DeviceTypeIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,kBAAkB,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,mBAAmB,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEvE,OAAO;AACH,0CAA0C;AAC1C,OAAO,IAAI,aAAa,EACxB,cAAc,IAAI,cAAc,EAChC,YAAY,IAAI,YAAY,EAC5B,WAAW,IAAI,aAAa,EAC5B,MAAM,IAAI,YAAY,EACtB,YAAY,IAAI,gBAAgB,EAChC,aAAa,IAAI,aAAa,EAC9B,UAAU,IAAI,cAAc,EAC5B,YAAY,IAAI,cAAc,EAC9B,UAAU,IAAI,mBAAmB,EACjC,KAAK,IAAI,UAAU,EACnB,QAAQ,IAAI,gBAAgB,GAC/B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACH,iBAAiB,IAAI,WAAW,EAChC,iBAAiB,IAAI,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ACZ,kCAAkC;QAClC,OAAO,IAAI,CAAC,CAAC,CAAC,CACV,8BAAM,KAAK,EAAE,EAAE,GAAG,YAAY,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,EAAE,IAAG,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAQ,CAClG,CAAC,CAAC,CAAC,IAAI,CAAC;IACb,CAAC;IAED,MAAM,IAAI,GAAG,CACT,oBAAC,QAAQ,IACL,KAAK,EAAE,EAAE,GAAG,YAAY,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,EAAE,EACzD,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,EAAE,EAAE,KAAK,CAAC,EAAE,GACd,CACL,CAAC;IAEF,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,OAAO,CACH,oBAAC,OAAO,IACJ,SAAS,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,EAAE,EACxD,KAAK,EAAE,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK;YAElE,6BAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,IAAG,IAAI,CAAO,CACvC,CACb,CAAC;IACN,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC","sourcesContent":["import React, { useEffect } from 'react';\n\nimport { Box, Tooltip } from '@mui/material';\n\nimport { AiOutlineLineChart as TypeIconChart } from 'react-icons/ai';\nimport { GoDeviceCameraVideo as TypeIconCamera } from 'react-icons/go';\n\nimport {\n // FaExternalLinkSquareAlt as TypeIconURL,\n FaImage as TypeIconImage,\n FaRegLightbulb as TypeIconDimmer,\n FaInfoCircle as TypeIconInfo,\n FaLightbulb as TypeIconLight,\n FaLock as TypeIconLock,\n FaStreetView as TypeIconLocation,\n FaStepForward as TypeIconMedia,\n FaSlidersH as TypeIconSlider,\n FaVolumeDown as TypeIconVolume,\n FaVolumeUp as TypeIconVolumeGroup,\n FaFan as TypeIconAC,\n FaWrench as TypeIconInstance,\n} from 'react-icons/fa';\n\nimport {\n MdFormatColorFill as TypeIconHUE,\n MdFormatColorFill as TypeIconCT,\n MdWarning as TypeIconWarning,\n MdQuestionMark as TypeIconUnknown,\n MdOutlineMyLocation as TypeIconLocationOne,\n MdDeviceHub as TypeIconHub3,\n MdPolyline as TypeIconNode,\n MdHub as TypeIconHub5,\n MdControlCamera as TypeIconController,\n} from 'react-icons/md';\nimport { WiCloudy as TypeIconWeather } from 'react-icons/wi';\nimport { IoIosRadioButtonOn as TypeIconButtonSensor } from 'react-icons/io';\nimport { TbSunElectricity as TypeIconIlluminance } from 'react-icons/tb';\nimport { PiPaletteDuotone as TypeIconRGBWSingle } from 'react-icons/pi';\n\nimport { Types } from '@iobroker/type-detector';\n\nimport { I18n } from '../../i18n';\nimport { Icon } from '../Icon';\n\nimport {\n Cleaner as TypeIconVacuumCleaner,\n Humidity as TypeIconHumidity,\n Jalousie as TypeIconBlinds,\n PushButton as TypeIconButton,\n DoorOpened as TypeIconDoor,\n FireOn as TypeIconFireAlarm,\n FloodOn as TypeIconFloodAlarm,\n Gate as TypeIconGate,\n MotionOn as TypeIconMotion,\n RGB as TypeIconRGB,\n Socket as TypeIconSocket,\n Thermometer as TypeIconTemperature,\n Thermostat as TypeIconThermostat,\n // HeatValve as TypeIconValve,\n WindowOpened as TypeIconWindow,\n WindowTilted as TypeIconWindowTilt,\n type IconPropsSVG,\n} from './icons';\nimport { extendDeviceTypeTranslation } from './deviceTypeTranslations';\n\nexport type TypesExtended = Types | 'invalid' | 'hub3' | 'node' | 'hub5' | 'controller';\n\nconst TYPE_ICONS: Record<TypesExtended, React.FC<IconPropsSVG>> = {\n [Types.airCondition]: TypeIconAC,\n [Types.blind]: TypeIconBlinds,\n [Types.blindButtons]: TypeIconBlinds,\n [Types.button]: TypeIconButton,\n [Types.buttonSensor]: TypeIconButtonSensor,\n [Types.camera]: TypeIconCamera,\n [Types.chart]: TypeIconChart,\n // [Types.url]: TypeIconURL,\n [Types.image]: TypeIconImage,\n [Types.dimmer]: TypeIconDimmer,\n [Types.door]: TypeIconDoor,\n [Types.fireAlarm]: TypeIconFireAlarm,\n // @ts-expect-error special case\n 'sensor.alarm.fire': TypeIconFireAlarm,\n [Types.floodAlarm]: TypeIconFloodAlarm,\n 'sensor.alarm.flood': TypeIconFloodAlarm,\n [Types.gate]: TypeIconGate,\n [Types.humidity]: TypeIconHumidity,\n [Types.illuminance]: TypeIconIlluminance,\n [Types.info]: TypeIconInfo,\n [Types.light]: TypeIconLight,\n [Types.lock]: TypeIconLock,\n [Types.location]: TypeIconLocation,\n [Types.locationOne]: TypeIconLocationOne,\n [Types.media]: TypeIconMedia,\n [Types.motion]: TypeIconMotion,\n [Types.ct]: TypeIconCT,\n [Types.percentage]: TypeIconSlider,\n [Types.rgb]: TypeIconRGB,\n [Types.rgbSingle]: TypeIconRGB,\n [Types.rgbwSingle]: TypeIconRGBWSingle,\n [Types.hue]: TypeIconHUE,\n [Types.cie]: TypeIconRGB,\n [Types.slider]: TypeIconSlider,\n [Types.socket]: TypeIconSocket,\n [Types.temperature]: TypeIconTemperature,\n [Types.thermostat]: TypeIconThermostat,\n // [Types.valve]: TypeIconValve,\n [Types.vacuumCleaner]: TypeIconVacuumCleaner,\n [Types.volume]: TypeIconVolume,\n [Types.volumeGroup]: TypeIconVolumeGroup,\n [Types.window]: TypeIconWindow,\n [Types.windowTilt]: TypeIconWindowTilt,\n [Types.weatherCurrent]: TypeIconWeather,\n [Types.weatherForecast]: TypeIconWeather,\n [Types.warning]: TypeIconWarning,\n\n [Types.unknown]: TypeIconUnknown,\n [Types.instance]: TypeIconInstance,\n\n // Special matter types\n invalid: TypeIconWarning,\n hub3: TypeIconHub3,\n node: TypeIconNode,\n hub5: TypeIconHub5,\n controller: TypeIconController,\n};\n\nconst defaultStyle: React.CSSProperties = {\n width: 32,\n height: 32,\n};\n\nexport interface IconProps {\n /** URL, UTF-8 character, or svg code (data:image/svg...) */\n src?: string | React.JSX.Element | null | undefined;\n /** Class name */\n className?: string;\n /** Style for image */\n style?: React.CSSProperties;\n /** Styles for mui */\n sx?: Record<string, any>;\n /** Tooltip */\n title?: string | true;\n /** Styles for utf-8 characters */\n styleUTF8?: React.CSSProperties;\n /** On error handler */\n onError?: React.ReactEventHandler<HTMLImageElement>;\n /** Reference to image */\n ref?: React.RefObject<HTMLImageElement>;\n /** Alternative text for image */\n alt?: string;\n /** On click handler */\n onClick?: React.MouseEventHandler<any>;\n}\n\nexport type TypeIconProps = IconProps & { type?: TypesExtended };\n\nexport function DeviceTypeIcon(props: TypeIconProps): React.JSX.Element | null {\n const [loaded, setLoaded] = React.useState(false);\n\n useEffect(() => {\n if (props.title && !loaded) {\n extendDeviceTypeTranslation();\n setLoaded(true);\n }\n }, [props.title, loaded]);\n\n if (!loaded && props.title) {\n return (\n <Box\n style={{ ...defaultStyle, ...(props.style || undefined) }}\n className={props.className}\n sx={props.sx}\n />\n );\n }\n // src could contain a device type too, so detect if it is a type\n const type: TypesExtended | undefined =\n props.type ||\n (props.src ? (Object.keys(TYPE_ICONS).find(type => props.src === type) as TypesExtended) : undefined);\n\n if (!type && props.src) {\n return (\n <Icon\n style={defaultStyle}\n {...props}\n title={props.title === true ? undefined : props.title}\n src={props.src}\n />\n );\n }\n\n const TypeIcon = type && TYPE_ICONS[type];\n if (!TypeIcon) {\n // Show the first letter of a type\n return type ? (\n <span style={{ ...defaultStyle, ...(props.style || undefined) }}>{type[0].toUpperCase()}</span>\n ) : null;\n }\n\n const icon = (\n <TypeIcon\n style={{ ...defaultStyle, ...(props.style || undefined) }}\n onClick={props.onClick}\n className={props.className}\n sx={props.sx}\n />\n );\n\n if (props.title) {\n return (\n <Tooltip\n slotProps={{ popper: { sx: { pointerEvents: 'none' } } }}\n title={props.title === true ? I18n.t(`type-${type}`) : props.title}\n >\n <div style={{ display: 'flex' }}>{icon}</div>\n </Tooltip>\n );\n }\n\n return icon;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DeviceTypeIcon.js","sourceRoot":"./src/","sources":["Components/DeviceType/DeviceTypeIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,kBAAkB,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,mBAAmB,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEvE,OAAO;AACH,0CAA0C;AAC1C,OAAO,IAAI,aAAa,EACxB,cAAc,IAAI,cAAc,EAChC,YAAY,IAAI,YAAY,EAC5B,WAAW,IAAI,aAAa,EAC5B,MAAM,IAAI,YAAY,EACtB,YAAY,IAAI,gBAAgB,EAChC,aAAa,IAAI,aAAa,EAC9B,UAAU,IAAI,cAAc,EAC5B,YAAY,IAAI,cAAc,EAC9B,UAAU,IAAI,mBAAmB,EACjC,KAAK,IAAI,UAAU,EACnB,QAAQ,IAAI,gBAAgB,GAC/B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACH,iBAAiB,IAAI,WAAW,EAChC,iBAAiB,IAAI,UAAU,EAC/B,SAAS,IAAI,eAAe,EAC5B,cAAc,IAAI,eAAe,EACjC,mBAAmB,IAAI,mBAAmB,EAC1C,WAAW,IAAI,YAAY,EAC3B,UAAU,IAAI,YAAY,EAC1B,KAAK,IAAI,YAAY,EACrB,eAAe,IAAI,kBAAkB,EACrC,KAAK,IAAI,kBAAkB,EAC3B,eAAe,IAAI,mBAAmB,GACzC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,gBAAg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AC,KAAK,EAAE,CAAC;QACd,OAAO,CACH,oBAAC,OAAO,IACJ,SAAS,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,EAAE,EACxD,KAAK,EAAE,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK;YAElE,6BAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,IAAG,IAAI,CAAO,CACvC,CACb,CAAC;IACN,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC","sourcesContent":["import React, { useEffect } from 'react';\n\nimport { Box, Tooltip } from '@mui/material';\n\nimport { AiOutlineLineChart as TypeIconChart } from 'react-icons/ai';\nimport { GoDeviceCameraVideo as TypeIconCamera } from 'react-icons/go';\n\nimport {\n // FaExternalLinkSquareAlt as TypeIconURL,\n FaImage as TypeIconImage,\n FaRegLightbulb as TypeIconDimmer,\n FaInfoCircle as TypeIconInfo,\n FaLightbulb as TypeIconLight,\n FaLock as TypeIconLock,\n FaStreetView as TypeIconLocation,\n FaStepForward as TypeIconMedia,\n FaSlidersH as TypeIconSlider,\n FaVolumeDown as TypeIconVolume,\n FaVolumeUp as TypeIconVolumeGroup,\n FaFan as TypeIconAC,\n FaWrench as TypeIconInstance,\n} from 'react-icons/fa';\n\nimport {\n MdFormatColorFill as TypeIconHUE,\n MdFormatColorFill as TypeIconCT,\n MdWarning as TypeIconWarning,\n MdQuestionMark as TypeIconUnknown,\n MdOutlineMyLocation as TypeIconLocationOne,\n MdDeviceHub as TypeIconHub3,\n MdPolyline as TypeIconNode,\n MdHub as TypeIconHub5,\n MdControlCamera as TypeIconController,\n MdAir as TypeIconAirQuality,\n MdElectricMeter as TypeIconElectricity,\n} from 'react-icons/md';\nimport { WiCloudy as TypeIconWeather } from 'react-icons/wi';\nimport { IoIosRadioButtonOn as TypeIconButtonSensor } from 'react-icons/io';\nimport {\n TbSunElectricity as TypeIconIlluminance,\n TbAlarmSmoke as TypeIconCoAlarm,\n TbBarrel as TypeIconFillLevel,\n TbRipple as TypeIconFlow,\n TbGauge as TypeIconPressure,\n TbEngine as TypeIconPump,\n TbCircuitSwitchClosed as TypeIconContact,\n} from 'react-icons/tb';\nimport { PiPaletteDuotone as TypeIconRGBWSingle, PiFan as TypeIconFan } from 'react-icons/pi';\nimport { LuAirVent as TypeIconAirPurifier } from 'react-icons/lu';\n\nimport { Types } from '@iobroker/type-detector';\n\nimport { I18n } from '../../i18n';\nimport { Icon } from '../Icon';\n\nimport {\n Cleaner as TypeIconVacuumCleaner,\n Humidity as TypeIconHumidity,\n Jalousie as TypeIconBlinds,\n PushButton as TypeIconButton,\n DoorOpened as TypeIconDoor,\n FireOn as TypeIconFireAlarm,\n FloodOn as TypeIconFloodAlarm,\n Gate as TypeIconGate,\n MotionOn as TypeIconMotion,\n RGB as TypeIconRGB,\n Socket as TypeIconSocket,\n Thermometer as TypeIconTemperature,\n Thermostat as TypeIconThermostat,\n // HeatValve as TypeIconValve,\n WindowOpened as TypeIconWindow,\n WindowTilted as TypeIconWindowTilt,\n type IconPropsSVG,\n} from './icons';\nimport { extendDeviceTypeTranslation } from './deviceTypeTranslations';\n\nexport type TypesExtended = Types | 'invalid' | 'hub3' | 'node' | 'hub5' | 'controller';\n\n/**\n * Icon for every device type.\n *\n * This map is deliberately a complete `Record` over `TypesExtended`: when `@iobroker/type-detector`\n * adds a new member to `Types`, the build fails here until an icon is assigned. Never add keys that\n * are not part of `TypesExtended` (a single `@ts-expect-error` inside the literal would suppress the\n * completeness check for the whole object) — put those in `ROLE_ICONS` below.\n */\nconst TYPE_ICONS: Record<TypesExtended, React.FC<IconPropsSVG>> = {\n [Types.airCondition]: TypeIconAC,\n [Types.airPurifier]: TypeIconAirPurifier,\n [Types.airQuality]: TypeIconAirQuality,\n [Types.blind]: TypeIconBlinds,\n [Types.blindButtons]: TypeIconBlinds,\n [Types.button]: TypeIconButton,\n [Types.buttonSensor]: TypeIconButtonSensor,\n [Types.camera]: TypeIconCamera,\n [Types.chart]: TypeIconChart,\n [Types.coAlarm]: TypeIconCoAlarm,\n [Types.contact]: TypeIconContact,\n // [Types.url]: TypeIconURL,\n [Types.image]: TypeIconImage,\n [Types.dimmer]: TypeIconDimmer,\n [Types.door]: TypeIconDoor,\n [Types.electricity]: TypeIconElectricity,\n [Types.fan]: TypeIconFan,\n [Types.fillLevel]: TypeIconFillLevel,\n [Types.fireAlarm]: TypeIconFireAlarm,\n [Types.floodAlarm]: TypeIconFloodAlarm,\n [Types.flow]: TypeIconFlow,\n [Types.gate]: TypeIconGate,\n [Types.humidity]: TypeIconHumidity,\n [Types.illuminance]: TypeIconIlluminance,\n [Types.info]: TypeIconInfo,\n [Types.light]: TypeIconLight,\n [Types.lock]: TypeIconLock,\n [Types.location]: TypeIconLocation,\n [Types.locationOne]: TypeIconLocationOne,\n [Types.media]: TypeIconMedia,\n [Types.motion]: TypeIconMotion,\n [Types.ct]: TypeIconCT,\n [Types.percentage]: TypeIconSlider,\n [Types.pressure]: TypeIconPressure,\n [Types.pump]: TypeIconPump,\n [Types.rgb]: TypeIconRGB,\n [Types.rgbSingle]: TypeIconRGB,\n [Types.rgbwSingle]: TypeIconRGBWSingle,\n [Types.hue]: TypeIconHUE,\n [Types.cie]: TypeIconRGB,\n [Types.slider]: TypeIconSlider,\n [Types.socket]: TypeIconSocket,\n [Types.temperature]: TypeIconTemperature,\n [Types.thermostat]: TypeIconThermostat,\n // [Types.valve]: TypeIconValve,\n [Types.vacuumCleaner]: TypeIconVacuumCleaner,\n [Types.volume]: TypeIconVolume,\n [Types.volumeGroup]: TypeIconVolumeGroup,\n [Types.window]: TypeIconWindow,\n [Types.windowTilt]: TypeIconWindowTilt,\n [Types.weatherCurrent]: TypeIconWeather,\n [Types.weatherForecast]: TypeIconWeather,\n [Types.warning]: TypeIconWarning,\n\n [Types.unknown]: TypeIconUnknown,\n [Types.instance]: TypeIconInstance,\n\n // Special matter types\n invalid: TypeIconWarning,\n hub3: TypeIconHub3,\n node: TypeIconNode,\n hub5: TypeIconHub5,\n controller: TypeIconController,\n};\n\n/** Icons for state roles that may be given as `src` instead of a device type */\nconst ROLE_ICONS: Record<string, React.FC<IconPropsSVG>> = {\n 'sensor.alarm.fire': TypeIconFireAlarm,\n 'sensor.alarm.flood': TypeIconFloodAlarm,\n};\n\nconst ALL_ICONS: Record<string, React.FC<IconPropsSVG>> = { ...TYPE_ICONS, ...ROLE_ICONS };\n\nfunction isKnownIcon(src: unknown): src is TypesExtended {\n return typeof src === 'string' && Object.prototype.hasOwnProperty.call(ALL_ICONS, src);\n}\n\nconst defaultStyle: React.CSSProperties = {\n width: 32,\n height: 32,\n};\n\nexport interface IconProps {\n /** URL, UTF-8 character, or svg code (data:image/svg...) */\n src?: string | React.JSX.Element | null | undefined;\n /** Class name */\n className?: string;\n /** Style for image */\n style?: React.CSSProperties;\n /** Styles for mui */\n sx?: Record<string, any>;\n /** Tooltip */\n title?: string | true;\n /** Styles for utf-8 characters */\n styleUTF8?: React.CSSProperties;\n /** On error handler */\n onError?: React.ReactEventHandler<HTMLImageElement>;\n /** Reference to image */\n ref?: React.RefObject<HTMLImageElement>;\n /** Alternative text for image */\n alt?: string;\n /** On click handler */\n onClick?: React.MouseEventHandler<any>;\n}\n\nexport type TypeIconProps = IconProps & { type?: TypesExtended };\n\nexport function DeviceTypeIcon(props: TypeIconProps): React.JSX.Element | null {\n const [loaded, setLoaded] = React.useState(false);\n\n useEffect(() => {\n if (props.title && !loaded) {\n extendDeviceTypeTranslation();\n setLoaded(true);\n }\n }, [props.title, loaded]);\n\n if (!loaded && props.title) {\n return (\n <Box\n style={{ ...defaultStyle, ...(props.style || undefined) }}\n className={props.className}\n sx={props.sx}\n />\n );\n }\n // src could contain a device type or a state role too, so detect if it is a type\n const type: TypesExtended | undefined = props.type || (isKnownIcon(props.src) ? props.src : undefined);\n\n if (!type && props.src) {\n return (\n <Icon\n style={defaultStyle}\n {...props}\n title={props.title === true ? undefined : props.title}\n src={props.src}\n />\n );\n }\n\n const TypeIcon = type && ALL_ICONS[type];\n if (!TypeIcon) {\n // Show the first letter of a type\n return type ? (\n <span style={{ ...defaultStyle, ...(props.style || undefined) }}>{type[0].toUpperCase()}</span>\n ) : null;\n }\n\n const icon = (\n <TypeIcon\n style={{ ...defaultStyle, ...(props.style || undefined) }}\n onClick={props.onClick}\n className={props.className}\n sx={props.sx}\n />\n );\n\n if (props.title) {\n return (\n <Tooltip\n slotProps={{ popper: { sx: { pointerEvents: 'none' } } }}\n title={props.title === true ? I18n.t(`type-${type}`) : props.title}\n >\n <div style={{ display: 'flex' }}>{icon}</div>\n </Tooltip>\n );\n }\n\n return icon;\n}\n"]}
|
|
@@ -4,6 +4,7 @@ import deLang from './i18n/de.json';
|
|
|
4
4
|
import ruLang from './i18n/ru.json';
|
|
5
5
|
import ptLang from './i18n/pt.json';
|
|
6
6
|
import plLang from './i18n/pl.json';
|
|
7
|
+
import esLang from './i18n/es.json';
|
|
7
8
|
import frLang from './i18n/fr.json';
|
|
8
9
|
import itLang from './i18n/it.json';
|
|
9
10
|
import nlLang from './i18n/nl.json';
|
|
@@ -19,6 +20,7 @@ export function extendDeviceTypeTranslation() {
|
|
|
19
20
|
ru: ruLang,
|
|
20
21
|
pt: ptLang,
|
|
21
22
|
pl: plLang,
|
|
23
|
+
es: esLang,
|
|
22
24
|
fr: frLang,
|
|
23
25
|
it: itLang,
|
|
24
26
|
nl: nlLang,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceTypeTranslations.js","sourceRoot":"./src/","sources":["Components/DeviceType/deviceTypeTranslations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,IAAI,iBAAiB,GAAG,KAAK,CAAC;AAC9B,MAAM,UAAU,2BAA2B;IACvC,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACrB,iBAAiB,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,kBAAkB,CAAC;YACpB,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,OAAO,EAAE,MAAM;SAClB,CAAC,CAAC;IACP,CAAC;AACL,CAAC","sourcesContent":["import { I18n } from '../../i18n';\nimport enLang from './i18n/en.json';\nimport deLang from './i18n/de.json';\nimport ruLang from './i18n/ru.json';\nimport ptLang from './i18n/pt.json';\nimport plLang from './i18n/pl.json';\nimport frLang from './i18n/fr.json';\nimport itLang from './i18n/it.json';\nimport nlLang from './i18n/nl.json';\nimport ukLang from './i18n/uk.json';\nimport zhLang from './i18n/zh-cn.json';\n\nlet translationLoaded = false;\nexport function extendDeviceTypeTranslation(): void {\n if (!translationLoaded) {\n translationLoaded = true;\n I18n.extendTranslations({\n en: enLang,\n de: deLang,\n ru: ruLang,\n pt: ptLang,\n pl: plLang,\n fr: frLang,\n it: itLang,\n nl: nlLang,\n uk: ukLang,\n 'zh-cn': zhLang,\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"deviceTypeTranslations.js","sourceRoot":"./src/","sources":["Components/DeviceType/deviceTypeTranslations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,IAAI,iBAAiB,GAAG,KAAK,CAAC;AAC9B,MAAM,UAAU,2BAA2B;IACvC,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACrB,iBAAiB,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,kBAAkB,CAAC;YACpB,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,OAAO,EAAE,MAAM;SAClB,CAAC,CAAC;IACP,CAAC;AACL,CAAC","sourcesContent":["import { I18n } from '../../i18n';\nimport enLang from './i18n/en.json';\nimport deLang from './i18n/de.json';\nimport ruLang from './i18n/ru.json';\nimport ptLang from './i18n/pt.json';\nimport plLang from './i18n/pl.json';\nimport esLang from './i18n/es.json';\nimport frLang from './i18n/fr.json';\nimport itLang from './i18n/it.json';\nimport nlLang from './i18n/nl.json';\nimport ukLang from './i18n/uk.json';\nimport zhLang from './i18n/zh-cn.json';\n\nlet translationLoaded = false;\nexport function extendDeviceTypeTranslation(): void {\n if (!translationLoaded) {\n translationLoaded = true;\n I18n.extendTranslations({\n en: enLang,\n de: deLang,\n ru: ruLang,\n pt: ptLang,\n pl: plLang,\n es: esLang,\n fr: frLang,\n it: itLang,\n nl: nlLang,\n uk: ukLang,\n 'zh-cn': zhLang,\n });\n }\n}\n"]}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type-Device type": "Gerätetyp",
|
|
3
3
|
"type-airCondition": "Klimaanlage",
|
|
4
|
+
"type-airPurifier": "Luftreiniger",
|
|
5
|
+
"type-airQuality": "Luftqualität",
|
|
4
6
|
"type-blind": "Jalousien",
|
|
5
7
|
"type-blindButtons": "Jalousie über Tasten gesteuert",
|
|
6
8
|
"type-button": "Taste",
|
|
@@ -8,11 +10,17 @@
|
|
|
8
10
|
"type-camera": "Kamera",
|
|
9
11
|
"type-chart": "Diagramm",
|
|
10
12
|
"type-cie": "CIE Farblicht",
|
|
13
|
+
"type-coAlarm": "Kohlenmonoxid-Alarm",
|
|
14
|
+
"type-contact": "Kontaktsensor",
|
|
11
15
|
"type-ct": "Farbtemperatur",
|
|
12
16
|
"type-dimmer": "Dimmer",
|
|
13
17
|
"type-door": "Türsensor",
|
|
18
|
+
"type-electricity": "Stromzähler",
|
|
19
|
+
"type-fan": "Ventilator",
|
|
20
|
+
"type-fillLevel": "Füllstand",
|
|
14
21
|
"type-fireAlarm": "Feueralarm",
|
|
15
22
|
"type-floodAlarm": "Wasseralarm",
|
|
23
|
+
"type-flow": "Durchfluss",
|
|
16
24
|
"type-gate": "Tor-Steuerung",
|
|
17
25
|
"type-hue": "HUE-Licht",
|
|
18
26
|
"type-humidity": "Feuchtigkeit",
|
|
@@ -27,6 +35,8 @@
|
|
|
27
35
|
"type-media": "Mediaplayer",
|
|
28
36
|
"type-motion": "Bewegungssensor",
|
|
29
37
|
"type-percentage": "Prozentsatz",
|
|
38
|
+
"type-pressure": "Druck",
|
|
39
|
+
"type-pump": "Pumpe",
|
|
30
40
|
"type-rgb": "RGB-Licht",
|
|
31
41
|
"type-rgbSingle": "R,G,B-Licht Einzelwerte",
|
|
32
42
|
"type-rgbwSingle": "R,G,B,W-Licht Einzelwerte",
|
|
@@ -34,9 +44,8 @@
|
|
|
34
44
|
"type-socket": "Steckdose",
|
|
35
45
|
"type-temperature": "Temperatur",
|
|
36
46
|
"type-thermostat": "Thermostat",
|
|
37
|
-
"type-
|
|
47
|
+
"type-unknown": "Unbekannt",
|
|
38
48
|
"type-vacuumCleaner": "Staubsauger",
|
|
39
|
-
"type-valve": "Ventil",
|
|
40
49
|
"type-volume": "Lautstärke",
|
|
41
50
|
"type-volumeGroup": "Lautstärke-Gruppe",
|
|
42
51
|
"type-warning": "Warnung",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type-Device type": "Device type",
|
|
3
3
|
"type-airCondition": "Air conditioner",
|
|
4
|
+
"type-airPurifier": "Air purifier",
|
|
5
|
+
"type-airQuality": "Air quality",
|
|
4
6
|
"type-blind": "Blinds",
|
|
5
7
|
"type-blindButtons": "Blind controlled by buttons",
|
|
6
8
|
"type-button": "Button",
|
|
@@ -8,11 +10,17 @@
|
|
|
8
10
|
"type-camera": "Camera",
|
|
9
11
|
"type-chart": "Chart",
|
|
10
12
|
"type-cie": "CIE color light",
|
|
13
|
+
"type-coAlarm": "Carbon monoxide alarm",
|
|
14
|
+
"type-contact": "Contact sensor",
|
|
11
15
|
"type-ct": "Color temperature",
|
|
12
16
|
"type-dimmer": "Dimmer",
|
|
13
17
|
"type-door": "Door",
|
|
18
|
+
"type-electricity": "Electricity meter",
|
|
19
|
+
"type-fan": "Fan",
|
|
20
|
+
"type-fillLevel": "Fill level",
|
|
14
21
|
"type-fireAlarm": "Fire alarm",
|
|
15
22
|
"type-floodAlarm": "Flood alarm",
|
|
23
|
+
"type-flow": "Flow rate",
|
|
16
24
|
"type-gate": "Gate",
|
|
17
25
|
"type-hue": "HUE light",
|
|
18
26
|
"type-humidity": "Humidity",
|
|
@@ -27,6 +35,8 @@
|
|
|
27
35
|
"type-media": "Media-player",
|
|
28
36
|
"type-motion": "Motion sensor",
|
|
29
37
|
"type-percentage": "Percentage",
|
|
38
|
+
"type-pressure": "Pressure",
|
|
39
|
+
"type-pump": "Pump",
|
|
30
40
|
"type-rgb": "RGB light",
|
|
31
41
|
"type-rgbSingle": "R,G,B light - single states",
|
|
32
42
|
"type-rgbwSingle": "R,G,B,W light - single states",
|
|
@@ -34,9 +44,8 @@
|
|
|
34
44
|
"type-socket": "Socket",
|
|
35
45
|
"type-temperature": "Temperature",
|
|
36
46
|
"type-thermostat": "Thermostat",
|
|
37
|
-
"type-
|
|
47
|
+
"type-unknown": "Unknown",
|
|
38
48
|
"type-vacuumCleaner": "Vacuum cleaner",
|
|
39
|
-
"type-valve": "Valve",
|
|
40
49
|
"type-volume": "Volume",
|
|
41
50
|
"type-volumeGroup": "Volume group",
|
|
42
51
|
"type-warning": "Warning",
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type-Device type": "Tipo de dispositivo",
|
|
3
|
+
"type-airCondition": "Acondicionador de aire",
|
|
4
|
+
"type-airPurifier": "Purificador de aire",
|
|
5
|
+
"type-airQuality": "Calidad del aire",
|
|
6
|
+
"type-blind": "persianas",
|
|
7
|
+
"type-blindButtons": "Persiana controlada por botones",
|
|
8
|
+
"type-button": "botón",
|
|
9
|
+
"type-buttonSensor": "Sensor de botón",
|
|
10
|
+
"type-camera": "cámara",
|
|
11
|
+
"type-chart": "Cuadro",
|
|
12
|
+
"type-cie": "Luz de color CIE",
|
|
13
|
+
"type-coAlarm": "Alarma de monóxido de carbono",
|
|
14
|
+
"type-contact": "Sensor de contacto",
|
|
15
|
+
"type-ct": "Temperatura de color",
|
|
16
|
+
"type-dimmer": "regulador de intensidad",
|
|
17
|
+
"type-door": "puerta",
|
|
18
|
+
"type-electricity": "Contador de electricidad",
|
|
19
|
+
"type-fan": "Ventilador",
|
|
20
|
+
"type-fillLevel": "Nivel de llenado",
|
|
21
|
+
"type-fireAlarm": "alarma de incendios",
|
|
22
|
+
"type-floodAlarm": "alarma de inundación",
|
|
23
|
+
"type-flow": "Caudal",
|
|
24
|
+
"type-gate": "puerta",
|
|
25
|
+
"type-hue": "Luz HUE",
|
|
26
|
+
"type-humidity": "humedad",
|
|
27
|
+
"type-illuminance": "Iluminancia",
|
|
28
|
+
"type-image": "imagen",
|
|
29
|
+
"type-info": "información",
|
|
30
|
+
"type-instance": "instancia",
|
|
31
|
+
"type-light": "luz",
|
|
32
|
+
"type-location": "ubicación",
|
|
33
|
+
"type-locationOne": "Posición como Estado",
|
|
34
|
+
"type-lock": "cerrar",
|
|
35
|
+
"type-media": "medios de comunicación",
|
|
36
|
+
"type-motion": "movimiento",
|
|
37
|
+
"type-percentage": "Porcentaje",
|
|
38
|
+
"type-pressure": "Presión",
|
|
39
|
+
"type-pump": "Bomba",
|
|
40
|
+
"type-rgb": "Luz RGB",
|
|
41
|
+
"type-rgbSingle": "Luz RGB individual",
|
|
42
|
+
"type-rgbwSingle": "RGBW como valor único",
|
|
43
|
+
"type-slider": "control deslizante",
|
|
44
|
+
"type-socket": "enchufe",
|
|
45
|
+
"type-temperature": "temperatura",
|
|
46
|
+
"type-thermostat": "termostato",
|
|
47
|
+
"type-unknown": "Desconocido",
|
|
48
|
+
"type-vacuumCleaner": "Aspiradora",
|
|
49
|
+
"type-volume": "volumen",
|
|
50
|
+
"type-volumeGroup": "grupo de volumen",
|
|
51
|
+
"type-warning": "advertencia",
|
|
52
|
+
"type-weatherCurrent": "el tiempo actual",
|
|
53
|
+
"type-weatherForecast": "pronóstico del tiempo",
|
|
54
|
+
"type-window": "ventana",
|
|
55
|
+
"type-windowTilt": "inclinación de la ventana"
|
|
56
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type-Device type": "Type d'appareil",
|
|
3
3
|
"type-airCondition": "Climatiseur",
|
|
4
|
+
"type-airPurifier": "Purificateur d'air",
|
|
5
|
+
"type-airQuality": "Qualité de l'air",
|
|
4
6
|
"type-blind": "stores",
|
|
5
7
|
"type-blindButtons": "Store commandé par boutons",
|
|
6
8
|
"type-button": "bouton",
|
|
@@ -8,11 +10,17 @@
|
|
|
8
10
|
"type-camera": "caméra",
|
|
9
11
|
"type-chart": "Graphique",
|
|
10
12
|
"type-cie": "lumière colorée CIE",
|
|
13
|
+
"type-coAlarm": "Alarme monoxyde de carbone",
|
|
14
|
+
"type-contact": "Capteur de contact",
|
|
11
15
|
"type-ct": "Température de couleur",
|
|
12
16
|
"type-dimmer": "variateur",
|
|
13
17
|
"type-door": "porte",
|
|
18
|
+
"type-electricity": "Compteur électrique",
|
|
19
|
+
"type-fan": "Ventilateur",
|
|
20
|
+
"type-fillLevel": "Niveau de remplissage",
|
|
14
21
|
"type-fireAlarm": "alarme incendie",
|
|
15
22
|
"type-floodAlarm": "alarme d'inondation",
|
|
23
|
+
"type-flow": "Débit",
|
|
16
24
|
"type-gate": "grille",
|
|
17
25
|
"type-hue": "Lumière HUE",
|
|
18
26
|
"type-humidity": "humidité",
|
|
@@ -27,6 +35,8 @@
|
|
|
27
35
|
"type-media": "médias",
|
|
28
36
|
"type-motion": "mouvement",
|
|
29
37
|
"type-percentage": "Pourcentage",
|
|
38
|
+
"type-pressure": "Pression",
|
|
39
|
+
"type-pump": "Pompe",
|
|
30
40
|
"type-rgb": "lumière RVB",
|
|
31
41
|
"type-rgbSingle": "Lumière RVB simple",
|
|
32
42
|
"type-rgbwSingle": "RGBW comme valeur unique",
|
|
@@ -34,9 +44,8 @@
|
|
|
34
44
|
"type-socket": "douille",
|
|
35
45
|
"type-temperature": "température",
|
|
36
46
|
"type-thermostat": "thermostat",
|
|
37
|
-
"type-
|
|
47
|
+
"type-unknown": "Inconnu",
|
|
38
48
|
"type-vacuumCleaner": "Aspirateur",
|
|
39
|
-
"type-valve": "soupape",
|
|
40
49
|
"type-volume": "volume",
|
|
41
50
|
"type-volumeGroup": "groupe de volumes",
|
|
42
51
|
"type-warning": "avertissement",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type-Device type": "Tipo di dispositivo",
|
|
3
3
|
"type-airCondition": "Condizionatore d'aria",
|
|
4
|
+
"type-airPurifier": "Purificatore d'aria",
|
|
5
|
+
"type-airQuality": "Qualità dell'aria",
|
|
4
6
|
"type-blind": "tende",
|
|
5
7
|
"type-blindButtons": "Tenda controllata da pulsanti",
|
|
6
8
|
"type-button": "pulsante",
|
|
@@ -8,11 +10,17 @@
|
|
|
8
10
|
"type-camera": "telecamera",
|
|
9
11
|
"type-chart": "Grafico",
|
|
10
12
|
"type-cie": "Luce colorata CIE",
|
|
13
|
+
"type-coAlarm": "Allarme monossido di carbonio",
|
|
14
|
+
"type-contact": "Sensore di contatto",
|
|
11
15
|
"type-ct": "Temperatura del colore",
|
|
12
16
|
"type-dimmer": "dimmer",
|
|
13
17
|
"type-door": "porta",
|
|
18
|
+
"type-electricity": "Contatore elettrico",
|
|
19
|
+
"type-fan": "Ventilatore",
|
|
20
|
+
"type-fillLevel": "Livello di riempimento",
|
|
14
21
|
"type-fireAlarm": "allarme antincendio",
|
|
15
22
|
"type-floodAlarm": "allarme allagamento",
|
|
23
|
+
"type-flow": "Portata",
|
|
16
24
|
"type-gate": "cancello",
|
|
17
25
|
"type-hue": "Luce HUE",
|
|
18
26
|
"type-humidity": "umidità",
|
|
@@ -27,6 +35,8 @@
|
|
|
27
35
|
"type-media": "media",
|
|
28
36
|
"type-motion": "movimento",
|
|
29
37
|
"type-percentage": "Percentuale",
|
|
38
|
+
"type-pressure": "Pressione",
|
|
39
|
+
"type-pump": "Pompa",
|
|
30
40
|
"type-rgb": "luce RGB",
|
|
31
41
|
"type-rgbSingle": "Luce RGB singola",
|
|
32
42
|
"type-rgbwSingle": "RGBW come valore singolo",
|
|
@@ -34,9 +44,8 @@
|
|
|
34
44
|
"type-socket": "PRESA",
|
|
35
45
|
"type-temperature": "temperatura",
|
|
36
46
|
"type-thermostat": "termostato",
|
|
37
|
-
"type-
|
|
47
|
+
"type-unknown": "Sconosciuto",
|
|
38
48
|
"type-vacuumCleaner": "Aspirapolvere",
|
|
39
|
-
"type-valve": "valvola",
|
|
40
49
|
"type-volume": "volume",
|
|
41
50
|
"type-volumeGroup": "gruppo di volumi",
|
|
42
51
|
"type-warning": "avvertimento",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type-Device type": "Apparaattype",
|
|
3
3
|
"type-airCondition": "Airconditioner",
|
|
4
|
+
"type-airPurifier": "Luchtreiniger",
|
|
5
|
+
"type-airQuality": "Luchtkwaliteit",
|
|
4
6
|
"type-blind": "jaloezieën",
|
|
5
7
|
"type-blindButtons": "Jaloezie bediend door knoppen",
|
|
6
8
|
"type-button": "knop",
|
|
@@ -8,11 +10,17 @@
|
|
|
8
10
|
"type-camera": "camera",
|
|
9
11
|
"type-chart": "Grafiek",
|
|
10
12
|
"type-cie": "CIE-kleurenlicht",
|
|
13
|
+
"type-coAlarm": "Koolmonoxidealarm",
|
|
14
|
+
"type-contact": "Contactsensor",
|
|
11
15
|
"type-ct": "Kleurtemperatuur",
|
|
12
16
|
"type-dimmer": "dimmer",
|
|
13
17
|
"type-door": "deur",
|
|
18
|
+
"type-electricity": "Elektriciteitsmeter",
|
|
19
|
+
"type-fan": "Ventilator",
|
|
20
|
+
"type-fillLevel": "Vulniveau",
|
|
14
21
|
"type-fireAlarm": "brandalarm",
|
|
15
22
|
"type-floodAlarm": "overstromingsalarm",
|
|
23
|
+
"type-flow": "Debiet",
|
|
16
24
|
"type-gate": "hek",
|
|
17
25
|
"type-hue": "HUE-licht",
|
|
18
26
|
"type-humidity": "vochtigheid",
|
|
@@ -27,6 +35,8 @@
|
|
|
27
35
|
"type-media": "media",
|
|
28
36
|
"type-motion": "beweging",
|
|
29
37
|
"type-percentage": "Percentage",
|
|
38
|
+
"type-pressure": "Druk",
|
|
39
|
+
"type-pump": "Pomp",
|
|
30
40
|
"type-rgb": "RGB-licht",
|
|
31
41
|
"type-rgbSingle": "RGB-licht enkel",
|
|
32
42
|
"type-rgbwSingle": "RGBW als enkele waarde",
|
|
@@ -34,9 +44,8 @@
|
|
|
34
44
|
"type-socket": "stopcontact",
|
|
35
45
|
"type-temperature": "temperatuur",
|
|
36
46
|
"type-thermostat": "thermostaat",
|
|
37
|
-
"type-
|
|
47
|
+
"type-unknown": "Onbekend",
|
|
38
48
|
"type-vacuumCleaner": "Stofzuiger",
|
|
39
|
-
"type-valve": "ventiel",
|
|
40
49
|
"type-volume": "volume",
|
|
41
50
|
"type-volumeGroup": "volumegroep",
|
|
42
51
|
"type-warning": "waarschuwing",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type-Device type": "Typ urządzenia",
|
|
3
3
|
"type-airCondition": "Klimatyzator",
|
|
4
|
+
"type-airPurifier": "Oczyszczacz powietrza",
|
|
5
|
+
"type-airQuality": "Jakość powietrza",
|
|
4
6
|
"type-blind": "żaluzje",
|
|
5
7
|
"type-blindButtons": "Roleta sterowana przyciskami",
|
|
6
8
|
"type-button": "przycisk",
|
|
@@ -8,11 +10,17 @@
|
|
|
8
10
|
"type-camera": "kamera",
|
|
9
11
|
"type-chart": "Wykres",
|
|
10
12
|
"type-cie": "Światło kolorowe CIE",
|
|
13
|
+
"type-coAlarm": "Alarm tlenku węgla",
|
|
14
|
+
"type-contact": "Czujnik kontaktronowy",
|
|
11
15
|
"type-ct": "Temperatura barwowa",
|
|
12
16
|
"type-dimmer": "opornik",
|
|
13
17
|
"type-door": "drzwi",
|
|
18
|
+
"type-electricity": "Licznik energii elektrycznej",
|
|
19
|
+
"type-fan": "Wentylator",
|
|
20
|
+
"type-fillLevel": "Poziom napełnienia",
|
|
14
21
|
"type-fireAlarm": "alarm pożarowy",
|
|
15
22
|
"type-floodAlarm": "alarm przeciwpowodziowy",
|
|
23
|
+
"type-flow": "Przepływ",
|
|
16
24
|
"type-gate": "brama",
|
|
17
25
|
"type-hue": "Światło HUE",
|
|
18
26
|
"type-humidity": "wilgotność",
|
|
@@ -27,6 +35,8 @@
|
|
|
27
35
|
"type-media": "głoska bezdźwięczna",
|
|
28
36
|
"type-motion": "ruch",
|
|
29
37
|
"type-percentage": "Procent",
|
|
38
|
+
"type-pressure": "Ciśnienie",
|
|
39
|
+
"type-pump": "Pompa",
|
|
30
40
|
"type-rgb": "Światło RGB",
|
|
31
41
|
"type-rgbSingle": "Pojedyncze światło RGB",
|
|
32
42
|
"type-rgbwSingle": "RGBW jako pojedyncza wartość",
|
|
@@ -34,9 +44,8 @@
|
|
|
34
44
|
"type-socket": "gniazdo",
|
|
35
45
|
"type-temperature": "temperatura",
|
|
36
46
|
"type-thermostat": "termostat",
|
|
37
|
-
"type-
|
|
47
|
+
"type-unknown": "Nieznany",
|
|
38
48
|
"type-vacuumCleaner": "Odkurzacz",
|
|
39
|
-
"type-valve": "zawór",
|
|
40
49
|
"type-volume": "tom",
|
|
41
50
|
"type-volumeGroup": "grupa woluminów",
|
|
42
51
|
"type-warning": "ostrzeżenie",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type-Device type": "Tipo de dispositivo",
|
|
3
3
|
"type-airCondition": "Ar condicionado",
|
|
4
|
+
"type-airPurifier": "Purificador de ar",
|
|
5
|
+
"type-airQuality": "Qualidade do ar",
|
|
4
6
|
"type-blind": "persianas",
|
|
5
7
|
"type-blindButtons": "Persiana controlada por botões",
|
|
6
8
|
"type-button": "botão",
|
|
@@ -8,11 +10,17 @@
|
|
|
8
10
|
"type-camera": "câmera",
|
|
9
11
|
"type-chart": "Gráfico",
|
|
10
12
|
"type-cie": "Luz colorida CIE",
|
|
13
|
+
"type-coAlarm": "Alarme de monóxido de carbono",
|
|
14
|
+
"type-contact": "Sensor de contato",
|
|
11
15
|
"type-ct": "Temperatura de cor",
|
|
12
16
|
"type-dimmer": "dimmer",
|
|
13
17
|
"type-door": "porta",
|
|
18
|
+
"type-electricity": "Medidor de energia",
|
|
19
|
+
"type-fan": "Ventilador",
|
|
20
|
+
"type-fillLevel": "Nível de enchimento",
|
|
14
21
|
"type-fireAlarm": "alarme de incêndio",
|
|
15
22
|
"type-floodAlarm": "alarme de inundação",
|
|
23
|
+
"type-flow": "Vazão",
|
|
16
24
|
"type-gate": "portão",
|
|
17
25
|
"type-hue": "Luz HUE",
|
|
18
26
|
"type-humidity": "umidade",
|
|
@@ -27,6 +35,8 @@
|
|
|
27
35
|
"type-media": "mídia",
|
|
28
36
|
"type-motion": "movimento",
|
|
29
37
|
"type-percentage": "Percentagem",
|
|
38
|
+
"type-pressure": "Pressão",
|
|
39
|
+
"type-pump": "Bomba",
|
|
30
40
|
"type-rgb": "Luz RGB",
|
|
31
41
|
"type-rgbSingle": "Luz RGB única",
|
|
32
42
|
"type-rgbwSingle": "RGBW como valor único",
|
|
@@ -34,9 +44,8 @@
|
|
|
34
44
|
"type-socket": "soquete",
|
|
35
45
|
"type-temperature": "temperatura",
|
|
36
46
|
"type-thermostat": "termostato",
|
|
37
|
-
"type-
|
|
47
|
+
"type-unknown": "Desconhecido",
|
|
38
48
|
"type-vacuumCleaner": "Aspirador de pó",
|
|
39
|
-
"type-valve": "válvula",
|
|
40
49
|
"type-volume": "volume",
|
|
41
50
|
"type-volumeGroup": "grupo de volume",
|
|
42
51
|
"type-warning": "aviso",
|