Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supporte roborock fan speed #707

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/localize/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,15 @@
"label": "Fan speed",
"value": {
"silent": "Silent",
"quiet": "Quiet",
"gentle": "Gentle",
"standard": "Standard",
"balanced": "Balanced",
"medium": "Medium",
"turbo": "Turbo",
"max": "Max",
"auto": "Auto",
"gentle": "Gentle"
"custom": "Custom"
}
},
"sensor_dirty_left": {
Expand Down
8 changes: 6 additions & 2 deletions src/localize/languages/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,16 @@
"fan_speed": {
"label": "מהירות מאוורר",
"value": {
"silent": "שקט",
"silent": "חרישי",
"quiet": "שקט",
"gentle": "עדין",
"standard": "סטנדרט",
"balanced": "מאוזן",
"medium": "בינוני",
"turbo": "טורבו",
"max": "מקסימום",
"auto": "אוטומט",
"gentle": "עדין"
"custom": "מותאם"
}
},
"sensor_dirty_left": {
Expand Down
6 changes: 5 additions & 1 deletion src/model/generators/icon-list-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,18 @@ class IconsGeneratorContext {
export class IconListGenerator {
private static _ICON_MAPPING = {
Silent: "mdi:fan-remove",
Quiet: "mdi:waves",
Gentle: "mdi:waves",
Basic: "mdi:fan-speed-1",
Balanced: "mdi:fan-speed-1",
Standard: "mdi:fan-speed-1",
Strong: "mdi:fan-speed-2",
Medium: "mdi:fan-speed-2",
"Full Speed": "mdi:fan-speed-3",
Turbo: "mdi:fan-speed-3",
Max: "mdi:fan-speed-3",
Auto: "mdi:fan-auto",
Gentle: "mdi:waves",
Custom: "mdi:waves",
};

public static async generate(
Expand Down
15 changes: 13 additions & 2 deletions src/model/generators/tiles-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,18 @@ export class TilesGenerator {
attribute: "fan_speed",
icon: "mdi:fan",
translations: TilesGenerator.generateTranslationKeys(
["silent", "standard", "medium", "turbo", "auto", "gentle"],
[
"silent",
"standard",
"medium",
"turbo",
"auto",
"gentle",
"quiet",
"balanced",
"max",
"custom",
],
"fan_speed",
language,
),
Expand Down Expand Up @@ -310,4 +321,4 @@ export function sortTiles(t1: TileConfig, t2: TileConfig): number {
if (t2.order === undefined)
return -1;
return t1.order - t2.order;
}
}
Loading