Prevents light icons to become totally white

Solves #1567
This commit is contained in:
Edward Firmo
2024-02-29 11:50:27 +01:00
parent 87051d8241
commit a3df5f97a6
3 changed files with 38 additions and 26 deletions

View File

@@ -52,6 +52,7 @@ esphome:
- priority: 600.0 # This is where most sensors are set up.
then:
- lambda: |-
blueprint_status->publish_state(0);
std::string s = "${device_name}";
std::string result;
bool last_was_underscore = false;
@@ -1400,7 +1401,11 @@ sensor:
internal: false
disabled_by_default: false
filters:
- lambda: return (x / 62) * 100.0f;
- lambda: |-
if (isnan(x) and x>0)
return (x / 62) * 100.0f;
else
return 0;
on_value:
then:
- lambda: |-
@@ -1530,7 +1535,6 @@ sensor:
##### START - SWITCH CONFIGURATION #####
switch:
##### Notification unread #####
- name: Notification unread
platform: template