gysmo38 / mitsubishi2MQTT

Mitsubishi to MQTT with ESP8266 module
GNU Lesser General Public License v2.1
390 stars 139 forks source link

Climate entity not discoverable by Alexa using Nabu Casa integration #90

Closed zkniebel closed 4 years ago

zkniebel commented 4 years ago

I have the device set up and running normally without issue, however when I try to have Alexa discover it (I have included the entity for sharing with Alexa via configuration.yaml) it's not found. I've tried searching for others also facing this issue but haven't found much relevant information online. I have other devices, including thermostats successfully shared with/discoverable by Alexa. Can you advise if this is a known issue and if you are aware of any fix?

zkniebel commented 4 years ago

I managed to find a workaround for this.

Before I dive in, it's worthy of mentioning that I'm not sure if this is actually a bug in Nabu Casa or if this is specific to this integration. It turns out that the other Thermostats that I had shared with Alexa were actually being shared through some hackery that I won't go into here for sake of brevity and remaining on-topic.

After thoroughly reviewing the (surprisingly limited amount of) information on this issue that I could find and not coming up with a fix, I went back to the Nabu Casa documentation to do one final check that I hadn't missed anything. It was then that I found the entity_config map (which is supposed to be optional) and decided that I would try using it to explicitly specify that my climate entity should be brought into Alexa as a THERMOSTAT (see my configuration, below). After applying this change, I restarted HA and once it was back up and running I told Alexa to discover devices, at which point she found the device.

cloud:
  alexa:
    filter:
      include_entities:
        - climate.gameroomhvac
        ...
      exclude_entities:
        ...
      include_domains:
        ...
      exclude_domains:
        ...
    entity_config:
      climate.gameroomhvac:
        name: Game Room Thermostat
        description: Thermostat for the mini split in the game room
        display_categories: THERMOSTAT