diff --git a/gulpfile.js b/gulpfile.js index 34bd08c..01401de 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -12,6 +12,8 @@ const gulpHelper = require('@iobroker/vis-2-widgets-react-dev/gulpHelper'); gulpHelper.gulpTasks(gulp, adapterName, __dirname, `${__dirname}/src-widgets/`, [ `${__dirname}/src-widgets/build/static/js/*echarts-for-react_lib_core_js-node_modules_echarts_core*.*`, + `${__dirname}/src-widgets/build/static/js/*spectrum_color_dist_import_mjs*.*`, + `${__dirname}/src-widgets/build/static/js/*uiw_react-color-shade-slider*.*`, ]); gulp.task('default', gulp.series('widget-build')); \ No newline at end of file diff --git a/io-package.json b/io-package.json index 1f2b5b9..2e3038e 100644 --- a/io-package.json +++ b/io-package.json @@ -136,6 +136,7 @@ "Switches", "Blinds", "Clock", + "RGBLight", "SimpleState", "ViewInWidget", "Camera", diff --git a/src-widgets/package.json b/src-widgets/package.json index 55b08fe..bc2dd8b 100644 --- a/src-widgets/package.json +++ b/src-widgets/package.json @@ -8,7 +8,7 @@ "@craco/craco": "^7.1.0", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", - "@iobroker/adapter-react-v5": "^4.4.7", + "@iobroker/adapter-react-v5": "^4.5.0", "@iobroker/vis-2-widgets-react-dev": "^0.4.6", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.5", @@ -42,7 +42,7 @@ "react-icons": "^4.10.1", "react-leaflet": "^4.2.1", "react-scripts": "^5.0.1", - "sass": "^1.65.1", + "sass": "^1.66.0", "uuid": "^9.0.0" }, "scripts": { @@ -64,4 +64,4 @@ "not ie <= 11", "not op_mini all" ] -} +} \ No newline at end of file diff --git a/src-widgets/src/RGBLight.jsx b/src-widgets/src/RGBLight.jsx index ab017f3..74f1d4a 100644 --- a/src-widgets/src/RGBLight.jsx +++ b/src-widgets/src/RGBLight.jsx @@ -35,6 +35,8 @@ const styles = () => ({ const stateRoles = { 'switch.light': 'switch', + switch: 'switch', + 'level.brightness': 'brightness', 'level.dimmer': 'brightness', 'level.color.red': 'red', 'level.color.green': 'green', @@ -70,7 +72,7 @@ const loadStates = async (field, data, changeData, socket) => { class RGBLight extends Generic { constructor(props) { super(props); - this.state.dialog = true; + this.state.dialog = false; this.state.objects = {}; this.state.colorTemperatures = []; this.sketch = false; @@ -342,11 +344,12 @@ class RGBLight extends Generic { renderSwitch() { return this.state.objects.switch &&