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

Madimack Elite V3 Pool heatpump with updated dps mappings #1691

Merged
merged 12 commits into from
Mar 3, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
name: Pool heatpump
products:
- id: kwrvh8zwvbbyp086
name: Madimack Elite V3 40kW
primary_entity:
entity: climate
dps:
- id: 101
name: hvac_mode
type: boolean
mapping:
- dps_val: false
value: "off"
- dps_val: true
constraint: mode
conditions:
- dps_val: auto
value: auto
- dps_val: cold
value: cool
- dps_val: heating
value: heat
- id: 102
name: mode
type: string
hidden: true
- id: 104
name: temperature
type: integer
mapping:
- constraint: temperature_unit
conditions:
- dps_val: f
range:
min: 54
max: 104
range:
min: 12
max: 40
- id: 105
name: preset_mode
type: string
translation_key: madimack_presets
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think device specific translation keys are the way to go. There are currently 627 configs which is a lot of individual icon customisation.

It is better to group into common functionality. Pool heatpumps fairly commonly support "quiet" "quick" and "smart" presets, though many of them annoyingly have separate presets for cooling and heating modes, and I think we can group these together for both translations and icons.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep - I gave it a crack to see if it would work on my end and no go. I'll revert the changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes reverted. Apologies - being github newbie I suspect my code editing was causing trouble on the main repository - apologies if it was.

I have:
Reverted all changes in icons.json in my fork
Erased any reference to custom icons in the device file, and put the heatpump presets to generic translateable names.
Changed the name of the device to generic "Pool heatpump"
Added a product ID code, although I think it is duplicated
Added a Fault code DPS as a bitfield
Added, but then removed a secondary device to change temperature units in the tuya backend, after confirming changing the units did not change the functionality with HA. The end user could change the units on their machine and HA will translate.

mapping:
- dps_val: silence
value: Silence
- dps_val: perfect
value: Perfect
- dps_val: power
value: Power
- id: 106
name: temperature_unit
make-all marked this conversation as resolved.
Show resolved Hide resolved
type: string
mapping:
- dps_val: f
value: F
- dps_val: c
value: C
- id: 110
type: integer
name: max_temperature
- id: 111
type: integer
name: min_temperature
- id: 117
name: current_temperature
type: integer
secondary_entities:
- entity: sensor
category: diagnostic
name: Power level
class: power_factor
dps:
- id: 109
type: integer
name: sensor
unit: "%"
- entity: sensor
category: diagnostic
name: External coil temperature
class: temperature
dps:
- id: 112
type: integer
name: sensor
- id: 106
name: unit
type: string
mapping:
- dps_val: f
value: F
- dps_val: c
value: C
- entity: sensor
category: diagnostic
name: Exhaust temperature
class: temperature
dps:
- id: 113
name: sensor
type: integer
- id: 106
name: unit
type: string
mapping:
- dps_val: f
value: F
- dps_val: c
value: C
- entity: sensor
category: diagnostic
name: Outlet water temperature
class: temperature
dps:
- id: 114
name: sensor
type: integer
- id: 106
name: unit
type: string
mapping:
- dps_val: f
value: F
- dps_val: c
value: C
- entity: sensor
category: diagnostic
name: Ambient temperature
class: temperature
dps:
- id: 115
name: sensor
type: integer
- id: 106
name: unit
type: string
mapping:
- dps_val: f
value: F
- dps_val: c
value: C
- entity: sensor
category: diagnostic
name: Return air temperature
class: temperature
dps:
- id: 118
name: sensor
type: integer
- id: 106
name: unit
type: string
mapping:
- dps_val: f
value: F
- dps_val: c
value: C
- entity: sensor
category: diagnostic
name: Inner coil temperature
class: temperature
dps:
- id: 119
name: sensor
type: integer
- id: 106
name: unit
type: string
mapping:
- dps_val: f
value: F
- dps_val: c
value: C
- entity: sensor
category: diagnostic
name: Cooling plate temperature
class: temperature
dps:
- id: 120
name: sensor
type: integer
- id: 106
name: unit
type: string
mapping:
- dps_val: f
value: F
- dps_val: c
value: C
- entity: sensor
category: diagnostic
name: EEV opening
dps:
- id: 121
name: sensor
type: integer
- entity: sensor
category: diagnostic
name: Fault code
dps:
- id: 107
name: sensor
type: bitfield
15 changes: 15 additions & 0 deletions custom_components/tuya_local/icons.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,21 @@
"anti_frost": {
"default": "mdi:snowflake-melt"
}
},
"climate": {
"madimack_presets": {
"state_attributes": {
"preset_mode": {
"default": "mdi:confused",
"state": {
"silence": "mdi:weather-night",
"perfect": "mdi:weather-sunny",
"power": "mdi:sun-thermometer"
}
}
}
}
}
}
}