Closed 11sas11 closed 1 year ago
Try searching on the developer tools just for "pid". See if home assistant "decided" to name your entity with another name, for example adding a "_2" to the end!
Not there. I think my problem is that if I follow your instructions exactly I end up with a "duplicate key" on sensors. So I put the PID stuff right at the top and had all the sensors below. Then I tried putting all the helpers above thinking they may need to be defined before I use them. Still no luck. I am not experience with YAML so I am sure I am doing something silly
here is my whole configuration.yaml
default_config:
tts:
automation: !include automations.yaml script: !include scripts.yaml scene: !include scenes.yaml
input_boolean: pid_one_invert: name: Invert initial: no pid_one_enabled: name: Enabled
input_select: pid_one_round: initial: Round options:
input_number: pid_one_sample_time: name: Sample Time initial: 0 min: 0 max: 30 step: 1
pid_one_minimum: name: Minimum initial: 0 min: 0 max: 5 step: 1
pid_one_maximum: name: Maximum initial: 50 min: 0 max: 50 step: 1
pid_one_set_point: name: Set Point initial: 15 min: 0 max: 30 step: 1
pid_one_proportional: name: Proportional initial: 0 min: 0 max: 10 step: 0.01
pid_one_integral: name: Integral initial: 0 min: 0 max: 10 step: 0.01
pid_one_derivative: name: Derivative initial: 0 min: 0 max: 10 step: 0.01
pid_one_precision: name: Precision initial: 2 min: 0 max: 10 step: 1
pid_one_windup: name: Windup initial: 0 min: 0 max: 30 step: 1
pid_one_reading: name: Sensor Reading initial: 0 min: -1000 max: 1000 step: 1
pid_controller:
sensor:
platform: pid_controller name: pid_1 enabled: '{{ states("input_boolean.pid_one_enabled") }}' set_point: '{{ states("input_number.pid_one_set_point") }}' p: '{{ states("input_number.pid_one_proportional") }}' i: '{{ states("input_number.pid_one_integral") }}' d: '{{ states("input_number.pid_one_derivative") }}' entity_id: input_number.pid_one_reading invert: '{{ states("input_boolean.pid_one_invert") }}' precision: '{{ states("input_number.pid_one_precision") }}' minimum: '{{ states("input_number.pid_one_minimum") }}' maximum: '{{ states("input_number.pid_one_maximum") }}' round: '{{ states("input_select.pid_one_round") }}' sample_time: '{{ states("input_number.pid_one_sample_time") }}' windup: '{{ states("input_number.pid_one_windup") }}'
platform: template sensors: energy_diff: value_template: "{{ states('sensor.grid_energy_returned') | float - states('sensor.grid_energy') | float }}"
platform: template sensors: house_power: value_template: "{{ states('sensor.solar_power') | float + states('sensor.grid_power') | float }}"
platform: template sensors: kettle_power: value_template: '{{ state_attr("switch.kettle_plug", "current_consumption") }}' unit_of_measurement: W
platform: template sensors: pool_power: value_template: '{{ state_attr("switch.pool_power", "current_consumption") }}' unit_of_measurement: W
platform: template sensors: outside_temp_hvac: value_template: '{{ state_attr("climate.lounge_room_ac", "outdoor_temp") }}' unit_of_measurement: °C
The order at this point is irrelevant, if a entity already exists, normally home assistant adds a _2 to the end of the name! Did you tried adding a different name to test? Try the name New PID Controller. For example.
um, I did the core update this morning with no changes it worked - thanks for bearing with me!
What am I doing wrong.
e.g.
pid_controller: sensor:
platform: pid_controller name: pid_1 enabled: '{{ states("input_boolean.pid_one_enabled") }}'
etc..
HA doesn't recognise sensor.pid_1
if I add it to a card I get Entity not available: sensor.pid_1
I think I have followed every step and followed the example but am stuck at this point.
Seems everyone can see the output so sorry for the basic question.