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

Lovelace thermostat card broken if operation_list absent #1881

Closed
mvn23 opened this issue Oct 27, 2018 · 4 comments · Fixed by #1901
Closed

Lovelace thermostat card broken if operation_list absent #1881

mvn23 opened this issue Oct 27, 2018 · 4 comments · Fixed by #1901
Assignees

Comments

@mvn23
Copy link

mvn23 commented Oct 27, 2018

Home Assistant release with the issue:
0.81.0

Last working Home Assistant release (if known):
N/A

Browser and Operating System:
Firefox on linux

Description of problem:

Thermostat card does not show up in the UI if the underlying entity does not expose an operations_list.

Javascript errors shown in the web inspector (if applicable):

TypeError: stateObj.attributes.operation_list is undefined    [Learn More] d076e229b8879acac643.chunk.js:1701

Additional information:
@balloob suggested that operation_list should always be present on a climate entity, but that would make support for operation_modes mandatory for climate platforms, which will look weird in both classic UI and lovelace if only 1 operation mode is supported.
Either way, the thermostat card should deal with a situation where this list contains less than 2 items, for example by hiding the operation modes.

@zsarnett zsarnett self-assigned this Oct 27, 2018
@zsarnett zsarnett added the bug label Oct 27, 2018
@zsarnett
Copy link
Contributor

I believe that dealing with the situation of 0 operation modes is needed. But if the operation mode is on the accepted list of modes then the icon will show if not then no icon will show but the thermostat will still render.

@balloob
Copy link
Member

balloob commented Oct 28, 2018

@mvn23 had a good observation in Discord yesterday: if the climate component does not support operation modes, it will never add operation_list. So we need to handle this.

@ghost ghost assigned balloob Oct 28, 2018
@ghost ghost added the in progress label Oct 28, 2018
@mvn23
Copy link
Author

mvn23 commented Oct 28, 2018

@balloob do we still need to handle this in the backend as well? Or do we consider an entity without an operation_list a possibility by design?

@balloob
Copy link
Member

balloob commented Oct 28, 2018

It's possible by design, no need to update the backend. Opened a PR to fix in frontend 👍

@ghost ghost removed the in progress label Oct 28, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants