soloam / ha-pid-controller

PID Controller to Home Assistant
MIT License
107 stars 13 forks source link

what am I missing? #47

Open homonto opened 1 year ago

homonto commented 1 year ago

Hi,

I found this PID and I was hopeful but something is not ok 1- installed via HACS 2- added in configuration.yaml the outcome is only this (see below) - what did I do wrong?

thx

Screenshot 2023-10-15 at 18 12 29
soloam commented 1 year ago

Hello, did you created the sensor? Paste the config that you added.

homonto commented 1 year ago
pid_controller:
  sensor:
    - platform: pid_controller
      name: hello
      enabled: '{{ states("input_boolean.enabled") }}'
      set_point: '{{ states("input_number.set_point") }}'
      p: '{{ states("input_number.proportional") }}'
      i: '{{ states("input_number.integral") }}'
      d: '{{ states("input_number.derivative") }}'
      entity_id: input_number.reading
      invert: '{{ states("input_boolean.invert") }}'
      precision: '{{ states("input_number.precision") }}'
      minimum: '{{ states("input_number.minimum") }}'
      maximum: '{{ states("input_number.maximum") }}'
      round: '{{ states("input_select.round") }}'
      sample_time: '{{ states("input_number.sample_time") }}'
      windup: '{{ states("input_number.windup") }}'

  input_boolean:
    invert:
      name: Invert
      initial: no
    enabled:
      name: Enabled

  input_select:
    round:
      initial: Round
      options:
        - Floor
        - Ceil
        - Round

  input_number:
    sample_time:
      name: Sample Time
      initial: 0
      min: 0
      max: 30
      step: 1

    minimum:
      name: Minimum
      initial: 0
      min: 0
      max: 5
      step: 1

    maximum:
      name: Maximum
      initial: 5
      min: 0
      max: 20
      step: 1

    reading:
      name: Reading
      initial: 0
      min: 0
      max: 30
      step: 1

    set_point:
      name: Set Point
      initial: 15
      min: 0
      max: 30
      step: 1

    proportional:
      name: Proportional
      initial: 0
      min: 0
      max: 10
      step: 0.01

    integral:
      name: Integral
      initial: 0
      min: 0
      max: 10
      step: 0.01

    derivative:
      name: Derivative
      initial: 0
      min: 0
      max: 10
      step: 0.01

    precision:
      name: Precision
      initial: 2
      min: 0
      max: 10
      step: 1

    windup:
      name: Windup
      initial: 0
      min: 0
      max: 30
      step: 1
soloam commented 1 year ago

The sensor will not be available in the integration device! Try looking for the sensor.hello on the entity searcher of the tools

homonto commented 1 year ago

where exactly?

Screenshot 2023-10-16 at 10 52 22
pos-ei-don commented 1 year ago

same here... did you find a solution? The logs are also clean, no entry!

homonto commented 1 year ago

yes, I made DIY ESP32 device and programmed in C ;-)

breiti commented 1 year ago

You configured:

pid_controller:
  sensor:
    - platform: pid_controller
      name: hello

The documentation says this should be:

pid_controller:

sensor:
  - platform: pid_controller
  - name: hello
Sr-psycho commented 10 months ago

Guys, please help me edit the config for my co2 sensor. I did everything according to the example - at least I thought so :) But nothing worked. Absolutely. Even some integrations stopped loading.

####################################################

pid_controller

####################################################

Configure a default setup of Home Assistant (frontend, api, etc)

pid_controller:

 sensor:
  - platform: pid_controller
    name: PID_co2_sensair
    enabled: '{{ states("input_boolean.enabled") }}'
    set_point: '{{ states("input_number.set_point") }}'
    p: '{{ states("input_number.proportional") }}'
    i: '{{ states("input_number.integral") }}'
    d: '{{ states("input_number.derivative") }}'
    entity_id: sensor.esphome_co2_sensair_scd_co2 # My co2 sensor
    invert: '{{ states("input_boolean.invert") }}'
    precision: '{{ states("input_number.precision") }}'
    minimum: '{{ states("input_number.minimum") }}'
    maximum: '{{ states("input_number.maximum") }}'
    round: '{{ states("input_select.round") }}'
    sample_time: '{{ states("input_number.sample_time") }}'
    windup: '{{ states("input_number.windup") }}'

input_boolean:
  invert:
    name: Invert
    initial: no
  enabled:
    name: Enabled

input_select:
  round:
    initial: Round
    options:
      - Floor
      - Ceil
      - Round

input_number:
  sample_time:
    name: Sample Time
    initial: 0
    min: 0
    max: 60
    step: 1

  minimum:
    name: Minimum
    initial: 0
    min: 0
    max: 400
    step: 5

  maximum:
    name: Maximum
    initial: 5
    min: 0
    max: 1000
    step: 5

  reading:
    name: Reading
    initial: 0
    min: 0
    max: 30
    step: 1

  set_point:
    name: Set Point
    initial: 15
    min: 0
    max: 30
    step: 1 

  proportional:
    name: Proportional
    initial: 0
    min: 0
    max: 10
    step: 0.01

  integral:
    name: Integral
    initial: 0
    min: 0
    max: 10
    step: 0.01

  derivative:
    name: Derivative
    initial: 0
    min: 0
    max: 10
    step: 0.01

  precision:
    name: Precision
    initial: 2
    min: 0
    max: 10
    step: 1

  windup:
    name: Windup
    initial: 0
    min: 0
max: 30
step: 1
Sr-psycho commented 10 months ago

what's wrong in the config ?