-
-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b3543af
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edwardtfn This refactor makes sense but I think sensor needs to be handled separately. For sensors there is no "state" which changes the sensor icon. So it's just a simple lookup, e.g. my humidity sensor is of device_class
moisture
and should just returnmdi:water-percent
irrespective of what the state is. The logic for binary_sensor, cover and switch is sound because these icons change based upon state (in HA as well).b3543af
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My fault. 😬
I haven't seen your code was doing sensor in a different way. I will fix that.
Thanks again!
b3543af
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this will solve that: b46ab6a
I will test more later.
b3543af
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks nice...
🙂