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

Add Thermoval TVT 40 WiFi Thermostat #1421

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

madpeteguy
Copy link

name: fault
type: integer
- id: 5
name: room_temperature
Copy link
Owner

Choose a reason for hiding this comment

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

Should be current_temperature to make it available through the climate card.

Copy link
Owner

Choose a reason for hiding this comment

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

You may want to make this conditionally redirect to floor_temperature when sensor_select is "0", the config will be more complex, but the UI might make more sense in terms of offset between the set temperature and current temperature. If you do this, then keep the room temperature separate sensor, so that it is always available regardless of the sensor select setting.

icon: "mdi:hand-back-right-off"
- dps_val: false
icon: "mdi:hand-back-right"
- entity: number
Copy link
Owner

Choose a reason for hiding this comment

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

Duplicates of what is already covered in the climate entity (temperature, current_temperature, preset_mode, hvac_mode, hvac_action) should not be added as secondary entities.

value: manual
icon: "mdi:cursor-pointer"
- id: 4
name: fault
Copy link
Owner

Choose a reason for hiding this comment

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

I would call this fault_code, and add a binary_sensor for it as well, that maps 0 to false, and any other value to true. The binary sensor should be more convenient to use in automations and for an indication in the UI that there is a fault, and the attribute here gives access to the full fault code for reference.

type: integer
mapping:
- scale: 10
- id: 7
Copy link
Owner

Choose a reason for hiding this comment

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

Attributes that are not used in the climate platform, and have separate entities under secondary_entities should not be listed here. Basically the attributes listed under climate should fall under one of the following:

  1. standard attributes of the climate platform
  2. attributes that are used in conditions to create advanced behavior
  3. read-only attributes that do not make sense as separate entities on their own

- id: 9
name: hvac_mode
type: boolean
readonly: true
Copy link
Owner

Choose a reason for hiding this comment

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

hvac_mode should not be read-only. If this is really read-only, rename this attribute (I guess the original tuya name is work_mode, which would be appropriate) to avoid buttons that cannot be used in the UI (the mode will then always show as auto).

@madpeteguy
Copy link
Author

@make-all Thanks for review!

It's been six months since I created this configuration, I've forgotten a lot. 🤯
But I got tired of catching up with own configuration file after each plugin update, although I could mount it via docker.
I'll check with the suggestions when I find some free time, probably after the new year.

Anyway, it's based on another device's configuration that someone provided somewhere as a workaround, but I can't find that entry. The replacement worked fine with the basic functionality of the thermostat.
I upgraded it a bit to make most of the functionality of the TVT 40 device available in HA.
Mainly displaying cooling mode (without hacks like overriding hvac_mode it always displayed heating, if i remember correctly it had problems with writing to id:9 so read only seemed right).
Also temperature reading for sensor_select = "2" with limits for both sensors, where one has a common weekly schedule in auto mode or a fixed value in manual mode, and a separate value for the other sensor.

Thermostate cards do not support such a combo, I'm fine with apexchart:
obraz
It is controlled with entities card (i think it might be the reason for sensor duplication):
obraz

Thermostate card hide so much info...
obraz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 Stalled
Development

Successfully merging this pull request may close these issues.

None yet

2 participants