#hello i need to control fan speed over
1 messages · Page 1 of 1 (latest)
@winter loomo: this is what ChatGPT write for me:
input_number:
brightness_slider:
name: Supply Fan
initial: 0
min: 0
max: 10
step: 1
automation:
- alias: "Set Speed Description"
trigger:
platform: state
entity_id: input_number.speed_slider
action:
service: persistent_notification.create
data_template:
title: "Speed Setting"
message: >
{% set slider_value = states('input_number.speed_slider') | int %}
{% set speed_description = {
0: 'Stop',
2: '10%',
3: 'Speed 2',
5: 'Speed 3',
8: 'Speed 4',
9: 'Speed 5',
10: 'Speed 6',
11: 'Speed 7',
12: 'Speed 8',
13: 'Speed 9',
14: 'Speed 10'
} %}
{{ speed_description.get(slider_value, 'Unknown') }}
yes, i know 😉
and that's crap
this is my sensor with fan speed:
- platform: modbus_controller
modbus_controller_id: rekuperator
name: "Supply fan speed"
register_type: holding
address: 10
and what is the resulting entity_id for that?
but this is config from esphome, not HA
Then why are you asking here if you want to do this in ESPHome?
you have right, in esphome i only need input_number, automation with mapping and slider i can do in HA
esphome can also make a number entity
but you should ask your question on the esphome server, not here
ok, now i have number in esphome and entity in ha:
I don't think you understand what I'm saying. A number entity will be a slider. ESPhome has the ability to do all the logic you want on the ESPHome side.
but this channel is for #templates-archived, not C++ or ESPhome
number.supply_fan_speed
yes, i understand. I need in HA write template to map percents to values and create slide
no, i'm telling you taht you'd do that on ESPHome side
you don't need anything this channel offers
so better is write all logic in esphome?
Yes
and you should get help with that logic from the ESPHome discord server
or on the HA forums in the ESPHome section
ok, thank you for time