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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weather entity state based icon #538

Merged
merged 1 commit into from
Jun 4, 2022
Merged

Weather entity state based icon #538

merged 1 commit into from
Jun 4, 2022

Conversation

golles
Copy link
Contributor

@golles golles commented Jun 3, 2022

I wanted to raise a feature request for this, but realized I could easily write the code for it.
I've used this as the source: https://github.com/spacegaier/frontend/blob/dev/src/data/weather.ts#L71-L86

Description

Weather entity will have an icon matching with its state, like the standard HA entity cards.

Related Issue

I didn't want to bother you with an issue with something I could implement myself.

Motivation and Context

Making the cards better

How Has This Been Tested

I haven't tested this

Types of changes

  • 馃悰 Bug fix (non-breaking change which fixes an issue)
  • 馃殌 New feature (non-breaking change which adds functionality)
  • 馃寧 Translation (addition or update a translation)
  • 鈿狅笍 Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have tested the change locally.

@@ -114,6 +113,42 @@ export function domainIcon(domain: string, entity?: HassEntity, state?: string):
return "mdi:flash";
}

case "weather":
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to order cases alphabetically but noticed these are in no particular order.

@piitaya
Copy link
Owner

piitaya commented Jun 4, 2022

Hi 馃檪
Thanks for the contribution! 馃檪
I'm working on another PR to clean all code imported from HA and custom card helpers so I will certainly refactor this part of code but we can merge it!

@piitaya piitaya merged commit 927e0f5 into piitaya:main Jun 4, 2022
@piitaya piitaya added the enhancement New feature or request label Jun 4, 2022
@golles golles deleted the patch-2 branch June 4, 2022 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants