@homebridge-plugins/homebridge-smarthq 0.5.0-beta.5 → 0.5.0-beta.6
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/.github/ISSUE_TEMPLATE/config.yml +1 -1
- package/.github/copilot-instructions.md +90 -0
- package/.github/scripts/branch-helper.sh +41 -0
- package/.github/workflows/beta-release.yml +1 -1
- package/.github/workflows/release.yml +56 -16
- package/README.md +15 -0
- package/dist/devices/OpalIceMaker/Managers/OpalProgressSvcManager.d.ts +1 -1
- package/dist/devices/OpalIceMaker/Managers/OpalProgressSvcManager.d.ts.map +1 -1
- package/dist/devices/OpalIceMaker/Managers/OpalProgressSvcManager.js +9 -5
- package/dist/devices/OpalIceMaker/Managers/OpalProgressSvcManager.js.map +1 -1
- package/docs/assets/highlight.css +7 -0
- package/docs/assets/main.js +5 -5
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +251 -229
- package/docs/classes/SmartHQPlatform.html +45 -56
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +22 -12
- package/docs/interfaces/DeviceOptions.html +2 -3
- package/docs/interfaces/SmartHQPlatformConfig.html +6 -17
- package/docs/interfaces/SmartHqContext.html +3 -4
- package/docs/interfaces/SmartHqERDResponse.html +7 -8
- package/docs/interfaces/credentials.html +3 -4
- package/docs/interfaces/devicesConfig.html +7 -8
- package/docs/interfaces/options.html +7 -8
- package/docs/media/copilot-instructions.md +90 -0
- package/docs/modules.html +1 -2
- package/docs/variables/API_URL.html +1 -2
- package/docs/variables/ERD_CODES.html +1 -2
- package/docs/variables/ERD_TYPES.html +1 -2
- package/docs/variables/KEEPALIVE_TIMEOUT.html +1 -2
- package/docs/variables/LOGIN_URL.html +2 -3
- package/docs/variables/OAUTH2_CLIENT_ID.html +1 -2
- package/docs/variables/OAUTH2_CLIENT_SECRET.html +1 -2
- package/docs/variables/OAUTH2_REDIRECT_URI.html +1 -2
- package/docs/variables/PLATFORM_NAME.html +2 -3
- package/docs/variables/PLUGIN_NAME.html +2 -3
- package/docs/variables/SECURE_URL.html +2 -3
- package/docs/variables/default.html +1 -0
- package/package.json +17 -25
- package/typedoc.json +0 -4
- package/vitest.config.ts +6 -5
- package/.github/workflows/build.yml +0 -18
- package/.github/workflows/changerelease.yml +0 -11
- package/.github/workflows/labeler.yml +0 -9
- package/.github/workflows/release-drafter.yml +0 -14
- package/docs/assets/dmt/dmt-component-data.js +0 -1
- package/docs/assets/dmt/dmt-components.css +0 -20
- package/docs/assets/dmt/dmt-components.js +0 -67
- package/docs/assets/dmt/dmt-search.cmp +0 -0
- package/docs/assets/dmt/dmt-theme.css +0 -1
- package/docs/functions/default.html +0 -2
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# GitHub Copilot Instructions for homebridge-smarthq
|
|
2
|
+
|
|
3
|
+
## Branch Management and PR Workflow
|
|
4
|
+
|
|
5
|
+
### Current Project State
|
|
6
|
+
|
|
7
|
+
- **Stable branch**: `latest` (version 0.4.0)
|
|
8
|
+
- **Active beta branch**: `beta-0.5.0` (currently at v0.5.0-beta.4)
|
|
9
|
+
- **Main development**: All new features and non-critical fixes should target `beta-0.5.0`
|
|
10
|
+
- **Critical patches**: For urgent fixes to stable release, may target new `beta-0.4.x` branch
|
|
11
|
+
|
|
12
|
+
### Branch Targeting Requirements
|
|
13
|
+
|
|
14
|
+
All pull requests **MUST** be directed to a beta branch first, never directly to the main branch (`latest`). This ensures proper testing and gradual release management.
|
|
15
|
+
|
|
16
|
+
### Beta Branch Creation
|
|
17
|
+
|
|
18
|
+
If no appropriate beta branch exists, create one based on the next possible version using semantic versioning:
|
|
19
|
+
|
|
20
|
+
1. **Current stable version**: Check `package.json` in the `latest` branch for the current stable version (currently 0.4.0)
|
|
21
|
+
2. **Current beta version**: Check if `beta-0.5.0` exists and is active (currently has v0.5.0-beta.4)
|
|
22
|
+
3. **Determine next version** based on change type:
|
|
23
|
+
- **Patch** (bug fixes): If working on 0.4.x patches → create `beta-0.4.1`
|
|
24
|
+
- **Minor** (new features): Use existing `beta-0.5.0` or create next minor version
|
|
25
|
+
- **Major** (breaking changes): 1.0.0 → create `beta-1.0.0`
|
|
26
|
+
|
|
27
|
+
4. **Create beta branch** from the latest stable branch (if needed):
|
|
28
|
+
```bash
|
|
29
|
+
git fetch origin
|
|
30
|
+
git checkout latest
|
|
31
|
+
git pull origin latest
|
|
32
|
+
git checkout -b beta-X.Y.Z
|
|
33
|
+
git push origin beta-X.Y.Z
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Current Status**: `beta-0.5.0` branch exists and is active with several beta releases (v0.5.0-beta.1 through v0.5.0-beta.4)
|
|
37
|
+
|
|
38
|
+
### Required Labels Before Assignment
|
|
39
|
+
|
|
40
|
+
Before assigning any issue to Copilot, the following labels **MUST** be set to determine the semantic version increment:
|
|
41
|
+
|
|
42
|
+
- **`patch`** - For bug fixes, security patches, documentation updates, and other non-feature changes
|
|
43
|
+
- **`minor`** - For new features, enhancements, and backwards-compatible additions
|
|
44
|
+
- **`major`** - For breaking changes, API changes, and backwards-incompatible modifications
|
|
45
|
+
|
|
46
|
+
### PR Workflow
|
|
47
|
+
|
|
48
|
+
1. **Check for appropriate beta branch**: Look for existing beta branches that match the intended version
|
|
49
|
+
2. **Create beta branch if needed**: If no appropriate beta branch exists, create one as described above
|
|
50
|
+
3. **Target the beta branch**: Always target PRs to the beta branch, not `latest`
|
|
51
|
+
4. **Use semantic versioning**: Ensure the target beta branch version aligns with the change type (patch/minor/major)
|
|
52
|
+
|
|
53
|
+
### Branch Naming Convention
|
|
54
|
+
|
|
55
|
+
- Main development branch: `latest`
|
|
56
|
+
- Beta branches: `beta-X.Y.Z` (e.g., `beta-0.5.0`, `beta-0.4.1`, `beta-1.0.0`)
|
|
57
|
+
- Feature branches: Follow standard naming (e.g., `feature/add-support-for-xyz`, `fix/bug-description`)
|
|
58
|
+
|
|
59
|
+
### Release Process
|
|
60
|
+
|
|
61
|
+
1. **Beta releases**: PRs merge to beta branches → trigger beta release workflow
|
|
62
|
+
2. **Stable releases**: Beta branches merge to `latest` → trigger main release workflow
|
|
63
|
+
|
|
64
|
+
### Examples
|
|
65
|
+
|
|
66
|
+
#### For a Bug Fix (patch):
|
|
67
|
+
- Label: `patch`
|
|
68
|
+
- Target branch: `beta-0.4.1` (for patches to stable 0.4.0) or `beta-0.5.0` (for patches to upcoming 0.5.0)
|
|
69
|
+
- If targeting patches to stable release, create `beta-0.4.1` from `latest`
|
|
70
|
+
- If targeting current development, use existing `beta-0.5.0`
|
|
71
|
+
|
|
72
|
+
#### For a New Feature (minor):
|
|
73
|
+
- Label: `minor`
|
|
74
|
+
- Target branch: `beta-0.5.0` (currently active beta branch)
|
|
75
|
+
- Use existing `beta-0.5.0` branch which is actively receiving minor updates
|
|
76
|
+
|
|
77
|
+
#### For Breaking Changes (major):
|
|
78
|
+
- Label: `major`
|
|
79
|
+
- Target branch: `beta-1.0.0` (if current beta is 0.5.0)
|
|
80
|
+
- Create `beta-1.0.0` from current `beta-0.5.0` or `latest` as appropriate
|
|
81
|
+
|
|
82
|
+
### Validation
|
|
83
|
+
|
|
84
|
+
Before creating any PR, ensure:
|
|
85
|
+
- [ ] Appropriate label (patch/minor/major) is set on the issue
|
|
86
|
+
- [ ] Target beta branch exists or has been created
|
|
87
|
+
- [ ] Beta branch version matches the semantic version implied by the label
|
|
88
|
+
- [ ] All changes are focused and minimal for the specific issue being addressed
|
|
89
|
+
|
|
90
|
+
This workflow ensures proper version management, thorough testing through beta releases, and maintains stability of the main codebase.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Branch Target Helper for homebridge-smarthq
|
|
4
|
+
# This script helps determine which beta branch to target based on change type
|
|
5
|
+
|
|
6
|
+
echo "🏠 Homebridge SmartHQ - Branch Target Helper"
|
|
7
|
+
echo "==========================================="
|
|
8
|
+
echo
|
|
9
|
+
|
|
10
|
+
# Ensure we have the latest remote info
|
|
11
|
+
git fetch origin >/dev/null 2>&1
|
|
12
|
+
|
|
13
|
+
# Get current versions
|
|
14
|
+
STABLE_VERSION=$(git show latest:package.json 2>/dev/null | grep '"version"' | cut -d'"' -f4)
|
|
15
|
+
BETA_BRANCHES=$(git branch -r | grep "origin/beta-" | sed 's/.*origin\///' | sort -V)
|
|
16
|
+
|
|
17
|
+
echo "📊 Current State:"
|
|
18
|
+
echo " Stable version (latest): $STABLE_VERSION"
|
|
19
|
+
echo " Available beta branches:"
|
|
20
|
+
if [ -z "$BETA_BRANCHES" ]; then
|
|
21
|
+
echo " - beta-0.5.0 (active development - v0.5.0-beta.4)"
|
|
22
|
+
else
|
|
23
|
+
for branch in $BETA_BRANCHES; do
|
|
24
|
+
echo " - $branch"
|
|
25
|
+
done
|
|
26
|
+
fi
|
|
27
|
+
echo
|
|
28
|
+
|
|
29
|
+
echo "🎯 Branch Targeting Guide:"
|
|
30
|
+
echo " 🐛 Bug fixes (patch): beta-0.4.1 (patches) or beta-0.5.0 (development)"
|
|
31
|
+
echo " ✨ New features (minor): beta-0.5.0 (active development)"
|
|
32
|
+
echo " 💥 Breaking changes: beta-1.0.0 (create if needed)"
|
|
33
|
+
echo
|
|
34
|
+
|
|
35
|
+
echo "📋 Required Labels:"
|
|
36
|
+
echo " - patch: Bug fixes, security patches, documentation"
|
|
37
|
+
echo " - minor: New features, enhancements"
|
|
38
|
+
echo " - major: Breaking changes, API changes"
|
|
39
|
+
echo
|
|
40
|
+
|
|
41
|
+
echo "⚠️ Remember: ALL PRs must target beta branches, never 'latest' directly!"
|
|
@@ -52,4 +52,4 @@ jobs:
|
|
|
52
52
|
Version `v${{ needs.publish.outputs.NPM_VERSION }}`
|
|
53
53
|
url: "https://github.com/homebridge-plugins/homebridge-smarthq/releases/tag/v${{ needs.publish.outputs.NPM_VERSION }}"
|
|
54
54
|
secrets:
|
|
55
|
-
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_BETA || secrets.DISCORD_WEBHOOK_URL_LATEST }}
|
|
55
|
+
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_BETA || secrets.DISCORD_WEBHOOK_URL_LATEST }}
|
|
@@ -1,35 +1,75 @@
|
|
|
1
|
-
name: Release
|
|
1
|
+
name: Unified Release
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
#- "alpha-*"
|
|
7
|
+
#- "beta-*"
|
|
8
|
+
- latest
|
|
9
|
+
workflow_dispatch:
|
|
6
10
|
|
|
7
11
|
jobs:
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
# 1️⃣ Determine release type, ESM status, and branch name
|
|
13
|
+
determine-release-type:
|
|
14
|
+
uses: homebridge/.github/.github/workflows/determine-release-type.yml@latest
|
|
10
15
|
with:
|
|
11
|
-
|
|
16
|
+
ref_name: ${{ github.ref_name }}
|
|
17
|
+
|
|
18
|
+
# 2️⃣ Update version and changelog using the scripts
|
|
19
|
+
update-version:
|
|
20
|
+
needs: determine-release-type
|
|
21
|
+
uses: homebridge/.github/.github/workflows/update-version.yml@latest
|
|
22
|
+
with:
|
|
23
|
+
release_type: ${{ needs.determine-release-type.outputs.release_type }}
|
|
24
|
+
is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' }}
|
|
12
25
|
secrets:
|
|
13
|
-
|
|
26
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
14
27
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
28
|
+
# 3️⃣ Publish to NPM and create GitHub release
|
|
29
|
+
publish-release:
|
|
30
|
+
needs: [determine-release-type, update-version]
|
|
18
31
|
permissions:
|
|
19
32
|
id-token: write
|
|
20
|
-
|
|
33
|
+
contents: write
|
|
34
|
+
uses: homebridge/.github/.github/workflows/publish-release.yml@latest
|
|
35
|
+
with:
|
|
36
|
+
release_type: ${{ needs.determine-release-type.outputs.release_type }}
|
|
37
|
+
version: ${{ needs.update-version.outputs.version }}
|
|
38
|
+
is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' }}
|
|
39
|
+
secrets:
|
|
40
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
41
|
+
|
|
42
|
+
# 4️⃣ Promote branch if this is a prerelease (alpha/beta)
|
|
43
|
+
promote-branch:
|
|
44
|
+
needs: [determine-release-type, publish-release]
|
|
45
|
+
if: ${{ needs.determine-release-type.outputs.release_type != 'latest' && needs.determine-release-type.outputs.release_type != 'skip' }}
|
|
46
|
+
uses: homebridge/.github/.github/workflows/promote-branch.yml@latest
|
|
47
|
+
with:
|
|
48
|
+
branch_name: ${{ needs.determine-release-type.outputs.branch_name }}
|
|
49
|
+
release_type: ${{ needs.determine-release-type.outputs.release_type }}
|
|
50
|
+
is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' }}
|
|
21
51
|
secrets:
|
|
22
|
-
|
|
52
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
53
|
+
|
|
54
|
+
# 5️⃣ Notify if any previous job fails
|
|
55
|
+
workflow-failure:
|
|
56
|
+
if: ${{ failure() }}
|
|
57
|
+
needs: [determine-release-type, update-version, publish-release, promote-branch]
|
|
58
|
+
uses: homebridge/.github/.github/workflows/report-failure.yml@latest
|
|
59
|
+
with:
|
|
60
|
+
workflow_name: ${{ github.workflow }}
|
|
61
|
+
job_name: ${{ github.job }}
|
|
62
|
+
run_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
23
63
|
|
|
64
|
+
# 6️⃣ Post to Discord
|
|
24
65
|
github-releases-to-discord:
|
|
25
66
|
name: Discord Webhooks
|
|
26
|
-
needs: [
|
|
27
|
-
if: ${{ github.repository == 'homebridge-plugins/homebridge-smarthq' }}
|
|
67
|
+
needs: [determine-release-type, update-version, publish-release]
|
|
28
68
|
uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest
|
|
29
69
|
with:
|
|
30
70
|
title: "SmartHQ Release"
|
|
31
71
|
description: |
|
|
32
|
-
Version `v${{ needs.
|
|
33
|
-
url: "https://github.com/homebridge-plugins/homebridge-smarthq/releases/tag/v${{ needs.
|
|
72
|
+
Version `v${{ needs.update-version.outputs.version }}`
|
|
73
|
+
url: "https://github.com/homebridge-plugins/homebridge-smarthq/releases/tag/v${{ needs.update-version.outputs.version }}"
|
|
34
74
|
secrets:
|
|
35
75
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }}
|
package/README.md
CHANGED
|
@@ -40,3 +40,18 @@ These are the events that are currently supported:
|
|
|
40
40
|
- Filter Maintenance Change Alert
|
|
41
41
|
- Descale Needed Alert
|
|
42
42
|
- Add Water Alert
|
|
43
|
+
|
|
44
|
+
## Contributing
|
|
45
|
+
|
|
46
|
+
This project uses a beta-first workflow for all contributions:
|
|
47
|
+
|
|
48
|
+
- 🎯 **All PRs must target beta branches first**, never the main `latest` branch
|
|
49
|
+
- 🏷️ **Required labels**: Set `patch`, `minor`, or `major` labels before assigning issues to Copilot
|
|
50
|
+
- 🌿 **Current beta branch**: `beta-0.5.0` (active development)
|
|
51
|
+
|
|
52
|
+
For detailed contribution guidelines, see [.github/copilot-instructions.md](.github/copilot-instructions.md).
|
|
53
|
+
|
|
54
|
+
Use the branch helper tool to determine the correct target branch:
|
|
55
|
+
```bash
|
|
56
|
+
.github/scripts/branch-helper.sh
|
|
57
|
+
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { devicesConfig, SmartHqContext, SmartHQPlatform } from '../../../index.js';
|
|
1
2
|
import type { PlatformAccessory, Service } from 'homebridge';
|
|
2
|
-
import type { SmartHQPlatform, devicesConfig, SmartHqContext } from '../../../index.js';
|
|
3
3
|
import { OpalDeviceBase } from '../OpalDeviceBase.js';
|
|
4
4
|
export declare class OpalProgressSvcManager extends OpalDeviceBase {
|
|
5
5
|
readonly platform: SmartHQPlatform;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpalProgressSvcManager.d.ts","sourceRoot":"","sources":["../../../../src/devices/OpalIceMaker/Managers/OpalProgressSvcManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"OpalProgressSvcManager.d.ts","sourceRoot":"","sources":["../../../../src/devices/OpalIceMaker/Managers/OpalProgressSvcManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAI5D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIxD,qBAAa,sBAAuB,SAAQ,cAAc;IAWtD,QAAQ,CAAC,QAAQ,EAAE,eAAe;IAC3B,SAAS,EAAE,iBAAiB,CAAC,cAAc,CAAC;IACnD,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,aAAa;IAZpD,uBAAuB,EAAE,MAAM,EAAE,CAGvC;IAEM,WAAW,EAAE,MAAM,CAAkB;IACrC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAO;IACrC,OAAO,CAAC,cAAc,CAAiB;gBAG5B,QAAQ,EAAE,eAAe,EAC3B,SAAS,EAAE,iBAAiB,CAAC,cAAc,CAAC,EAC1C,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,aAAa;IAgB3D,OAAO,CAAC,aAAa;IA8CrB,UAAU,IAAI,OAAO;IAIR,yBAAyB;YAuBxB,kBAAkB;CAqBjC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Buffer } from 'node:buffer';
|
|
2
|
-
import { ERD_TYPES } from '../../../index.js';
|
|
3
2
|
import { OpalDeviceBase } from '../OpalDeviceBase.js';
|
|
3
|
+
import { ERD_TYPES } from '../../../index.js';
|
|
4
4
|
export class OpalProgressSvcManager extends OpalDeviceBase {
|
|
5
5
|
platform;
|
|
6
6
|
accessory;
|
|
7
7
|
device;
|
|
8
8
|
advancedOptionQueryStrs = [
|
|
9
9
|
'device=opal&label=Production_Duration_Minutes&indicator=opalProductionLimit&type=number&defaultValue=0&placeholder=Number._0_for_Infinite',
|
|
10
|
-
'device=opal&label=HKC_Progress_Complete_Notification_Path&indicator=oplHKCProgressCompleteNotificationPath'
|
|
10
|
+
'device=opal&label=HKC_Progress_Complete_Notification_Path&indicator=oplHKCProgressCompleteNotificationPath',
|
|
11
11
|
];
|
|
12
12
|
serviceName = 'Opal Progress';
|
|
13
13
|
service = null;
|
|
@@ -45,7 +45,7 @@ export class OpalProgressSvcManager extends OpalDeviceBase {
|
|
|
45
45
|
// Configure Active characteristic
|
|
46
46
|
this.service.getCharacteristic(this.platform.Characteristic.Active)
|
|
47
47
|
.setProps({
|
|
48
|
-
perms: [
|
|
48
|
+
perms: ['ev', 'pr'],
|
|
49
49
|
});
|
|
50
50
|
// Configure RotationSpeed characteristic
|
|
51
51
|
this.service.getCharacteristic(this.platform.Characteristic.RotationSpeed)
|
|
@@ -55,7 +55,7 @@ export class OpalProgressSvcManager extends OpalDeviceBase {
|
|
|
55
55
|
minStep: 1,
|
|
56
56
|
minValue: 0,
|
|
57
57
|
maxValue: 100,
|
|
58
|
-
perms: [
|
|
58
|
+
perms: ['ev', 'pr'],
|
|
59
59
|
})
|
|
60
60
|
.removeOnGet()
|
|
61
61
|
.removeOnSet()
|
|
@@ -92,7 +92,11 @@ export class OpalProgressSvcManager extends OpalDeviceBase {
|
|
|
92
92
|
const productionValueMinutes = Buffer.from(erdVal, 'hex').readUInt8(0);
|
|
93
93
|
const completionistMsg = productionValueMinutes > 100 ? `, Completion: ${productionValueMinutes}` : '';
|
|
94
94
|
this.platform.debugSuccessLog(`Production: ${productionValueMinutes}, Limit: ${this.platform.config.deviceOptions?.opal?.opalProductionLimit}${completionistMsg}`);
|
|
95
|
-
const
|
|
95
|
+
const opalProductionLimit = this.platform.config.deviceOptions?.opal?.opalProductionLimit;
|
|
96
|
+
let productionValueProgressBar = 0;
|
|
97
|
+
if (typeof opalProductionLimit === 'number' && opalProductionLimit > 0) {
|
|
98
|
+
productionValueProgressBar = Math.floor((100 / opalProductionLimit) * productionValueMinutes);
|
|
99
|
+
}
|
|
96
100
|
return [productionValueProgressBar, productionValueMinutes];
|
|
97
101
|
}
|
|
98
102
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpalProgressSvcManager.js","sourceRoot":"","sources":["../../../../src/devices/OpalIceMaker/Managers/OpalProgressSvcManager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"OpalProgressSvcManager.js","sourceRoot":"","sources":["../../../../src/devices/OpalIceMaker/Managers/OpalProgressSvcManager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjC,MAAM,OAAO,sBAAuB,SAAQ,cAAc;IAW7C;IACF;IACE;IAZJ,uBAAuB,GAAa;QACzC,2IAA2I;QAC3I,4GAA4G;KAC7G,CAAA;IAEM,WAAW,GAAW,eAAe,CAAA;IACrC,OAAO,GAAmB,IAAI,CAAA;IAC7B,cAAc,GAAG,cAAc,CAAA;IAEvC,YACW,QAAyB,EAC3B,SAA4C,EAC1C,MAAgD;QAEzD,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;QAJzB,aAAQ,GAAR,QAAQ,CAAiB;QAC3B,cAAS,GAAT,SAAS,CAAmC;QAC1C,WAAM,GAAN,MAAM,CAA0C;QAIzD,IAAI,QAAQ,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;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C,oCAAoC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAA;YAC9E,mCAAmC;YACnC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACf,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
:root {
|
|
2
|
+
--light-hl-0: #795E26;
|
|
3
|
+
--dark-hl-0: #DCDCAA;
|
|
2
4
|
--light-code-background: #FFFFFF;
|
|
3
5
|
--dark-code-background: #1E1E1E;
|
|
4
6
|
}
|
|
5
7
|
|
|
6
8
|
@media (prefers-color-scheme: light) { :root {
|
|
9
|
+
--hl-0: var(--light-hl-0);
|
|
7
10
|
--code-background: var(--light-code-background);
|
|
8
11
|
} }
|
|
9
12
|
|
|
10
13
|
@media (prefers-color-scheme: dark) { :root {
|
|
14
|
+
--hl-0: var(--dark-hl-0);
|
|
11
15
|
--code-background: var(--dark-code-background);
|
|
12
16
|
} }
|
|
13
17
|
|
|
14
18
|
:root[data-theme='light'] {
|
|
19
|
+
--hl-0: var(--light-hl-0);
|
|
15
20
|
--code-background: var(--light-code-background);
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
:root[data-theme='dark'] {
|
|
24
|
+
--hl-0: var(--dark-hl-0);
|
|
19
25
|
--code-background: var(--dark-code-background);
|
|
20
26
|
}
|
|
21
27
|
|
|
28
|
+
.hl-0 { color: var(--hl-0); }
|
|
22
29
|
pre, code { background: var(--code-background); }
|