home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.46k stars 29.39k forks source link

MQTT Climate implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature #109304

Closed pimw1 closed 6 months ago

pimw1 commented 6 months ago

The problem

Since 2024.2.0b0, the below warning appears.

What version of Home Assistant Core has the issue?

core-2024.2.0b0

What was the last working version of Home Assistant Core?

core-2024.1.6

What type of installation are you running?

Home Assistant OS

Integration causing the issue

MQTT

Link to integration documentation on our website

https://www.home-assistant.io/integrations/mqtt/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.climate
Source: components/climate/__init__.py:354
Integration: Climate (documentation, issues)
First occurred: 12:28:57 (1 occurrences)
Last logged: 12:28:57

Entity None (<class 'homeassistant.components.mqtt.climate.MqttClimate'>) implements HVACMode(s): off, 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/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22

Additional information

No response

home-assistant[bot] commented 6 months ago

Hey there @emontnemery, @jbouwh, mind taking a look at this issue as it has been labeled with an integration (mqtt) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `mqtt` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign mqtt` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


mqtt documentation mqtt source (message by IssueLinks)

jbouwh commented 6 months ago

This should be addressed with https://github.com/home-assistant/core/pull/109146. Can you share the config of the MQTT climate entity that caused this warning?

pimw1 commented 6 months ago

Its setup via the GUI. Maybe this helps?

image

pimw1 commented 6 months ago

Diagnotics from mqtt: https://pastebin.com/sFhyXFSk

jbouwh commented 6 months ago

Its setup via the GUI. Maybe this helps?

image

I am discovery interested in the under MQTT INFO

jbouwh commented 6 months ago

From diagnostics dump:

{
  "device_class": null,
  "disabled_by": null,
  "disabled": false,
  "entity_category": null,
  "entity_id": "climate.otgw_thermostat",
  "icon": null,
  "original_device_class": null,
  "original_icon": null,
  "state": {
    "entity_id": "climate.otgw_thermostat",
    "state": "heat",
    "attributes": {
      "hvac_modes": [
        "off",
        "heat"
      ],
      "min_temp": 12.0,
      "max_temp": 28.0,
      "target_temp_step": 0.5,
      "current_temperature": 18.1,
      "temperature": 16.0,
      "hvac_action": "idle",
      "friendly_name": "Thermostaat",
      "supported_features": 385
    },
    "last_changed": "2024-02-01T11:32:54.914563+00:00",
    "last_updated": "2024-02-01T16:52:08.106229+00:00"
  },
  "unit_of_measurement": null
}

385 -> 0001 1000 0001. TURN_OFF = 128 TURN_ON = 256

The bits for TURN_ON and TURN_OFF are set. So not sure why the logging is still there,

jbouwh commented 6 months ago

I am discovery interested in the under MQTT INFO

Can you share the requested discovery config (or YAML)

jbouwh commented 6 months ago

I think this one is solved with: https://github.com/home-assistant/core/pull/109250

pimw1 commented 6 months ago

I am discovery interested in the under MQTT INFO

Can you share the requested discovery config (or YAML)

Sure. I saw a potential fix is already made, awesome! Perrhaps the below discovery screenshots will help.

image image image image image image image image image image image image image image

jbouwh commented 6 months ago

Only the last screenshot is the for the climate part, But as I could not reproduce the warning, it seems it was solved in dev. So with the next beta update it should be fixed.