Skip to content

Commit

Permalink
Basic implementation of controls for DM
Browse files Browse the repository at this point in the history
Fixed colors of Card in DM
  • Loading branch information
GermanBluefox committed Jan 24, 2025
1 parent d603154 commit 87cc603
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@alcalzone/release-script-plugin-license": "^3.7.0",
"@alcalzone/release-script-plugin-lerna": "^3.7.0",
"@iobroker/types": "^7.0.6",
"@iobroker/dm-utils": "^1.0.7",
"@iobroker/dm-utils": "^1.0.8",
"lerna": "^8.1.9"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/admin/src-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@foxriver76/iob-component-lib": "^0.2.0",
"@honkhonk/vite-plugin-svgr": "^1.1.0",
"@iobroker/admin-component-easy-access": "^1.0.11",
"@iobroker/dm-utils": "^1.0.7",
"@iobroker/dm-utils": "^1.0.8",
"@iobroker/socket-client": "^4.0.0",
"@originjs/vite-plugin-commonjs": "^1.0.3",
"@react-leaflet/core": "^2.1.0",
Expand Down Expand Up @@ -103,5 +103,5 @@
}
]
],
"version": "7.4.16"
"version": "7.4.17"
}
2 changes: 1 addition & 1 deletion packages/dm-gui-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@
},
"devDependencies": {
"@craco/craco": "^7.1.0",
"@iobroker/dm-utils": "^1.0.7"
"@iobroker/dm-utils": "^1.0.8"
}
}
2 changes: 0 additions & 2 deletions packages/dm-gui-components/src/DeviceControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export default class DeviceControlComponent extends Component<DeviceControlProps
if (min === undefined) {
max = 100;
}
// @ts-expect-error types are implemented in dm-utils
let step: number | undefined = this.props.control.step;
if (step === undefined) {
step = obj.common.step;
Expand Down Expand Up @@ -111,7 +110,6 @@ export default class DeviceControlComponent extends Component<DeviceControlProps
this.setState({
min,
max,
// @ts-expect-error types are implemented in dm-utils
step: this.props.control.step === undefined ? (max - min) / 100 : this.props.control.step,
unit: this.props.control.unit || '',
});

Check warning

Code scanning / CodeQL

Potentially inconsistent state update Warning

Component state update uses
potentially inconsistent value
.
Component state update uses
potentially inconsistent value
.
Component state update uses
potentially inconsistent value
.
Expand Down

0 comments on commit 87cc603

Please sign in to comment.