Skip to content

Fix temperature and humidity getters to return raw state#4

Open
mdcarter wants to merge 1 commit intosergiocarracedo:mainfrom
mdcarter:patch-1
Open

Fix temperature and humidity getters to return raw state#4
mdcarter wants to merge 1 commit intosergiocarracedo:mainfrom
mdcarter:patch-1

Conversation

@mdcarter
Copy link
Copy Markdown

@mdcarter mdcarter commented Dec 10, 2025

Why format the temperature and humidity before display ?
Might as well get the format chosen in the entities

@sergiocarracedo
Copy link
Copy Markdown
Owner

We could do the format in the render function, but if you do this change you need, or to change the return type to string or convert the string to number before return it

Comment thread src/area-card/TempHum.ts
@@ -15,7 +15,7 @@ export class TempHum extends LitElement {

get temperature(): number | undefined {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Need to be string | uindefined or convert the state to a number

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants