#hello i need to control fan speed over

1 messages · Page 1 of 1 (latest)

shy lotus
#

@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') }}
lyric bramble
#

don't use chatgpt

#

it outputs crap

shy lotus
#

yes, i know 😉

lyric bramble
#

and that's crap

shy lotus
#

this is my sensor with fan speed:

  - platform: modbus_controller
    modbus_controller_id: rekuperator
    name: "Supply fan speed"
    register_type: holding
    address: 10
lyric bramble
#

and what is the resulting entity_id for that?

shy lotus
#

but this is config from esphome, not HA

lyric bramble
#

Then why are you asking here if you want to do this in ESPHome?

shy lotus
#

you have right, in esphome i only need input_number, automation with mapping and slider i can do in HA

lyric bramble
#

esphome can also make a number entity

#

but you should ask your question on the esphome server, not here

shy lotus
#

ok, now i have number in esphome and entity in ha:

lyric bramble
#

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.

shy lotus
#

number.supply_fan_speed

#

yes, i understand. I need in HA write template to map percents to values and create slide

lyric bramble
#

no, i'm telling you taht you'd do that on ESPHome side

#

you don't need anything this channel offers

shy lotus
#

so better is write all logic in esphome?

lyric bramble
#

Yes

#

and you should get help with that logic from the ESPHome discord server

#

or on the HA forums in the ESPHome section

shy lotus
#

ok, thank you for time