Add support for Caleo C947 floor heating#4590
Conversation
Add support for Caleo C947 floor heating
| - id: 103 | ||
| type: boolean | ||
| name: switch | ||
| readonly: true No newline at end of file |
There was a problem hiding this comment.
A read-only switch does not make sense.
Use a binary_sensor, with class: power instead of name.
| mapping: | ||
| - scale: 10 | ||
| step: 5 | ||
| range: |
There was a problem hiding this comment.
There is no point in setting an incorrect range on the dp level only to override it in the default and only mapping. It is better to set the correct values above and remove this range.
There was a problem hiding this comment.
same as before - 0.5C step, so should use mapping
There was a problem hiding this comment.
The range is for the Tuya protocol side only. There are not two separate ranges for the Tuya protocol side and the HA side, there is just one range and it gets scaled by the scale factor for the HA side mapping.
So you should remove this range, and change the range above to min: 50, max: 300
| - dps_val: true | ||
| value: heat | ||
| - id: 2 | ||
| type: float |
There was a problem hiding this comment.
Should be an integer, Tuya devices do not generally use floating point.
There was a problem hiding this comment.
this device has 0.5C step, so integer is not possible
There was a problem hiding this comment.
The device only has a 0.5 step on the HA side after the scale: 10 in the mapping is applied. On the Tuya side the step is 5, and the representation is an integer.
| min: 50 | ||
| max: 300 | ||
| - id: 3 | ||
| type: float |
There was a problem hiding this comment.
This is also only on the HA side after the scale is applied. The definition here is for the Tuya protocol side before scaling, where the type is integer.
There was a problem hiding this comment.
ok, but how to fix this in HA? I saw 217 instead of 21.7
| type: boolean | ||
| name: lock | ||
| - entity: number | ||
| name: Brightness |
There was a problem hiding this comment.
Use a light entity with brightness dp (and probably translation_key: display instead of the explicit icon)
There was a problem hiding this comment.
Sorry, can not understand how to do that. I just copied this one
There was a problem hiding this comment.
- entity: light
translation_key: display
category: config
dps:
- id: 102
type: integer
name: brightness
range:
min: 0
max: 100
No description provided.