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

Nexia / Trane integration is not working as thermostat #79891

Closed
iskiselev opened this issue Oct 8, 2022 · 6 comments · Fixed by #80297
Closed

Nexia / Trane integration is not working as thermostat #79891

iskiselev opened this issue Oct 8, 2022 · 6 comments · Fixed by #80297
Assignees

Comments

@iskiselev
Copy link

The problem

For several month, Nexia / Trane integration stopped working as thermostat - I still see some devices / sensors there, it shows me room temperature, but does not create thermostat device.
I have Trane XL824 and XR724. Integration perfectly worked with XL824 before. It seams Trane changed something - at nearly same time, I noticed that XR724 visible in Google Home and some information available in Home Assistant (which was not available at all before) and XL824 stopped work as thermostat.

What version of Home Assistant Core has the issue?

22.10

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Nexia/American Standard/Trane

Link to integration documentation on our website

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

Diagnostics information

config_entry-nexia-c32d0380979c9f1a637a2392063f6899.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2022-10-08 10:11:27.649 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up nexia platform for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 289, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 691, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 777, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 533, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 571, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 539, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py", line 211, in state
    if (is_on := self.is_on) is None:
  File "/usr/src/homeassistant/homeassistant/components/nexia/binary_sensor.py", line 59, in is_on
    return getattr(self._thermostat, self._call)()
  File "/usr/local/lib/python3.10/site-packages/nexia/thermostat.py", line 225, in is_blower_active
    return self.get_system_status() not in BLOWER_OFF_STATUSES
  File "/usr/local/lib/python3.10/site-packages/nexia/thermostat.py", line 344, in get_system_status
    ) or self._get_thermostat_key("operating_state")
  File "/usr/local/lib/python3.10/site-packages/nexia/thermostat.py", line 621, in _get_thermostat_key
    raise KeyError(f'Key "{key}" not in the thermostat JSON!')
KeyError: 'Key "operating_state" not in the thermostat JSON!'

Additional information

No response

@homeassistant
Copy link
Contributor

Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (nexia) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)


nexia documentation
nexia source
(message by IssueLinks)

@bdraco
Copy link
Member

bdraco commented Oct 8, 2022

It looks like they renamed a few things from the diagnostics

I don't have the bandwidth to investigate this or make the changes to adapt to what has changed on the cloud service right now but if you have the time to do a PR to the lib I'll find the time to review and test it on my system.

@iskiselev
Copy link
Author

I will try to look into it, but it will take some time for me - I don't know how to try my changes / debug with HomeAssistant yet. Looking into JSON and call stack shows me that my guess about XR724 was correct - it is now returned in the same device list, but don't have system_status / operating_state fields (but zone inside has field zone_status "auto", which is empty in XL824.) I will check how json looks in different modes, but probably first hotfix should be to ignore none-supported device, instead of failing. - as now I don't have access even to supported XL824.

@bdraco
Copy link
Member

bdraco commented Oct 9, 2022

Usually I dump the diagnostics into a test fixture and then go through and fix whatever is broken

@diablo581
Copy link

I have several of the XR724 in an office setting and I was working to put them in HomeAssistant. When I add them in they show up as basically read only devices. Is there a chance that HomeAssistant will be able to control them?
The Nexia app has the ability to do so, so it seems there is some pathway to them receiving changes.

@bdraco
Copy link
Member

bdraco commented Oct 12, 2022

Is there a chance that HomeAssistant will be able to control them?

It should be possible to add support for them if someone wants to invest the time to make it happen.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants