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

Add option to show current temperature on thermostat card #19049

Merged
merged 5 commits into from
Dec 20, 2023

Conversation

piitaya
Copy link
Member

@piitaya piitaya commented Dec 14, 2023

Proposed change

Add option to thermostat card to use current temperature instead of target temperature as main info.

CleanShot 2023-12-18 at 11 33 36

CleanShot 2023-12-18 at 11 35 12

PR for humidifier will follow.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@piitaya piitaya added the Do Not Review PR is not ready for any kind of review label Dec 14, 2023
@piitaya piitaya changed the title Show current temperature thermostat Add option to show current temperature on thermostat card Dec 14, 2023
@piitaya piitaya removed the Do Not Review PR is not ready for any kind of review label Dec 18, 2023
@piitaya piitaya marked this pull request as ready for review December 18, 2023 10:45
@bramkragten
Copy link
Member

Should the thermostat icon also be shown on a dual setpoint (if there is space)?

@piitaya piitaya force-pushed the show_current_temperature_thermostat branch from f9328c8 to 027bea4 Compare December 18, 2023 13:42
@@ -455,6 +455,7 @@ export interface ThermostatCardConfig extends LovelaceCardConfig {
entity: string;
theme?: string;
name?: string;
use_current_as_primary?: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I prefer

Suggested change
use_current_as_primary?: boolean;
show_current_as_primary?: boolean;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure for the name. I agree with your suggestion.

return html`
<p class="label">
${action && action !== "off" && action !== "idle"
? actionLabel
: this.hass.localize("ui.card.climate.target")}
Copy link
Member

@bramkragten bramkragten Dec 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lokalize key is no longer used? Can be removed?

@piitaya piitaya merged commit af9b64c into dev Dec 20, 2023
13 checks passed
@piitaya piitaya deleted the show_current_temperature_thermostat branch December 20, 2023 13:41
@andywwright
Copy link

Now all that is left is to make the old behavior default and then we could forget all this nonsense as if it has never happened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants