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

Added file for new device: Eurom Sani towel radiator #1810

Merged
merged 16 commits into from
Apr 27, 2024
Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Eurom Sani-Bathroom-Radiator Towel Wifi heater
primary_entity:
make-all marked this conversation as resolved.
Show resolved Hide resolved
entity: climate
translation_key: heater
dps:
- id: 1
type: boolean
name: hvac_mode
mapping:
- dps_val: false
value: "off"
- dps_val: true
constraint: mode
conditions:
- dps_val: "r"
value: "heat"
- dps_val: "t"
value: "dry"
icon: "mdi:hanger"
- id: 2
type: integer
name: temperature
range:
min: 0
max: 37
mapping:
- constraint: mode
conditions:
- dps_val: "t"
value_redirect: towel_dry_temperature
range:
min: 40
max: 70
- id: 333
# dummy variable for current temperature of
Copy link
Owner

Choose a reason for hiding this comment

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

Use one of the actual dps instead of making one up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's the point, I need to create an entity that doesn't exist, since the others (heater_temperature:105 and room_temperature:3) are already used. And the "current_temperature" that is used depends on the operation mode:2. I could use one of the above as the base entity (let's say heater_temperature), but then that one behaves rather strange in the logging. So the current_temperature entity is the actual temperature as used by the internal control loop, corresponding to the mode of operation.
If there is another option to create an entity without a dps id, I'd like to use that, but for now, this seems to be the only workaround.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or is it possible to use the same dp id in both the primary and secondary entities? That would allow the actual values to be used (heater surface temperature and room temperature) as individual sensors (nice for making graphs) and use either of the two as the current temperature in the climate/heater device. That would be most elegant and correct I think.

Copy link
Owner

Choose a reason for hiding this comment

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

Yes, it is possible to reuse the same dp in another entity, or even in the same entity with a different name. Making secondary sensor entities for both temperatures would make them easier to work with than as non-standard attributes on the climate entity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made a change accordingly.

# current mode (room / towel) while keeping
# both measured values available
type: integer
name: current_temperature
optional: true
# read_only: true
mapping:
- constraint: mode
conditions:
- dps_val: "t"
value_mirror: heater_temperature
- dps_val: "r"
value_mirror: room_temperature
- id: 3
type: integer
name: room_temperature
- id: 12
name: error
type: bitfield
mapping:
- dps_val: 0
value: "OK"
- id: 101
type: string
name: hvac_action
mapping:
- dps_val: true
constraint: mode
conditions:
- dps_val: "r"
value: heating
- dps_val: "t"
value: drying
- dps_val: false
value: idle
constraint: hvac_mode
conditions:
- dps_val: false
value: "off"
- id: 4
name: mode
type: string
mapping:
- dps_val: r
value: room
- dps_val: t
value: towel
- id: 105
name: heater_temperature
type: integer
optional: true
- id: 106
name: towel_dry_temperature
type: integer
hidden: true
optional: true
range:
min: 40
max: 70
- id: 102
name: preset_mode
type: boolean
mapping:
- dps_val: false
constraint: frost_mode
conditions:
- dps_val: false
value: "none"
- dps_val: true
# todo; icon
value: "Anti-frost"
- dps_val: true
value: "eco"
Copy link
Owner

Choose a reason for hiding this comment

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

The true case should also have constraint and conditions to ensure the two values are always set together.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The true case should also have constraint and conditions to ensure the two values are always set together.

That appears to be a bit of a problem. When one of the modes is on, to switch to the other, the first should first be switched off. So Eco to Anti-frost switching should first switch Eco off, then in a next all switch Anti-frost on.

- id: 103
name: frost_mode
type: boolean
hidden: true