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

ME81 Thermostat Valve State is missing #1709

Closed
horstvogel opened this issue Mar 5, 2024 · 9 comments
Closed

ME81 Thermostat Valve State is missing #1709

horstvogel opened this issue Mar 5, 2024 · 9 comments

Comments

@horstvogel
Copy link

The ME81 Thermostat is working fine, but the valve state is missing
thanks

{ "code": "valve_state", "name": "阀门状态", "type": "Enum", "values": "{\"range\":[\"open\",\"close\"]}"

@horstvogel horstvogel added the bug Something isn't working label Mar 5, 2024
@make-all make-all removed the bug Something isn't working label Mar 5, 2024
@make-all
Copy link
Owner

make-all commented Mar 5, 2024

The valve state is not missing, it is mapped to hvac_action.

@make-all make-all closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2024
@horstvogel
Copy link
Author

Ok, thanks.
I cant find the valve state

image

@make-all
Copy link
Owner

make-all commented Mar 7, 2024

If you attach the diagnostics for the device, I might be able to see more clearly why the hvac_action is not showing as expected.

@horstvogel
Copy link
Author

horstvogel commented Mar 7, 2024

Hello make-all,
attached is my diagnosis of the device

Thanks!

`{
"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2024.2.5",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.12.1",
"docker": true,
"arch": "x86_64",
"timezone": "Europe/Berlin",
"os_name": "Linux",
"os_version": "6.6.16-haos",
"supervisor": "2024.02.1",
"host_os": "Home Assistant OS 12.0",
"docker_version": "24.0.7",
"chassis": "embedded",
"run_as_root": true
},

}

},
"integration_manifest": {
"domain": "tuya_local",
"name": "Tuya Local",
"codeowners": [
"@make-all"
],
"config_flow": true,
"dependencies": [],
"documentation": "https://github.com/make-all/tuya-local",
"integration_type": "device",
"iot_class": "local_push",
"issue_tracker": "https://github.com/make-all/tuya-local/issues",
"requirements": [
"tinytuya==1.13.2"
],
"version": "2024.3.1",
"is_built_in": false
},
"data": {
"name": "Lager-1.OG Einzelb\u00fcro",
"type": "avatto_me81_thermostat",
"device_id": "REDACTED",
"device_cid": "",
"local_key": "REDACTED",
"host": "REDACTED",
"protocol_version": "auto",
"tinytuya_version": "1.13.2",
"api_version_set": 3.3,
"api_version_used": 3.3,
"api_working": true,
"status": {},
"cached_state": {
"updated_at": 1709787669.9578216,
"1": true,
"2": "manual",
"10": true,
"16": 30,
"19": 30,
"24": 210,
"26": 12,
"27": -2,
"36": "open",
"39": true,
"40": true,
"43": "in",
"45": 0,
"101": 1,
"102": "00"
},
"pending_state": {},
"connected": true,
"force_dps": [],
"home_assistant": {
"name": "Lager-1.OG Einzelb\u00fcro",
"name_by_user": null,
"disabled": false,
"disabled_by": null,
"entities": [
{
"disabled": false,
"disabled_by": null,
"entity_category": "diagnostic",
"device_class": null,
"original_device_class": "problem",
"icon": null,
"unit_of_measurement": null,
"state": {
"entity_id": "binary_sensor.lager_1_og_einzelburo_problem",
"state": "off",
"attributes": {
"fault_code": 0,
"device_class": "problem",
"friendly_name": "Lager-1.OG Einzelb\u00fcro Problem"
},
"last_changed": "2024-03-05T17:13:50.272308+00:00",
"last_updated": "2024-03-05T17:13:50.272308+00:00"
}
},
{
"disabled": false,
"disabled_by": null,
"entity_category": "config",
"device_class": null,
"original_device_class": null,
"icon": null,
"unit_of_measurement": null,
"state": {
"entity_id": "select.lager_1_og_einzelburo_temperature_sensor",
"state": "Internal",
"attributes": {
"options": [
"Internal",
"External",
"Both"
],
"icon": "mdi:home-thermometer",
"friendly_name": "Lager-1.OG Einzelb\u00fcro Temperature sensor"
},
"last_changed": "2024-03-05T17:13:50.297281+00:00",
"last_updated": "2024-03-05T17:13:50.297281+00:00"
}
},
{
"disabled": false,
"disabled_by": null,
"entity_category": "config",
"device_class": null,
"original_device_class": null,
"icon": null,
"unit_of_measurement": null,
"state": {
"entity_id": "select.lager_1_og_einzelburo_program_type",
"state": "Disabled",
"attributes": {
"options": [
"Disabled",
"Weekdays+Weekend",
"Six working days",
"Daily"
],
"icon": "mdi:calendar-week",
"friendly_name": "Lager-1.OG Einzelb\u00fcro Program type"
},
"last_changed": "2024-03-05T17:13:50.297685+00:00",
"last_updated": "2024-03-05T17:13:50.297685+00:00"
}
},
{
"disabled": false,
"disabled_by": null,
"entity_category": "config",
"device_class": null,
"original_device_class": "temperature",
"icon": null,
"unit_of_measurement": "\u00b0C",
"state": {
"entity_id": "number.lager_1_og_einzelburo_maximum_temperature",
"state": "30",
"attributes": {
"min": 30.0,
"max": 90.0,
"step": 1.0,
"mode": "auto",
"unit_of_measurement": "\u00b0C",
"device_class": "temperature",
"icon": "mdi:thermometer-chevron-up",
"friendly_name": "Lager-1.OG Einzelb\u00fcro Maximum temperature"
},
"last_changed": "2024-03-05T17:13:50.273066+00:00",
"last_updated": "2024-03-05T17:13:50.273066+00:00"
}
},
{
"disabled": false,
"disabled_by": null,
"entity_category": "config",
"device_class": null,
"original_device_class": "temperature",
"icon": null,
"unit_of_measurement": "\u00b0C",
"state": {
"entity_id": "number.lager_1_og_einzelburo_minimum_temperature",
"state": "12",
"attributes": {
"min": 5.0,
"max": 20.0,
"step": 1.0,
"mode": "auto",
"unit_of_measurement": "\u00b0C",
"device_class": "temperature",
"icon": "mdi:thermometer-chevron-down",
"friendly_name": "Lager-1.OG Einzelb\u00fcro Minimum temperature"
},
"last_changed": "2024-03-05T17:13:50.273182+00:00",
"last_updated": "2024-03-05T17:13:50.273182+00:00"
}
},
{
"disabled": false,
"disabled_by": null,
"entity_category": "config",
"device_class": null,
"original_device_class": null,
"icon": null,
"unit_of_measurement": "\u00b0",
"state": {
"entity_id": "number.lager_1_og_einzelburo_temperature_calibration",
"state": "-2",
"attributes": {
"min": -9.0,
"max": 9.0,
"step": 1.0,
"mode": "auto",
"unit_of_measurement": "\u00b0",
"icon": "mdi:thermometer-check",
"friendly_name": "Lager-1.OG Einzelb\u00fcro Temperature calibration"
},
"last_changed": "2024-03-05T17:13:50.273280+00:00",
"last_updated": "2024-03-05T17:13:50.273280+00:00"
}
},
{
"disabled": false,
"disabled_by": null,
"entity_category": "config",
"device_class": null,
"original_device_class": null,
"icon": null,
"unit_of_measurement": "\u00b0",
"state": {
"entity_id": "number.lager_1_og_einzelburo_temperature_hysteresis",
"state": "1",
"attributes": {
"min": 1.0,
"max": 5.0,
"step": 1.0,
"mode": "auto",
"unit_of_measurement": "\u00b0",
"icon": "mdi:thermometer-plus",
"friendly_name": "Lager-1.OG Einzelb\u00fcro Temperature hysteresis"
},
"last_changed": "2024-03-05T17:13:50.273374+00:00",
"last_updated": "2024-03-05T17:13:50.273374+00:00"
}
},
{
"disabled": false,
"disabled_by": null,
"entity_category": "config",
"device_class": null,
"original_device_class": null,
"icon": null,
"unit_of_measurement": null,
"state": {
"entity_id": "lock.lager_1_og_einzelburo_child_lock",
"state": "locked",
"attributes": {
"friendly_name": "Lager-1.OG Einzelb\u00fcro Child lock",
"supported_features": 0
},
"last_changed": "2024-03-05T17:13:50.526076+00:00",
"last_updated": "2024-03-05T17:13:50.526076+00:00"
}
},
{
"disabled": false,
"disabled_by": null,
"entity_category": "config",
"device_class": null,
"original_device_class": "switch",
"icon": null,
"unit_of_measurement": null,
"state": {
"entity_id": "switch.lager_1_og_einzelburo_anti_frost",
"state": "on",
"attributes": {
"device_class": "switch",
"friendly_name": "Lager-1.OG Einzelb\u00fcro Anti-frost"
},
"last_changed": "2024-03-05T17:13:50.556675+00:00",
"last_updated": "2024-03-05T17:13:50.556675+00:00"
}
},
{
"disabled": false,
"disabled_by": null,
"entity_category": "config",
"device_class": null,
"original_device_class": null,
"icon": null,
"unit_of_measurement": null,
"state": {
"entity_id": "button.lager_1_og_einzelburo_factory_reset",
"state": "unknown",
"attributes": {
"friendly_name": "Lager-1.OG Einzelb\u00fcro Factory reset"
},
"last_changed": "2024-03-05T17:13:50.325196+00:00",
"last_updated": "2024-03-05T17:13:50.325196+00:00"
}
},
{
"disabled": false,
"disabled_by": null,
"entity_category": null,
"device_class": null,
"original_device_class": null,
"icon": null,
"unit_of_measurement": null,
"state": {
"entity_id": "climate.lager_1_og_einzelburo_2",
"state": "heat",
"attributes": {
"hvac_modes": [
"off",
"auto",
"heat"
],
"min_temp": 12,
"max_temp": 30,
"target_temp_step": 1.0,
"current_temperature": 21.0,
"temperature": 30,
"friendly_name": "Lager-1.OG Einzelb\u00fcro",
"supported_features": 385
},
"last_changed": "2024-03-05T17:13:50.272930+00:00",
"last_updated": "2024-03-07T04:23:36.495929+00:00"
}
}
]
}
}
}`

@make-all make-all added the device improvement Improvement to an existing device config label Mar 7, 2024
@make-all make-all reopened this Mar 7, 2024
@make-all
Copy link
Owner

make-all commented Mar 7, 2024

OK, I see now. There is an error in specifying the conditions for hvac_action - it has a default case, but conditions do not actually support that. It seems to be a common error affecting quite a few other conditional mappings in other device configs too.

make-all added a commit that referenced this issue Mar 7, 2024
Defaults for conditions have to be set one level up in the mapping,
as the conditions only look for matches, not keep track of defaults.
There may be some side-effect to changing this, and setting one level
up is an acceptable workaround.

In read-write situations that need to control which options are set
for a specific value, it is sometimes better to list all conditions
rather than use a default.

Main effect is on climate hvac_action, swing_mode where more than just
two options for vertical and horizontal are available, cover actions
where opened/opening, closed/closing need to distinguished based on
position, and complex logic to handle optional vacuum activate and
pause switches.

Issue #1709
@make-all make-all added awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release labels Mar 7, 2024
@make-all make-all removed awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release device improvement Improvement to an existing device config labels Mar 27, 2024
@horstvogel
Copy link
Author

Hello, i just installed the new version, but i can´t font the Thermostat Valve State

@make-all
Copy link
Owner

Sorry, but I cannot tell anything from that. Please attach diagnostics as before.

@BertBH
Copy link

BertBH commented Apr 5, 2024

Hello Horst,

The Valve State is visible, but only when valve is open. Then you will see hvac_action: heating. When valve is closed it will disappear. When you use the entity in a mushroom climate card, it works. The card shows you when the valve is open an extra symbol.

I got an other issue, in my log I have this error:
2024-04-05 14:54:43.017 WARNING (MainThread) [custom_components.tuya_local.climate] avatto_me81_thermostat.yaml/climate: Unrecognised HVAC Action close ignored

2024-04-05 14:35:47.706 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.tuya_local.climate.TuyaLocalClimate'>) implements HVACMode(s): off, auto, heat and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/make-all/tuya-local/issues

This perhaps have to to with errors made for id:1 and id:2

id:1 switches the thermostat on or off, the display is switched on or off.

hvac_mode should actually be on or off

id:2 allows you to choose between manual setting or automatic. With automatic, the programmed program is followed.

Auto should therefore not be in hvac_mode, but should be a separate selector switch, such as: childlock

So: manual/auto

@BertBH
Copy link

BertBH commented Apr 5, 2024

Avatto ME81-1b
Avatto ME81-2b

timlaing pushed a commit to timlaing/tuya-local that referenced this issue Aug 8, 2024
Defaults for conditions have to be set one level up in the mapping,
as the conditions only look for matches, not keep track of defaults.
There may be some side-effect to changing this, and setting one level
up is an acceptable workaround.

In read-write situations that need to control which options are set
for a specific value, it is sometimes better to list all conditions
rather than use a default.

Main effect is on climate hvac_action, swing_mode where more than just
two options for vertical and horizontal are available, cover actions
where opened/opening, closed/closing need to distinguished based on
position, and complex logic to handle optional vacuum activate and
pause switches.

Issue make-all#1709
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants