I am trying to hide the resulting output from the code block from the devices web server. I have not been successful yet. Is there a way to do this? I would love to have the percentage on this screen, but having the slider is pretty much useless as the value is under control of an automation on the ESP.
I would also love to have the backlight be a switch rather than an indicator of the state.
Thanks Matt
number:
# Creates manual fan speed slider, will not hold as the percentage is automatically controlled
- platform: template
name: Pwm Fan Slider
id: slider
mode: auto
internal: true
web_server:
sorting_weight: 6
min_value: 15
max_value: 100
step: 1
optimistic: true
unit_of_measurement: '%'
set_action:
then:
- output.set_level:
id: apple_pwm_speed
level: !lambda "return x/100;"
Backlight related stuff:
binary_sensor:
- platform: homeassistant
id: apple_backlight
entity_id: input_boolean.esphome_apple_backlight
internal: false
web_server:
sorting_weight: 7
display:
- platform: lcd_pcf8574
id: mydisplay
dimensions: 16x2
i2c_id: bus_b
address: 0x27
lambda: |-
//Print sensor temperature, spd % and RPM on line 0
it.printf(0,0,"%.0fF", id(sht30t).state);
it.printf(4,0,"%.0f%%", id(slider).state);
//it.printf(4,0,"%.0fRPM", id(fan_pulse).state);
it.printf(9,0,"+%.3fV", id(ps5v).state);
it.printf(0, 1, "%s", id(addr).state.c_str());
if (id(apple_backlight).state) {
// Binary sensor is on
// Control backlight on mydisplay
// Binary sensor is on in HA
id(mydisplay).backlight();
} else {
// Binary sensor is off in HA
id(mydisplay).no_backlight();
}
binary_sensor is a sensor, it can’t be a switch.
Instead of binary_sensor over HA input_boolean, just use switch on ESPHome side. IMHO.
To hide entity from web server - can use internal: true & include_internal: false in web server settings. While include_internal is true see no way to hide entity.
Why messing with this setting? It’s false by default, which means that if you set any sensor as internal: true it won’t be shown in HA. So, it’s not needed in any yaml. Setting “include_internal” to true will do exactly opposite: it will expose even internal sensors/switches…inside HA’s inteface
Thanks, It is an odd request. I want the value in HA and I want the value to show in ESPHome web page, but I do not want the control to be present on the ESPHome web page. I am not using HA to control the fan speed only to monitor that it is actually running. All of the control is in a lambda in the ESPHome yaml.