vindaalex / multizone-thermostat

This is a home assistant custom component. It is a thermostat including various control options, such as: on-off, PID, weather controlled. The thermostat can be used in stand-alone mode or as zoned heating (master- satellites).
35 stars 6 forks source link

'HVACSetting' object has no attribute 'get_velocity' #32

Closed SerialDestructor closed 7 months ago

SerialDestructor commented 9 months ago

After adding the thermostat config based on the example (multizone_thermostat.yaml), I can't turn on a satelite thermostat due to the error described in title ('HVACSetting' object has no attribute 'get_velocity'). I can turn on the master thermostat, but it does not seem to do anything.

vindaalex commented 9 months ago

I'll have a look. Could you post your config?

SerialDestructor commented 9 months ago

Yes:

  - platform: multizone_thermostat
    name: master
    unique_id: mz_master
    initial_hvac_mode: "off"
    initial_preset_mode: "none"
    room_area: 60
    passive_switch_check: False
    heat:
      entity_id: input_number.virtual_master_thermostat_percentage
      passive_switch_duration:
        days: 14
      master_mode:
        satelites: [room_1, room_2, room_3, room_3, room_4]
        operation_mode: "balanced"
        control_interval:
          minutes: 30
        pwm_duration:
          minutes: 30
        pwm_scale: 100
        pwm_resolution: 10
        PID_valve_mode:
          goal: 1
          kp: 0
          ki: 0
          kd: 0

    restore_from_old_state: False
    restore_parameters: False
    restore_integral: False

  - platform: multizone_thermostat
    name: room_1
    unique_id: mz_room_1
    sensor: sensor.temperatuur_room_1
    filter_mode: 0
    room_area: 29
    initial_hvac_mode: "off"
    precision: 0.5
    sensor_stale_duration:
      hours: 12
    passive_switch_check: True
    heat:
      entity_id: input_boolean.virtual_radiator_room_1
      passive_switch_duration:
        days: 15
      initial_target_temp: 5
      #away_temp: 5
      proportional_mode:
        control_interval:
          minutes: 15 #?
        pwm_duration:
          minutes: 15
        pwm_scale: 100
        pwm_resolution: 50
        #pwm_treshold: 2
        PID_mode:
          kp: 50
          ki: 0.0004
          kd: -150000
          window_open_tempdrop: -3

    restore_from_old_state: True
    restore_parameters: True
    restore_integral: True

  - platform: multizone_thermostat
    name: room_2
    unique_id: mz_room_2
    sensor: sensor.temperatuur_room_2
    filter_mode: 0
    #sensor_out: sensor.openweather_temperature
    room_area: 10
    initial_hvac_mode: "off"
    precision: 0.5
    sensor_stale_duration:
      hours: 12
    passive_switch_check: True
    heat:
      entity_id: input_boolean.virtual_radiator_room_2
      passive_switch_duration:
        days: 15
      initial_target_temp: 5
      #away_temp: 5
      proportional_mode:
        control_interval:
          minutes: 15
        pwm_duration:
          minutes: 30
        pwm_scale: 100
        pwm_resolution: 50
        #pwm_threshold: 2
        PID_mode:
          kp: 0
          ki: 0
          kd: 0
          window_open_tempdrop: -3

    restore_from_old_state: True
    restore_parameters: True
    restore_integral: True

  - platform: multizone_thermostat
    name: room_3
    unique_id: mz_room_3
    sensor: sensor.temperatuur_room_3
    filter_mode: 0
    room_area: 12
    initial_hvac_mode: "off"
    precision: 0.5
    sensor_stale_duration:
      hours: 12
    passive_switch_check: True
    heat:
      entity_id: input_boolean.virtual_radiator_room_3
      passive_switch_duration:
        days: 15
      initial_target_temp: 5
      #away_temp: 5
      proportional_mode:
        control_interval:
          minutes: 15
        pwm_duration:
          minutes: 30
        pwm_scale: 100
        pwm_resolution: 50
        pwm_threshold: 0
        PID_mode:
          kp: 0
          ki: 0
          kd: 0
          window_open_tempdrop: -3

    restore_from_old_state: True
    restore_parameters: True
    restore_integral: True

  - platform: multizone_thermostat
    name: room_4
    unique_id: mz_room_4
    sensor: sensor.temperatuur_room_4
    filter_mode: 0
    #sensor_out: sensor.openweather_temperature
    room_area: 5
    initial_hvac_mode: "off"
    precision: 0.5
    sensor_stale_duration:
      hours: 12
    passive_switch_check: True
    heat:
      entity_id: input_boolean.virtual_radiator_room_4
      passive_switch_duration:
        days: 15
      initial_target_temp: 5
      #away_temp: 5
      proportional_mode:
        control_interval:
          minutes: 15
        pwm_duration:
          minutes: 30
        pwm_scale: 100
        pwm_resolution: 50
        pwm_threshold: 0
        PID_mode:
          kp: 0
          ki: 0
          kd: 0
          window_open_tempdrop: -3

    restore_from_old_state: True
    restore_parameters: True
    restore_integral: True

  - platform: multizone_thermostat
    name: room_4
    unique_id: mz_room_4
    sensor: sensor.temperatuur_room_4
    filter_mode: 0
    room_area: 4
    initial_hvac_mode: "off"
    precision: 0.5
    sensor_stale_duration:
      hours: 12
    passive_switch_check: True
    heat:
      entity_id: input_boolean.virtual_radiator_room_4
      passive_switch_duration:
        days: 15
      initial_target_temp: 5
      #away_temp: 5
      proportional_mode:
        control_interval:
          minutes: 15
        pwm_duration:
          minutes: 30
        pwm_scale: 100
        pwm_resolution: 50
        pwm_threshold: 0
        PID_mode:
          kp: 0
          ki: 0
          kd: 0

    restore_from_old_state: True
    restore_parameters: True
    restore_integral: True

I'm testing in a simulation environment before I change my current (already working) setup, as I don't want any central heating downtime given the current temperatures outside...

vindaalex commented 9 months ago

I think it is due to filter_mode: 0. Could you try 1.

Furthermore, with a quick look a suggest the following to start with:

SerialDestructor commented 9 months ago

Thanks for your reply.

I tried setting filter_mode to 1.

However, I tried using the example values for the PID controller. Unfortunately, I still got the same error,

vindaalex commented 9 months ago

I've found a typo and released a new beta. Could you give it a try?

SerialDestructor commented 9 months ago

I've found a typo and released a new beta. Could you give it a try?

Confirmed, it's working now. However, the heating does not turn on. If the setpoint is higher than the current temperature, it stays on 'idle'. But I suspect that's a different issue.

vindaalex commented 7 months ago

Closing issue. Released version v0.7 which should fix it.