title: OpenQuatt
views:
  - title: Overview
    path: overview
    icon: mdi:view-dashboard
    type: sections
    max_columns: 3
    sections:
      - type: grid
        column_span: 1
        cards:
          - type: heading
            icon: mdi:speedometer
            heading: Live performance
            heading_style: title
          - type: markdown
            content: >-
              <details>

              <summary><strong>Explanation</strong></summary>


              These values show the key system performance in real time:

              - `Power E`: total electrical input power of the heat pump(s).

              - `Power H`: total delivered thermal output power.

              - `COP`: ratio `Power H / Power E` (instant efficiency).

              - `Flow`: current volume flow used as the basis for flow safety.

              - `Outside temp`: selected outdoor temperature source used in control.

              - `Supply temperature`: selected source for current water supply
              temperature.


              </details>
            text_only: true
          - type: tile
            entity: sensor.openquatt_total_power_input
            name: Power E
            vertical: false
            features:
              - type: trend-graph
            features_position: bottom
          - type: tile
            entity: sensor.openquatt_total_heat_power
            name: Power H
            vertical: false
            features:
              - type: trend-graph
            features_position: bottom
          - type: tile
            entity: sensor.openquatt_total_cop
            name: COP
            vertical: false
            features:
              - type: trend-graph
            features_position: bottom
          - type: tile
            entity: sensor.openquatt_flow_average_selected
            name: Flow
            vertical: false
            features:
              - type: trend-graph
            features_position: bottom
          - type: tile
            entity: sensor.openquatt_outside_temperature_selected
            name: Outside temp
            vertical: false
            features:
              - type: trend-graph
            features_position: bottom
          - type: tile
            entity: sensor.openquatt_water_supply_temp_selected
            name: Supply temperature
            vertical: false
            features:
              - type: trend-graph
            features_position: bottom
      - type: grid
        cards:
          - type: heading
            heading_style: title
            heading: Supervisory status
            icon: mdi:state-machine
          - type: markdown
            content: >-
              <details>

              <summary><strong>Explanation</strong></summary>


              This block shows the active control state:

              - `Control mode`: current operating mode/state machine step.

              - `Flow mode`: how pump/flow control is currently operating.

              - `Heating strategy`: source of heating demand (for example PH/curve).

              - `Boiler active`: indicates whether boiler assist is active.

              - `Silent active`: shows whether the silent window is currently active.


              </details>
            text_only: true
          - type: tile
            entity: sensor.openquatt_control_mode_label
            name: Control mode
            vertical: false
            features_position: bottom
          - type: tile
            entity: sensor.openquatt_flow_mode
            name: Flow mode
            vertical: false
            features_position: bottom
          - type: tile
            entity: sensor.openquatt_heating_strategy
            name: Heating strategy
            vertical: false
            features_position: bottom
          - type: tile
            entity: binary_sensor.openquatt_boiler_active
            name: Boiler active
            vertical: false
            features_position: bottom
          - type: tile
            entity: binary_sensor.openquatt_silent_active
            name:
              type: entity
            vertical: false
            features_position: bottom
          - type: heading
            icon: mdi:stethoscope
            heading: Debug
            heading_style: title
          - type: markdown
            content: >-
              <details>

              <summary><strong>Explanation</strong></summary><ha-alert
              alert-type="warning">Pas op, dit overruled de ControlMode van
              OpenQuatt!</ha-alert>


              `CM override`: handmatige mode-override; normaal op `Auto` laten.


              </details>
            text_only: true
          - type: tile
            entity: select.openquatt_cm_override
            name:
              type: entity
            hide_state: true
            vertical: false
            features:
              - type: select-options
            features_position: inline
      - type: grid
        cards:
          - type: heading
            heading: Thermostat
            heading_style: title
            icon: mdi:home-thermometer
          - type: markdown
            content: >-
              <details>

              <summary><strong>Explanation</strong></summary>


              Selected room-control values:

              - `Setpoint`: requested room temperature.

              - `Current temperature`: measured room temperature.

              The difference between these two determines how strongly heating demand increases.


              </details>
            text_only: true
          - type: custom:mini-graph-card
            name: Current room temperature
            entities:
              - entity: sensor.openquatt_room_temperature_selected
                name: Room temperature
                show_legend_state: true
              - entity: sensor.openquatt_room_setpoint_selected
                name: Setpoint
                show_fill: false
                show_legend_state: true
            show:
              icon: true
              name: true
              state: true
              legend: true
              labels: false
            points_per_hour: 30
            hours_to_show: 12
            line_width: 2
            hour24: true
            height: 80
            decimals: 1
          - type: heading
            heading_style: title
            heading: Silent mode settings
            icon: mdi:volume-off
          - type: markdown
            content: >-
              <details>

              <summary><strong>Explanation</strong></summary>


              Daily settings that directly limit behavior:

              - `Silent end/start time`: time window for silent mode.

              - `Day max level`: maximum compressor level outside silent hours.

              - `Silent max level`: maximum compressor level during silent hours.


              </details>
            text_only: true
          - type: tile
            entity: time.openquatt_silent_end_time
            name:
              type: entity
            vertical: false
          - type: tile
            entity: time.openquatt_silent_start_time
            name:
              type: entity
            vertical: false
          - type: tile
            entity: number.openquatt_day_max_level
            name:
              type: entity
            hide_state: false
            vertical: false
            features:
              - style: slider
                type: numeric-input
            features_position: inline
          - type: tile
            entity: number.openquatt_silent_max_level
            name:
              type: entity
            hide_state: false
            vertical: false
            features:
              - style: slider
                type: numeric-input
            features_position: inline
      - type: grid
        column_span: 2
        cards:
          - type: heading
            icon: mdi:chart-line
            heading: Performance (12h)
            heading_style: title
          - type: markdown
            content: |-
              <details>
              <summary><strong>Explanation</strong></summary>

              This chart combines 12-hour trends for:

              - `Power E`: total electrical input power.
              - `Power H`: total thermal output power.
              - `COP`: efficiency ratio (`Power H / Power E`).

              Use this to check whether delivered heat follows input power and whether COP stays in a realistic range.
              </details>
            text_only: true
          - type: custom:apexcharts-card
            header:
              show: true
              title: Power E, Power H en COP
              show_states: true
              colorize_states: true
            graph_span: 12h
            update_interval: 30s
            apex_config:
              chart:
                height: 320
                animations:
                  enabled: false
              legend:
                show: true
                position: bottom
                clusterGroupedSeries: false
              yaxis:
                - id: watts
                  min: 0
                  decimalsInFloat: 0
                  title:
                    text: Vermogen (W)
                - id: cop
                  opposite: true
                  min: 0
                  decimalsInFloat: 1
                  title:
                    text: COP
              stroke:
                width: 2
                curve: smooth
              tooltip:
                shared: true
            series:
              - entity: sensor.openquatt_total_power_input
                name: Power E
                color: '#3B82F6'
                yaxis_id: watts
                type: line
                extend_to: end
                show:
                  legend_value: false
                group_by:
                  func: avg
                  duration: 5min
                  fill: last
              - entity: sensor.openquatt_total_heat_power
                name: Power H
                color: '#F59E0B'
                yaxis_id: watts
                type: line
                extend_to: end
                show:
                  legend_value: false
                group_by:
                  func: avg
                  duration: 5min
                  fill: last
              - entity: sensor.openquatt_total_cop
                name: COP
                color: '#10B981'
                yaxis_id: cop
                type: line
                extend_to: end
                show:
                  legend_value: false
                group_by:
                  func: avg
                  duration: 5min
                  fill: last
            grid_options:
              columns: full
    cards: []
    header:
      card:
        type: markdown
        content: |-
          <img src="https://raw.githubusercontent.com/jeroen85/OpenQuatt/main/docs/assets/openquatt_logo.png" width="300" />

          ## <ha-icon icon="mdi:view-dashboard"></ha-icon> Overview
          Quick and practical view of performance, status, and control.
        text_only: true
      layout: center
      badges_position: top
      badges_wrap: wrap
    badges:
      - type: entity
        show_name: false
        show_state: true
        show_icon: false
        entity: sensor.openquatt_openquatt_version
        name:
          - type: device
          - type: entity
        state_content:
          - name
          - state
  - title: Energy
    path: energy
    icon: mdi:lightning-bolt-circle
    type: sections
    max_columns: 3
    sections:
      - type: grid
        cards:
          - type: heading
            icon: mdi:gauge
            heading: Current
            heading_style: title
          - type: heading
            icon: mdi:heat-pump
            heading: Heat pump
            heading_style: subtitle
          - type: entities
            show_header_toggle: false
            entities:
              - entity: sensor.openquatt_total_power_input
                name: Electrical input power
              - entity: sensor.openquatt_total_heat_power
                name: Heat output power
              - entity: sensor.openquatt_total_cop
                name: Current COP
          - type: heading
            icon: mdi:water-boiler
            heading: Boiler
            heading_style: subtitle
          - type: entities
            show_header_toggle: false
            entities:
              - entity: sensor.openquatt_boiler_heat_power
                name: Heat output power
          - type: heading
            icon: mdi:sigma
            heading: System
            heading_style: subtitle
          - type: entities
            show_header_toggle: false
            entities:
              - entity: sensor.openquatt_system_heat_power
                name: Heat output power
      - type: grid
        cards:
          - type: heading
            icon: mdi:calendar-today
            heading_style: title
            heading: Today
          - type: heading
            icon: mdi:heat-pump
            heading: Heat pump
            heading_style: subtitle
          - type: entities
            show_header_toggle: false
            entities:
              - entity: sensor.openquatt_electrical_energy_daily
                name: Electricity today
              - entity: sensor.openquatt_heatpump_thermal_energy_daily
                name: Heat today
              - entity: sensor.openquatt_heatpump_cop_daily
                name: COP today
          - type: heading
            icon: mdi:water-boiler
            heading: Boiler
            heading_style: subtitle
          - type: entities
            show_header_toggle: false
            entities:
              - entity: sensor.openquatt_boiler_thermal_energy_daily
                name: Heat today
          - type: heading
            icon: mdi:sigma
            heading: System
            heading_style: subtitle
          - type: entities
            show_header_toggle: false
            entities:
              - entity: sensor.openquatt_system_thermal_energy_daily
                name: Heat today
      - type: grid
        cards:
          - type: heading
            icon: mdi:sigma
            heading: Cumulative
            heading_style: title
          - type: heading
            icon: mdi:heat-pump
            heading: Heat pump
            heading_style: subtitle
          - type: entities
            show_header_toggle: false
            entities:
              - entity: sensor.openquatt_electrical_energy_cumulative
                name: Electricity cumulative
              - entity: sensor.openquatt_heatpump_thermal_energy_cumulative
                name: Heat cumulative
              - entity: sensor.openquatt_heatpump_cop_cumulative
                name: COP cumulative
          - type: heading
            icon: mdi:water-boiler
            heading: Boiler
            heading_style: subtitle
          - type: entities
            show_header_toggle: false
            entities:
              - entity: sensor.openquatt_boiler_thermal_energy_cumulative
                name: Heat cumulative
          - type: heading
            icon: mdi:sigma
            heading: System
            heading_style: subtitle
          - type: entities
            show_header_toggle: false
            entities:
              - entity: sensor.openquatt_system_thermal_energy_cumulative
                name: Heat cumulative
      - type: grid
        cards:
          - type: heading
            heading: Trends (24h)
            heading_style: title
            icon: mdi:trending-up
          - type: history-graph
            title: Heat pump trends (24h)
            hours_to_show: 24
            refresh_interval: 60
            entities:
              - entity: sensor.openquatt_total_heat_power
                name: Heat output power
              - entity: sensor.openquatt_heatpump_cop_daily
                name: COP today
              - entity: sensor.openquatt_heatpump_thermal_energy_daily
                name: Heat today
          - type: history-graph
            title: Boiler trends (24h)
            hours_to_show: 24
            refresh_interval: 60
            entities:
              - entity: sensor.openquatt_boiler_heat_power
                name: Heat output power
              - entity: sensor.openquatt_boiler_thermal_energy_daily
                name: Heat today
          - type: history-graph
            title: System trends (24h)
            hours_to_show: 24
            refresh_interval: 60
            entities:
              - entity: sensor.openquatt_total_power_input
                name: Electrical input power
              - entity: sensor.openquatt_system_heat_power
                name: Heat output power
              - entity: sensor.openquatt_system_thermal_energy_daily
                name: Heat today
        column_span: 3
      - type: grid
        column_span: 3
        cards:
          - type: heading
            icon: mdi:chart-bar
            heading: Energy trends (7d/30d)
            heading_style: title
          - type: markdown
            content: |-
              <details>

              <summary><strong>Explanation</strong></summary>

              Daily aggregation for energy:
              - Electricity and heat as daily kWh (derived from cumulative sensors)
              - `COP today` as daily average

              </details>
            text_only: true
          - type: custom:apexcharts-card
            header:
              show: true
              title: Energy trends (7 days)
              show_states: false
            graph_span: 7d
            update_interval: 120s
            yaxis:
              - id: energy
                min: 0
                decimals: 1
                apex_config:
                  title:
                    text: kWh/day
              - id: cop
                opposite: true
                min: 0
                max: 8
                decimals: 2
                apex_config:
                  tickAmount: 4
                  title:
                    text: COP today
            apex_config:
              chart:
                height: 320
              legend:
                show: true
                position: top
                clusterGroupedSeries: false
              stroke:
                width: 2
                curve: smooth
              tooltip:
                shared: true
            series:
              - entity: sensor.openquatt_electrical_energy_cumulative
                name: Electricity/day
                color: '#3B82F6'
                yaxis_id: energy
                type: column
                group_by:
                  func: delta
                  duration: 1d
              - entity: sensor.openquatt_heatpump_thermal_energy_cumulative
                name: Heat pump heat/day
                color: '#F59E0B'
                yaxis_id: energy
                type: column
                group_by:
                  func: delta
                  duration: 1d
              - entity: sensor.openquatt_boiler_thermal_energy_cumulative
                name: Boiler heat/day
                color: '#EF4444'
                yaxis_id: energy
                type: column
                group_by:
                  func: delta
                  duration: 1d
              - entity: sensor.openquatt_system_thermal_energy_cumulative
                name: System heat/day
                color: '#10B981'
                yaxis_id: energy
                type: line
                group_by:
                  func: delta
                  duration: 1d
              - entity: sensor.openquatt_heatpump_cop_daily
                name: COP today
                color: '#A855F7'
                yaxis_id: cop
                type: line
                group_by:
                  func: avg
                  duration: 1d
            grid_options:
              columns: full
          - type: custom:apexcharts-card
            header:
              show: true
              title: Energy trends (30 days)
              show_states: false
            graph_span: 30d
            update_interval: 300s
            yaxis:
              - id: energy
                min: 0
                decimals: 1
                apex_config:
                  title:
                    text: kWh/day
              - id: cop
                opposite: true
                min: 0
                max: 8
                decimals: 2
                apex_config:
                  tickAmount: 4
                  title:
                    text: COP today
            apex_config:
              chart:
                height: 320
              legend:
                show: true
                position: top
                clusterGroupedSeries: false
              stroke:
                width: 2
                curve: smooth
              tooltip:
                shared: true
            series:
              - entity: sensor.openquatt_electrical_energy_cumulative
                name: Electricity/day
                color: '#3B82F6'
                yaxis_id: energy
                type: column
                group_by:
                  func: delta
                  duration: 1d
              - entity: sensor.openquatt_heatpump_thermal_energy_cumulative
                name: Heat pump heat/day
                color: '#F59E0B'
                yaxis_id: energy
                type: column
                group_by:
                  func: delta
                  duration: 1d
              - entity: sensor.openquatt_boiler_thermal_energy_cumulative
                name: Boiler heat/day
                color: '#EF4444'
                yaxis_id: energy
                type: column
                group_by:
                  func: delta
                  duration: 1d
              - entity: sensor.openquatt_system_thermal_energy_cumulative
                name: System heat/day
                color: '#10B981'
                yaxis_id: energy
                type: line
                group_by:
                  func: delta
                  duration: 1d
              - entity: sensor.openquatt_heatpump_cop_daily
                name: COP today
                color: '#A855F7'
                yaxis_id: cop
                type: line
                group_by:
                  func: avg
                  duration: 1d
            grid_options:
              columns: full
    cards: []
    header:
      card:
        type: markdown
        content: >-
          # <ha-icon icon="mdi:lightning-bolt-circle"></ha-icon> Energy

          Energy overview of heat pump, boiler, and total system (daily + cumulative).
  - title: Flow
    path: flow
    icon: mdi:waves
    type: sections
    max_columns: 3
    sections:
      - type: grid
        cards:
          - type: heading
            icon: mdi:waves-arrow-right
            heading: Flow status & control
            heading_style: title
          - type: heading
            icon: ''
            heading: Status
            heading_style: subtitle
          - type: markdown
            content: |-
              <details>
              <summary><strong>Explanation</strong></summary>

              Flow status at a glance:

              - `Flow mode`: active flow-control behavior.
              - `Control Mode`: active supervisory control state.
              - `Low Flow alarm`: safety alarm for insufficient flow.
              - `Flow (average)`: selected average flow used in control/safety.
              - `Flow Mismatch`: indicates hydraulic imbalance between HP1 and HP2.
              </details>
            text_only: true
          - type: tile
            entity: sensor.openquatt_flow_mode
            name:
              type: entity
            show_entity_picture: false
            hide_state: false
            vertical: false
            features_position: bottom
          - type: tile
            entity: sensor.openquatt_control_mode_label
            name: Control Mode
            vertical: false
            features_position: bottom
          - type: tile
            entity: binary_sensor.openquatt_lowflow_fault_active
            name: Low Flow alarm
            vertical: false
            features_position: bottom
          - type: tile
            entity: sensor.openquatt_flow_average_selected
            name: Flow (average)
            vertical: false
            features_position: bottom
          - type: tile
            entity: binary_sensor.openquatt_flow_mismatch_hp1_vs_hp2
            name: Flow Mismatch
            vertical: false
            features_position: bottom
          - type: heading
            icon: ''
            heading: Control
            heading_style: subtitle
          - type: markdown
            content: |-
              <details>
              <summary><strong>Explanation</strong></summary>

              Main flow-control settings:

              - `Flow control mode`: choose automatic flow control or manual behavior.
              - `Flow setpoint`: target flow in L/h for automatic control.
              - `Manual iPWM`: set iPWM value for manual control.
              </details>
            text_only: true
          - type: tile
            entity: select.openquatt_flow_control_mode
            name:
              type: entity
            hide_state: true
            vertical: false
            features:
              - type: select-options
            features_position: inline
          - type: tile
            entity: number.openquatt_flow_setpoint
            name:
              type: entity
            hide_state: false
            vertical: false
            features:
              - style: slider
                type: numeric-input
            features_position: inline
          - type: tile
            entity: number.openquatt_manual_ipwm
            name:
              type: entity
            hide_state: false
            vertical: false
            features:
              - style: slider
                type: numeric-input
            features_position: inline
      - type: grid
        cards:
          - type: heading
            icon: mdi:chart-line
            heading: Flow trends
            heading_style: title
          - type: markdown
            content: |-
              <details>

              <summary><strong>Explanation</strong></summary>

              - `Flow measurements` compares actual flow versus setpoint over
              time.

              - `Pump control` shows iPWM command output for HP1 and HP2.

              </details>
            text_only: true
            grid_options:
              columns: full
          - type: history-graph
            title: Flow measurements (4h)
            hours_to_show: 4
            refresh_interval: 30
            entities:
              - entity: sensor.openquatt_flow_average_selected
                name: Flowrate
              - entity: number.openquatt_flow_setpoint
                name: Flow setpoint
            grid_options:
              columns: full
          - type: history-graph
            title: Pump control (4h)
            hours_to_show: 4
            refresh_interval: 30
            entities:
              - entity: number.openquatt_hp1_set_pump_speed
                name: HP1 iPWM
              - entity: number.openquatt_hp2_set_pump_speed
                name: HP2 iPWM
            grid_options:
              columns: full
        column_span: 2
    cards: []
    header:
      card:
        type: markdown
        content: |-
          # <ha-icon icon="mdi:waves"></ha-icon> Flow
          Control, status, and trends for flow and pump behavior.
      layout: center
      badges_position: bottom
      badges_wrap: wrap
    badges: []
  - title: Heat control
    path: heat-control
    icon: mdi:radiator
    type: sections
    max_columns: 3
    sections:
      - type: grid
        cards:
          - type: heading
            icon: mdi:radiator
            heading: Heat control status
            heading_style: title
          - type: heading
            icon: mdi:tune-variant
            heading: Control settings
            heading_style: subtitle
          - type: markdown
            content: |-
              <details>
              <summary><strong>Explanation</strong></summary>

              - `Heating mode`: selects which strategy drives heat demand generation (for example Heating Curve or PH).
              </details>
            text_only: true
          - type: tile
            entity: select.openquatt_heating_control_mode
            name: Heating mode
            hide_state: true
            vertical: false
            features:
              - type: select-options
            features_position: inline
          - type: tile
            visibility:
              - condition: state
                entity: select.openquatt_heating_control_mode
                state: Water Temperature Control (heating curve)
            entity: select.openquatt_heating_curve_control_profile
            name:
              type: entity
            show_entity_picture: false
            hide_state: true
            vertical: false
            features:
              - type: select-options
            features_position: inline
          - type: heading
            icon: mdi:view-dashboard-outline
            heading: Core KPIs
            heading_style: subtitle
          - type: markdown
            content: |-
              <details>
              <summary><strong>Explanation</strong></summary>

              Core heat-balance indicators:

              - `P_req`: requested heating power after smoothing/ramp limits.
              - `P_house`: modeled house heat demand.
              - `Max HP capacity`: estimated available HP heating capacity.
              - `Deficit`: positive value means demand is above available/delivered heat.
              </details>
            text_only: true
          - square: false
            type: grid
            cards:
              - type: gauge
                entity: sensor.openquatt_total_power_input
                min: 0
                max: 3600
                needle: false
                name:
                  type: entity
                severity:
                  green: 0
                  yellow: 1200
                  red: 2400
              - type: gauge
                entity: sensor.openquatt_total_heat_power
                min: 0
                max: 12000
                needle: false
                name:
                  type: entity
                severity:
                  green: 0
                  yellow: 4000
                  red: 8000
              - type: gauge
                entity: sensor.openquatt_power_house_p_house
                min: 0
                max: 12000
                needle: false
                name:
                  type: entity
                severity:
                  green: 0
                  yellow: 4000
                  red: 8000
              - type: gauge
                entity: sensor.openquatt_power_house_p_req
                min: 0
                max: 12000
                needle: false
                name:
                  type: entity
                severity:
                  green: 0
                  yellow: 4000
                  red: 8000
              - type: gauge
                entity: sensor.openquatt_hp_capacity_w
                name: Max HP capacity
                min: 0
                max: 12000
                needle: false
              - type: gauge
                entity: sensor.openquatt_hp_deficit_w
                name: Deficit
                min: 0
                max: 8000
                needle: false
                severity:
                  green: 0
                  yellow: 800
                  red: 2000
            columns: 2
      - type: grid
        cards:
          - type: heading
            icon: mdi:chart-timeline-variant
            heading: Trends
            heading_style: title
          - type: markdown
            content: |-
              <details>

              <summary><strong>Explanation</strong></summary>

              - `Heat demand` compares requested (`P_req`) versus delivered heat.
              - `HP input` and `HP output` show electrical input versus thermal output.
              - `Temperature control` shows outside, supply, and room temperatures against targets.

              </details>
            text_only: true
            grid_options:
              columns: full
          - type: history-graph
            title: Heat demand (24h)
            hours_to_show: 24
            refresh_interval: 30
            entities:
              - entity: sensor.openquatt_power_house_p_req
                name: Requested Power
              - entity: sensor.openquatt_total_heat_power
                name: Actual Power
            grid_options:
              columns: full
          - type: history-graph
            title: HP power input (24h)
            hours_to_show: 24
            refresh_interval: 30
            entities:
              - entity: sensor.openquatt_hp1_power_input
                name: HP1 powerinput
              - entity: sensor.openquatt_hp2_power_input
                name: HP2 powerinput
            grid_options:
              columns: full
          - type: history-graph
            title: HP heat output (24h)
            hours_to_show: 24
            refresh_interval: 30
            entities:
              - entity: sensor.openquatt_hp1_heat_power
                name: HP1 heating power
              - entity: sensor.openquatt_hp2_heat_power
                name: HP2 heating power
            grid_options:
              columns: full
          - type: history-graph
            title: Temperature control (24h)
            hours_to_show: 24
            refresh_interval: 30
            entities:
              - entity: sensor.openquatt_outside_temperature_selected
                name: Outside
              - entity: sensor.openquatt_water_supply_temp_selected
                name: System supply
              - entity: sensor.openquatt_heating_curve_supply_target
                name: Supply target
              - entity: sensor.openquatt_room_temperature_selected
                name: Room temp
              - entity: sensor.openquatt_room_setpoint_selected
                name: Room setpoint
            grid_options:
              columns: full
        column_span: 2
    cards: []
    header:
      card:
        type: markdown
        content: |-
          # <ha-icon icon="mdi:radiator"></ha-icon> Heat control
          Heat demand, heat allocation, and compressor loading.
  - title: Cooling
    path: cooling
    icon: mdi:snowflake-thermometer
    type: sections
    max_columns: 3
    sections:
      - type: grid
        cards:
          - type: heading
            icon: mdi:state-machine
            heading: Cooling state
            heading_style: title
          - type: tile
            entity: input_boolean.koeling_aan
          - type: entities
            show_header_toggle: false
            entities:
              - entity: sensor.openquatt_control_mode
                name: Control mode
              - entity: sensor.openquatt_control_mode_label
                name: Control mode (label)
              - entity: binary_sensor.openquatt_cooling_enable_selected
                name: Selected cooling enable
              - entity: binary_sensor.openquatt_cooling_request_active
                name: Cooling request active
              - entity: binary_sensor.openquatt_cooling_permitted
                name: Cooling permitted
              - entity: sensor.openquatt_cooling_block_reason
                name: Cooling block reason
      - type: grid
        cards:
          - type: heading
            icon: mdi:water-thermometer
            heading: Dew point safety
            heading_style: title
          - type: entities
            show_header_toggle: false
            entities:
              - entity: sensor.openquatt_cooling_room_count_selected
                name: Cooling room count
              - entity: sensor.openquatt_cooling_valid_room_count
                name: Cooling valid room count
              - entity: binary_sensor.openquatt_cooling_dew_point_available
                name: Cooling dew point available
              - entity: sensor.openquatt_cooling_dew_point_selected
                name: Cooling dew point (selected)
              - entity: sensor.openquatt_cooling_safety_margin_selected
                name: Cooling safety margin
              - entity: sensor.openquatt_cooling_minimum_safe_supply_temp
                name: Cooling minimum safe supply temp
      - type: grid
        cards:
          - type: heading
            icon: mdi:gauge
            heading: Cooling control
            heading_style: title
          - type: entities
            show_header_toggle: false
            entities:
              - entity: sensor.openquatt_cooling_supply_target
                name: Cooling supply target
              - entity: sensor.openquatt_cooling_supply_error
                name: Cooling supply error
              - entity: sensor.openquatt_cooling_demand_raw
                name: Cooling demand (raw)
              - entity: number.openquatt_cooling_minimum_supply_temp
                name: Cooling minimum supply temp
              - entity: number.openquatt_cooling_demand_max
                name: Cooling demand max
              - entity: number.openquatt_cooling_safety_margin
                name: Cooling safety margin
                icon: mdi:delta
    cards: []
    header:
      card:
        type: markdown
        content: |-
          # <ha-icon icon="mdi:snowflake-thermometer"></ha-icon> Cooling
          Inspect passive-cooling permission, dew-point safety, and the CM5 control path.
  - title: HPs
    path: HPs
    icon: mdi:heat-pump-outline
    type: sections
    sections:
      - type: grid
        cards:
          - square: false
            type: grid
            columns: 1
            cards:
              - type: picture-elements
                title: Quatt HP1
                image: https://raw.githubusercontent.com/jeroen85/OpenQuatt/refs/heads/main/docs/dashboard/heatpump/Quatt.png
                elements:
                  - type: image
                    style:
                      left: 0%
                      top: 0%
                      transform: translate(0,0)
                    entity: binary_sensor.openquatt_hp1_4_way_valve
                    state_image:
                      'on': https://raw.githubusercontent.com/jeroen85/OpenQuatt/main/docs/dashboard/heatpump/Cool.png
                      'off': https://raw.githubusercontent.com/jeroen85/OpenQuatt/refs/heads/main/docs/dashboard/heatpump/Heat.png
                      unknown: https://raw.githubusercontent.com/jeroen85/OpenQuatt/refs/heads/main/docs/dashboard/heatpump/Heat.png
                      unavailable: https://raw.githubusercontent.com/jeroen85/OpenQuatt/refs/heads/main/docs/dashboard/heatpump/Heat.png
                    tap_action:
                      action: none
                    hold_action:
                      action: none
                  - type: state-label
                    entity: sensor.openquatt_hp1_outside_temperature
                    style:
                      top: 3%
                      left: 8%
                      font-weight: bold
                      color: black
                      font-size: 0.75em
                      transform: none
                    prefix: 'Outside: '
                  - type: state-badge
                    entity: sensor.openquatt_hp1_gas_discharge_temperature
                    style:
                      top: 22%
                      left: 58%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp1_inner_coil_temperature
                    style:
                      top: 70%
                      left: 60%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp1_eev_steps
                    style:
                      top: 70%
                      left: 42%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp1_gas_return_temperature
                    style:
                      top: 22%
                      left: 26%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp1_evaporating_temperature
                    style:
                      top: 70%
                      left: 25%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp1_evaporator_coil_temperature
                    style:
                      top: 58%
                      left: 6%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp1_condenser_pressure
                    style:
                      top: 11%
                      left: 55%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp1_evaporator_pressure
                    style:
                      top: 11%
                      left: 30%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp1_fan_speed
                    style:
                      top: 53%
                      left: 25%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp1_compressor_frequency
                    style:
                      top: 18%
                      left: 40%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp1_water_out_temperature
                    style:
                      top: 43%
                      left: 92%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp1_water_in_temperature
                    style:
                      top: 63%
                      left: 92%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp1_flow
                    style:
                      top: 76%
                      left: 81%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-label
                    entity: sensor.openquatt_hp1_working_mode_label
                    style:
                      top: 8%
                      left: 8%
                      font-weight: bold
                      color: white
                      font-size: 0.75em
                      transform: none
                    prefix: 'Mode: '
                  - type: state-label
                    entity: sensor.openquatt_hp1_power_input
                    style:
                      top: 11%
                      left: 8%
                      font-weight: bold
                      color: white
                      font-size: 0.75em
                      transform: none
                    prefix: 'Power In: '
                  - type: state-label
                    entity: sensor.openquatt_hp1_heat_power
                    style:
                      top: 14%
                      left: 8%
                      font-weight: bold
                      color: white
                      font-size: 0.75em
                      transform: none
                    prefix: 'Power Out: '
                  - type: state-label
                    entity: sensor.openquatt_hp1_cop
                    style:
                      top: 17%
                      left: 8%
                      font-weight: bold
                      color: white
                      font-size: 0.75em
                      transform: none
                    prefix: 'COP: '
            grid_options:
              columns: 12
              rows: auto
          - square: false
            type: grid
            columns: 1
            cards:
              - type: entities
                title: HP1 key values
                show_header_toggle: false
                entities:
                  - entity: sensor.openquatt_hp1_working_mode_label
                    name: Work mode
                  - entity: sensor.openquatt_hp1_compressor_level
                    name: Compressor level
                  - entity: sensor.openquatt_hp1_compressor_frequency_demand
                    name: Demand Frequency
                  - entity: sensor.openquatt_hp1_compressor_frequency
                    name: Actual Frequency
                  - entity: sensor.openquatt_hp1_active_failures_list
                    name: Active failures list
                  - entity: sensor.openquatt_hp1_power_input
                    name: Power input
                  - entity: sensor.openquatt_hp1_heat_power
                    name: Heat power
                  - entity: sensor.openquatt_hp1_cop
                    name: COP
                  - entity: sensor.openquatt_hp1_flow
                    name: Flow
                  - entity: sensor.openquatt_hp1_water_in_temperature
                    name: Water in temp
                  - entity: sensor.openquatt_hp1_water_out_temperature
                    name: Water out temp
                  - entity: binary_sensor.openquatt_hp1_defrost
                    name: Defrost
                  - entity: binary_sensor.openquatt_hp1_4_way_valve
                    name: 4-way valve
            grid_options:
              columns: 12
              rows: auto
        column_span: 1
      - type: grid
        cards:
          - square: false
            type: grid
            columns: 1
            cards:
              - type: picture-elements
                title: Quatt HP2
                image: https://raw.githubusercontent.com/jeroen85/OpenQuatt/refs/heads/main/docs/dashboard/heatpump/Quatt.png
                elements:
                  - type: image
                    style:
                      left: 0%
                      top: 0%
                      transform: translate(0,0)
                    entity: binary_sensor.openquatt_hp2_4_way_valve
                    state_image:
                      'on': https://raw.githubusercontent.com/jeroen85/OpenQuatt/main/docs/dashboard/heatpump/Cool.png
                      'off': https://raw.githubusercontent.com/jeroen85/OpenQuatt/refs/heads/main/docs/dashboard/heatpump/Heat.png
                      unknown: https://raw.githubusercontent.com/jeroen85/OpenQuatt/refs/heads/main/docs/dashboard/heatpump/Heat.png
                      unavailable: https://raw.githubusercontent.com/jeroen85/OpenQuatt/refs/heads/main/docs/dashboard/heatpump/Heat.png
                    tap_action:
                      action: none
                    hold_action:
                      action: none
                  - type: state-label
                    entity: sensor.openquatt_hp2_outside_temperature
                    style:
                      top: 3%
                      left: 8%
                      font-weight: bold
                      color: black
                      font-size: 0.75em
                      transform: none
                    prefix: 'Outside: '
                  - type: state-badge
                    entity: sensor.openquatt_hp2_gas_discharge_temperature
                    style:
                      top: 22%
                      left: 58%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp2_inner_coil_temperature
                    style:
                      top: 70%
                      left: 60%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp2_eev_steps
                    style:
                      top: 70%
                      left: 42%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp2_gas_return_temperature
                    style:
                      top: 22%
                      left: 26%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp2_evaporating_temperature
                    style:
                      top: 70%
                      left: 25%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp2_evaporator_coil_temperature
                    style:
                      top: 58%
                      left: 6%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp2_condenser_pressure
                    style:
                      top: 11%
                      left: 55%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp2_evaporator_pressure
                    style:
                      top: 11%
                      left: 30%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp2_fan_speed
                    style:
                      top: 53%
                      left: 25%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp2_compressor_frequency
                    style:
                      top: 18%
                      left: 40%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp2_water_out_temperature
                    style:
                      top: 43%
                      left: 92%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp2_water_in_temperature
                    style:
                      top: 63%
                      left: 92%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-badge
                    entity: sensor.openquatt_hp2_flow
                    style:
                      top: 76%
                      left: 81%
                      font-weight: bold
                      color: rgba(0,0,0,0)
                      transform: none
                      font-size: 0.65em
                  - type: state-label
                    entity: sensor.openquatt_hp2_working_mode_label
                    style:
                      top: 8%
                      left: 8%
                      font-weight: bold
                      color: white
                      font-size: 0.75em
                      transform: none
                    prefix: 'Mode: '
                  - type: state-label
                    entity: sensor.openquatt_hp2_power_input
                    style:
                      top: 11%
                      left: 8%
                      font-weight: bold
                      color: white
                      font-size: 0.75em
                      transform: none
                    prefix: 'Power In: '
                  - type: state-label
                    entity: sensor.openquatt_hp2_heat_power
                    style:
                      top: 14%
                      left: 8%
                      font-weight: bold
                      color: white
                      font-size: 0.75em
                      transform: none
                    prefix: 'Power Out: '
                  - type: state-label
                    entity: sensor.openquatt_hp2_cop
                    style:
                      top: 17%
                      left: 8%
                      font-weight: bold
                      color: white
                      font-size: 0.75em
                      transform: none
                    prefix: 'COP: '
            grid_options:
              columns: 12
              rows: auto
          - square: false
            type: grid
            columns: 1
            cards:
              - type: entities
                title: HP2 key values
                show_header_toggle: false
                entities:
                  - entity: sensor.openquatt_hp2_working_mode_label
                    name: Work mode
                  - entity: sensor.openquatt_hp2_compressor_level
                    name: Compressor level
                  - entity: sensor.openquatt_hp2_compressor_frequency_demand
                    name: Demand Frequency
                  - entity: sensor.openquatt_hp2_compressor_frequency
                    name: Actual Frequency
                  - entity: sensor.openquatt_hp2_active_failures_list
                    name: Active failures list
                  - entity: sensor.openquatt_hp2_power_input
                    name: Power input
                  - entity: sensor.openquatt_hp2_heat_power
                    name: Heat power
                  - entity: sensor.openquatt_hp2_cop
                    name: COP
                  - entity: sensor.openquatt_hp2_flow
                    name: Flow
                  - entity: sensor.openquatt_hp2_water_in_temperature
                    name: Water in temp
                  - entity: sensor.openquatt_hp2_water_out_temperature
                    name: Water out temp
                  - entity: binary_sensor.openquatt_hp2_defrost
                    name: Defrost
                  - entity: binary_sensor.openquatt_hp2_4_way_valve
                    name: 4-way valve
            grid_options:
              columns: 12
              rows: auto
        column_span: 1
    max_columns: 4
    header:
      card:
        type: markdown
        content: >-
          # <ha-icon icon="mdi:heat-pump-outline"></ha-icon> Overview HP1&HP2

          This tab shows a per-HP technical snapshot of refrigerant/water-side
          behavior. Use it mainly for diagnostics and HP1 vs HP2 comparison.

          For settings, use `Flow`, `Heat control`, and `Advanced settings`.
  - title: Sensor Configuration
    path: sensor-configuration
    icon: mdi:source-branch
    type: sections
    max_columns: 3
    sections:
      - type: grid
        cards:
          - type: heading
            icon: mdi:source-branch
            heading: Sensor selection
            heading_style: title
          - type: markdown
            content: |-
              <details>
              <summary><strong>Explanation</strong></summary>

              Select which source OpenQuatt should use per signal.
              The `Selected` value should directly follow the chosen source.
              This makes it easy to verify that the effective control input matches your expectation.

              Use this block for:
              - source selection during tuning
              - quick comparison between CIC, local, and HA Input
              - validation of the effective control input
              - in Duo, `Flow source = Outdoor unit` reveals an extra choice for
                `Flowmeter HP1`, `Flowmeter HP2`, or the existing local HP1/HP2
                aggregate

              The local `HP1/HP2` aggregate is, in principle, the average of both flowmeters.

              </details>
            text_only: true
          - type: vertical-stack
            cards:
              - type: heading
                icon: mdi:home-thermometer
                heading: Room temperature sources
                heading_style: subtitle
                grid_options:
                  columns: 12
                  rows: 1
              - type: entities
                show_header_toggle: false
                entities:
                  - entity: select.openquatt_room_temperature_source
                    name: Room temperature source
                  - entity: sensor.openquatt_room_temperature_effective_source
                    name: Effective room temperature source
                  - entity: sensor.openquatt_room_temperature_selected
                    name: Selected room temperature
                  - entity: sensor.openquatt_cic_room_temperature
                    name: Room temperature (CIC)
                  - entity: sensor.openquatt_ot_room_temperature
                    name: Room temperature (OT thermostat)
                  - entity: sensor.openquatt_ha_thermostat_room_temperature
                    name: Room temperature (HA Input)
          - type: vertical-stack
            cards:
              - type: heading
                icon: mdi:water-thermometer
                heading: Water supply temperature sources
                heading_style: subtitle
                grid_options:
                  columns: 12
                  rows: 1
              - type: entities
                show_header_toggle: false
                entities:
                  - entity: select.openquatt_water_supply_source
                    name: Water supply temperature source
                  - entity: sensor.openquatt_water_supply_temp_selected
                    name: Selected water supply temperature
                  - entity: sensor.openquatt_water_supply_temp
                    name: Water supply temperature (ESP)
                  - entity: sensor.openquatt_cic_water_supply_temp
                    name: Water supply temperature (CIC)
                  - entity: sensor.openquatt_ha_water_supply_temperature
                    name: Water supply temperature (HA Input)
          - type: vertical-stack
            cards:
              - type: heading
                icon: mdi:waves
                heading: Flow sources
                heading_style: subtitle
                grid_options:
                  columns: 12
                  rows: 1
              - type: entities
                show_header_toggle: false
                entities:
                  - entity: select.openquatt_flow_source
                    name: Flow source
                  - type: conditional
                    row:
                      entity: select.openquatt_outdoor_unit_flow_mode
                      name: Outdoor unit flow mode
                    conditions:
                      - condition: state
                        entity: select.openquatt_flow_source
                        state: Outdoor unit
                  - entity: sensor.openquatt_flow_average_selected
                    name: Selected flow rate
                  - entity: sensor.openquatt_flow_average_local
                    name: Flow rate (Outdoor unit)
                  - entity: sensor.openquatt_cic_flowrate_filtered
                    name: Flow rate (CIC)
          - type: vertical-stack
            cards:
              - type: heading
                icon: mdi:thermometer
                heading: Outside temperature sources
                heading_style: subtitle
                grid_options:
                  columns: 12
                  rows: 1
              - type: entities
                show_header_toggle: false
                entities:
                  - entity: select.openquatt_outside_temperature_source
                    name: Outside temperature source
                  - entity: sensor.openquatt_outside_temperature_selected
                    name: Selected outside temperature
                  - entity: sensor.openquatt_outside_temperature_local_aggregated
                    name: Outside temperature (Outdoor unit)
                  - entity: sensor.openquatt_ha_outside_temperature
                    name: Outside temperature (HA Input)
          - type: vertical-stack
            cards:
              - type: heading
                icon: mdi:thermostat
                heading: Room setpoint sources
                heading_style: subtitle
                grid_options:
                  columns: 12
                  rows: 1
              - type: entities
                show_header_toggle: false
                entities:
                  - entity: select.openquatt_room_setpoint_source
                    name: Room setpoint source
                  - entity: sensor.openquatt_room_setpoint_effective_source
                    name: Effective room setpoint source
                  - entity: sensor.openquatt_room_setpoint_selected
                    name: Selected room setpoint
                  - entity: sensor.openquatt_cic_room_setpoint
                    name: Room setpoint (CIC)
                  - entity: sensor.openquatt_ot_room_setpoint
                    name: Room setpoint (OT thermostat)
                  - entity: sensor.openquatt_ha_thermostat_setpoint
                    name: Room setpoint (HA Input)
          - type: vertical-stack
            cards:
              - type: heading
                icon: mdi:snowflake-check
                heading: Cooling enable sources
                heading_style: subtitle
                grid_options:
                  columns: 12
                  rows: 1
              - type: entities
                show_header_toggle: false
                entities:
                  - entity: select.openquatt_cooling_enable_source
                    name: Cooling enable source
                  - entity: sensor.openquatt_cooling_enable_effective_source
                    name: Effective cooling enable source
                  - entity: binary_sensor.openquatt_cooling_enable_selected
                    name: Selected cooling enable
                  - entity: binary_sensor.openquatt_cic_cooling_enabled
                    name: Cooling enable (CIC)
                  - entity: binary_sensor.openquatt_ha_cooling_enable
                    name: Cooling enable (HA Input)
        column_span: 3
      - type: grid
        cards:
          - type: heading
            icon: mdi:home-assistant
            heading: Home Assistant source configuration
            heading_style: title
          - type: vertical-stack
            cards:
              - type: heading
                icon: mdi:form-textbox
                heading: Dynamic source selectors
                heading_style: subtitle
              - type: markdown
                content: |-
                  <details>
                  <summary><strong>Explanation</strong></summary>

                  Enter the entity IDs for the sources that must feed the OpenQuatt HA
                  proxy sensors.

                  Example values:
                  - `sensor.outdoor_temperature`
                  - `sensor.water_supply_temperature`
                  - `sensor.thermostat_setpoint`
                  - `sensor.thermostat_room_temperature`
                  - `input_boolean.cooling_enable`
                  - `climate.living_room | current_temperature`
                  - `climate.living_room | hvac_mode`

                  Optional attribute format:
                  - `entity_id|attribute_name`
                  Spaces around `|` are ignored.

                  If a source is invalid, the proxy value becomes `Unavailable`.
                  </details>
                text_only: true
              - type: entities
                show_header_toggle: false
                entities:
                  - entity: input_text.openquatt_source_outdoor_temperature
                    name: Outside source entity
                  - entity: input_text.openquatt_source_water_supply_temperature
                    name: Water supply source entity
                  - entity: input_text.openquatt_source_room_setpoint
                    name: Setpoint source entity
                  - entity: input_text.openquatt_source_room_temperature
                    name: Room temperature source entity
                  - entity: input_text.openquatt_source_cooling_enable
                    name: Cooling enable source entity
          - type: vertical-stack
            cards:
              - type: heading
                icon: mdi:database-arrow-right
                heading: HA proxy values and validity
                heading_style: subtitle
              - type: markdown
                content: |-
                  <details>
                  <summary><strong>Explanation</strong></summary>

                  These are the stable HA proxy entities used as the contract towards
                  OpenQuatt.

                  `Valid` should be `on` for all five signals.
                  If `Valid` is `off`, the current source is not numeric.
                  In that case the proxy value is `Unavailable` until the source
                  becomes valid again.
                  </details>
                text_only: true
              - type: entities
                show_header_toggle: false
                entities:
                  - entity: sensor.openquatt_ext_outdoor_temperature
                    name: Proxy outside temperature
                  - entity: binary_sensor.openquatt_ext_outdoor_temperature_valid
                    name: Outside temperature source valid
                  - entity: sensor.openquatt_ext_water_supply_temperature
                    name: Proxy water supply temperature
                  - entity: binary_sensor.openquatt_ext_water_supply_temperature_valid
                    name: Water supply source valid
                  - entity: sensor.openquatt_ext_room_setpoint
                    name: Proxy room setpoint
                  - entity: binary_sensor.openquatt_ext_room_setpoint_valid
                    name: Setpoint source valid
                  - entity: sensor.openquatt_ext_room_temperature
                    name: Proxy room temperature
                  - entity: binary_sensor.openquatt_ext_room_temperature_valid
                    name: Room temperature source valid
                  - entity: binary_sensor.openquatt_ext_cooling_enable
                    name: Proxy cooling enable
                  - entity: binary_sensor.openquatt_ext_cooling_enable_valid
                    name: Cooling enable source valid
          - type: vertical-stack
            cards:
              - type: heading
                icon: mdi:chip
                heading: OpenQuatt HA input signals
                heading_style: subtitle
              - type: markdown
                content: |-
                  <details>
                  <summary><strong>Explanation</strong></summary>

                  These are the five HA input signals as received by OpenQuatt.
                  They should follow the proxy values shown in the middle panel.

                  If a value stays `Unknown`, first check whether the matching
                  `... source valid` sensor is `on`.

                  </details>
                text_only: true
              - type: entities
                show_header_toggle: false
                entities:
                  - entity: sensor.openquatt_ha_outside_temperature
                    name: HA - Outside Temperature
                  - entity: sensor.openquatt_ha_water_supply_temperature
                    name: HA - Water Supply Temperature
                  - entity: sensor.openquatt_ha_thermostat_setpoint
                    name: HA - Thermostat Setpoint
                  - entity: sensor.openquatt_ha_thermostat_room_temperature
                    name: HA - Thermostat Room Temperature
                  - entity: binary_sensor.openquatt_ha_cooling_enable
                    name: HA - Cooling Enable
        column_span: 3
        visibility:
          - condition: state
            entity: binary_sensor.openquatt_ha_dynamic_sources_package_active
            state: 'on'
      - type: grid
        cards:
          - type: heading
            icon: mdi:home-assistant
            heading: Home Assistant source configuration
            heading_style: title
          - type: markdown
            content: >
              **Optional HA source selection not active**


              `openquatt_ha_dynamic_sources_package.yaml` is not loaded.  

              With this optional package you can choose the Home Assistant source
              entities for outside, water supply, room, setpoint, and cooling
              enable at runtime, without reflashing OpenQuatt.


              After installation, extra configuration blocks for dynamic source
              selection will appear here.


              Installation guide:

              [OpenQuatt docs - dynamic source selection via Home
              Assistant](https://jeroen85.github.io/OpenQuatt/dashboard/index.html#optioneel-dynamische-bronselectie-via-home-assistant)
            grid_options:
              columns: full
        column_span: 3
        visibility:
          - condition: state
            entity: binary_sensor.openquatt_ha_dynamic_sources_package_active
            state_not: 'on'
      - type: grid
        cards:
          - type: heading
            heading: Cooling - Dew point, temperature, humidity sources
            heading_style: title
            icon: mdi:snowflake
            grid_options:
              columns: full
              rows: 1
          - type: markdown
            content: |-
              <details>
              <summary><strong>Explanation</strong></summary>

              Configure the dew point, temperature, and humidity source per room
              for cooling.

              Prefer a direct dew point entity per room. If you do not have one,
              enter temperature and relative humidity instead.

              OpenQuatt prefers the direct dew point per room and otherwise
              computes dew point from temperature + RH. For system safety it
              then uses the highest valid room value.

              Increase `Number of rooms` first; the input fields per room will
              appear below.
              </details>
            text_only: true
            grid_options:
              columns: full
          - type: tile
            entity: input_number.openquatt_cooling_room_count
            name: Number of rooms
            hide_state: true
            vertical: false
            features:
              - type: numeric-input
                style: buttons
            features_position: inline
          - type: heading
            icon: mdi:home-thermometer-outline
            heading: Rooms
            heading_style: subtitle
          - type: markdown
            content: >
              **No rooms configured**


              The configured room count is 0. Increase the number of rooms to
              show the input fields.
            visibility:
              - condition: numeric_state
                entity: input_number.openquatt_cooling_room_count
                below: 1
          - type: vertical-stack
            cards:
              - type: heading
                icon: mdi:home-thermometer
                heading: Room 1
                heading_style: subtitle
                grid_options:
                  columns: 12
                  rows: 1
              - type: entities
                show_header_toggle: false
                entities:
                  - entity: input_text.openquatt_source_cooling_room_1_dew_point
                    name: Cooling room 1 dew point entity
                  - entity: input_text.openquatt_source_cooling_room_1_temperature
                    name: Cooling room 1 temperature entity
                  - entity: input_text.openquatt_source_cooling_room_1_humidity
                    name: Cooling room 1 humidity entity
                  - entity: sensor.openquatt_cooling_room_1_dew_point_effective
                    name: Effective dew point
            visibility:
              - condition: numeric_state
                entity: input_number.openquatt_cooling_room_count
                above: 0
          - type: vertical-stack
            cards:
              - type: heading
                icon: mdi:home-thermometer
                heading: Room 2
                heading_style: subtitle
                grid_options:
                  columns: 12
                  rows: 1
              - type: entities
                show_header_toggle: false
                entities:
                  - entity: input_text.openquatt_source_cooling_room_2_dew_point
                    name: Cooling room 2 dew point entity
                  - entity: input_text.openquatt_source_cooling_room_2_temperature
                    name: Cooling room 2 temperature entity
                  - entity: input_text.openquatt_source_cooling_room_2_humidity
                    name: Cooling room 2 humidity entity
                  - entity: sensor.openquatt_cooling_room_2_dew_point_effective
                    name: Effective dew point
            visibility:
              - condition: numeric_state
                entity: input_number.openquatt_cooling_room_count
                above: 1
          - type: vertical-stack
            cards:
              - type: heading
                icon: mdi:home-thermometer
                heading: Room 3
                heading_style: subtitle
                grid_options:
                  columns: 12
                  rows: 1
              - type: entities
                show_header_toggle: false
                entities:
                  - entity: input_text.openquatt_source_cooling_room_3_dew_point
                    name: Cooling room 3 dew point entity
                  - entity: input_text.openquatt_source_cooling_room_3_temperature
                    name: Cooling room 3 temperature entity
                  - entity: input_text.openquatt_source_cooling_room_3_humidity
                    name: Cooling room 3 humidity entity
                  - entity: sensor.openquatt_cooling_room_3_dew_point_effective
                    name: Effective dew point
            visibility:
              - condition: numeric_state
                entity: input_number.openquatt_cooling_room_count
                above: 2
          - type: vertical-stack
            cards:
              - type: heading
                icon: mdi:home-thermometer
                heading: Room 4
                heading_style: subtitle
                grid_options:
                  columns: 12
                  rows: 1
              - type: entities
                show_header_toggle: false
                entities:
                  - entity: input_text.openquatt_source_cooling_room_4_dew_point
                    name: Cooling room 4 dew point entity
                  - entity: input_text.openquatt_source_cooling_room_4_temperature
                    name: Cooling room 4 temperature entity
                  - entity: input_text.openquatt_source_cooling_room_4_humidity
                    name: Cooling room 4 humidity entity
                  - entity: sensor.openquatt_cooling_room_4_dew_point_effective
                    name: Effective dew point
            visibility:
              - condition: numeric_state
                entity: input_number.openquatt_cooling_room_count
                above: 3
          - type: vertical-stack
            cards:
              - type: heading
                icon: mdi:home-thermometer
                heading: Room 5
                heading_style: subtitle
                grid_options:
                  columns: 12
                  rows: 1
              - type: entities
                show_header_toggle: false
                entities:
                  - entity: input_text.openquatt_source_cooling_room_5_dew_point
                    name: Cooling room 5 dew point entity
                  - entity: input_text.openquatt_source_cooling_room_5_temperature
                    name: Cooling room 5 temperature entity
                  - entity: input_text.openquatt_source_cooling_room_5_humidity
                    name: Cooling room 5 humidity entity
                  - entity: sensor.openquatt_cooling_room_5_dew_point_effective
                    name: Effective dew point
            visibility:
              - condition: numeric_state
                entity: input_number.openquatt_cooling_room_count
                above: 4
          - type: vertical-stack
            cards:
              - type: heading
                icon: mdi:home-thermometer
                heading: Room 6
                heading_style: subtitle
                grid_options:
                  columns: 12
                  rows: 1
              - type: entities
                show_header_toggle: false
                entities:
                  - entity: input_text.openquatt_source_cooling_room_6_dew_point
                    name: Cooling room 6 dew point entity
                  - entity: input_text.openquatt_source_cooling_room_6_temperature
                    name: Cooling room 6 temperature entity
                  - entity: input_text.openquatt_source_cooling_room_6_humidity
                    name: Cooling room 6 humidity entity
                  - entity: sensor.openquatt_cooling_room_6_dew_point_effective
                    name: Effective dew point
            visibility:
              - condition: numeric_state
                entity: input_number.openquatt_cooling_room_count
                above: 5
        column_span: 3
      - type: grid
        cards:
          - type: heading
            icon: mdi:thermostat-box
            heading: OpenTherm thermostat
            heading_style: title
          - type: markdown
            content: |-
              <details>
              <summary><strong>Explanation</strong></summary>

              This block shows the direct OpenTherm thermostat link.
              Use it to verify that OpenQuatt sees thermostat heat/cooling intent
              and room values without going through CIC or Home Assistant.

              Check these first when OT behavior looks wrong:
              - `OpenTherm Enabled`
              - `OT link problem`
              - `Thermostat CH enable`
              - `Control setpoint`
              - `Room setpoint`
              - `Room temperature`

              </details>
            text_only: true
          - type: entities
            show_header_toggle: false
            entities:
              - entity: switch.openquatt_opentherm_enabled
                name: OpenTherm Enabled
              - entity: binary_sensor.openquatt_ot_link_problem
                name: OT link problem
              - entity: binary_sensor.openquatt_ot_thermostat_ch_enable
                name: Thermostat CH enable
              - entity: binary_sensor.openquatt_ot_thermostat_cooling_enable
                name: Thermostat cooling enable
              - entity: sensor.openquatt_ot_control_setpoint
                name: Control setpoint
              - entity: sensor.openquatt_ot_room_setpoint
                name: Room setpoint
              - entity: sensor.openquatt_ot_room_temperature
                name: Room temperature
      - type: grid
        cards:
          - type: heading
            icon: mdi:cloud-check
            heading_style: title
            heading: Quatt CiC configuration
          - type: markdown
            content: |-
              <details>
              <summary><strong>Explanation</strong></summary>

              This block shows CiC feed health.
              If feed health degrades or data becomes stale, CIC-backed sources
              may become unusable for selected signals.

              Check these first when values look wrong:
              - `JSON feed OK`
              - `Data stale`
              - `Last success age`

              </details>
            text_only: true
          - type: entities
            show_header_toggle: false
            entities:
              - entity: switch.openquatt_cic_enable_polling
                name: Enable polling
              - entity: binary_sensor.openquatt_cic_json_feed_ok
                name: JSON feed OK
              - entity: binary_sensor.openquatt_cic_data_stale
                name: Data stale
              - entity: text.openquatt_cic_feed_url
                name: CIC feed URL
    cards: []
    header:
      card:
        type: markdown
        content: |-
          # <ha-icon icon="mdi:source-branch"></ha-icon> Sensor configuration

          Configure source selection and source mapping, then verify per signal
          the selected value and source status.
    top_margin: false
    dense_section_placement: false
  - title: Tuning
    path: tuning
    icon: mdi:tune-vertical
    type: sections
    max_columns: 3
    sections:
      - type: grid
        cards:
          - type: heading
            icon: mdi:volume-off
            heading: Silent mode settings
            heading_style: title
          - type: markdown
            content: >-
              <details>

              <summary><strong>Parameter explanation</strong></summary>


              - **Day max level / Silent max level** limit the maximum
              compressor level during normal or silent hours.

              - **Silent start/end time** defines the time window in which the
              silent cap is active.

              </details>
            text_only: true
          - type: entities
            show_header_toggle: false
            entities:
              - entity: number.openquatt_day_max_level
                name: Day max level
              - entity: number.openquatt_silent_max_level
                name: Silent max level
              - entity: time.openquatt_silent_start_time
                name: Silent start time
              - entity: time.openquatt_silent_end_time
                name: Silent end time
      - type: grid
        cards:
          - type: heading
            icon: mdi:home-thermometer-outline
            heading: House model (PH)
            heading_style: title
          - type: markdown
            content: >-
              <details>

              <summary><strong>Parameter explanation</strong></summary>


              - **House cold temp** and **Rated maximum house power (Pr)**
              together define heat-demand scale at cold conditions.

              - **Maximum heating outdoor temperature** is the point where model
              heat demand approaches ~0.

              - **PH Kp** defines how strongly room temperature error
              is translated into heat demand (W).

              - **Deadband** suppresses tiny corrections and reduces hunting.

              - `Effective room target = setpoint + comfort bias`.

              - **Comfort bias base** is the minimum upward shift and is always
              active. With `0.1`, control never targets below `setpoint + 0.1`.

              - **Comfort bias max** is the maximum upward shift and also the
              warm-side correction cap anchor: `setpoint + bias max`.

              - **Comfort above setpoint** is extra warm margin above
              `effective target` before negative correction starts, but only up
              to the cap above.

              - **Comfort below setpoint** is the cold-side margin below
              `effective target` before extra heating correction starts.

              - Warm-side edge:
              `Tr_high = min(effective_target + comfort_above, setpoint + bias_max)`.

              - Example: setpoint `20.0`, base `0.1`, max `0.4`, above `0.5`
              yields a maximum warm edge of `20.4`. If this is too warm:
              lower `comfort above`, then `bias base` (possibly `0.0`), and if
              needed lower `bias max`.

              - **Comfort bias up/down** and **room error avg tau** control
              how quickly bias adapts over time.

              - **Response profile** is a quick preset for calmer, balanced, or
              more responsive Power House behavior. As soon as rise and fall
              time no longer match a preset, the profile automatically shows
              `Custom`.

              - **Demand rise time** is the approximate time `P_req` may take
              to move from `0` to `Pr`. Lower = faster ramp-up.

              - **Demand fall time** is the approximate time `P_req` may take
              to move from `Pr` back to `0`. Lower = faster pullback on
              overshoot.

              - **Low-load dynamic OFF/ON factor** tune when Power House
              may release or re-arm heat request around low load.

              - **Low-load minimum hysteresis** keeps OFF and ON thresholds
              sufficiently apart to reduce chattering.

              - **Low-load CM2 re-entry block** delays CM2 re-entry after an
              idle-exit trip unless demand clearly recovers.

              </details>
            text_only: true
          - type: entities
            show_header_toggle: false
            entities:
              - entity: number.openquatt_house_cold_temp
                name: House cold temp
              - entity: number.openquatt_maximum_heating_outdoor_temperature
                name: Maximum heating outdoor temperature (P=0 temp)
              - entity: number.openquatt_rated_maximum_house_power
                name: Rated maximum house power (Pr)
              - entity: number.openquatt_power_house_kp_w_k
                name: PH Kp (W/K)
              - entity: number.openquatt_power_house_deadband
                name: PH deadband
              - entity: number.openquatt_power_house_comfort_below_setpoint
                name: PH comfort below SP
              - entity: number.openquatt_power_house_comfort_above_setpoint
                name: PH comfort above SP
              - entity: number.openquatt_power_house_comfort_bias_base
                name: PH bias base
              - entity: number.openquatt_power_house_comfort_bias_max
                name: PH bias max
              - entity: number.openquatt_power_house_comfort_bias_up
                name: PH bias up
              - entity: number.openquatt_power_house_comfort_bias_down
                name: PH bias down
              - entity: number.openquatt_power_house_room_error_avg_tau
                name: PH room avg tau
              - entity: select.openquatt_power_house_response_profile
                name: PH response profile
              - entity: number.openquatt_power_house_demand_rise_time
                name: PH rise time
              - entity: number.openquatt_power_house_demand_fall_time
                name: PH fall time
              - entity: number.openquatt_low_load_dynamic_off_factor
                name: Low-load dynamic OFF factor
              - entity: number.openquatt_low_load_dynamic_on_factor
                name: Low-load dynamic ON factor
              - entity: number.openquatt_low_load_minimum_hysteresis
                name: Low-load minimum hysteresis
              - entity: number.openquatt_low_load_cm2_re_entry_block
                name: Low-load CM2 re-entry block
      - type: grid
        cards:
          - type: heading
            icon: mdi:chart-bell-curve
            heading: Heating curve control
            heading_style: title
          - type: markdown
            content: >-
              <details>

              <summary><strong>Parameter explanation</strong></summary>


              - **Supply points** form the heating curve: desired supply
              temperature for different outdoor temperatures.

              - First tune curve points for baseline comfort, then fine-tune PID.

              - **Fallback supply** is used when outdoor temperature is
              temporarily unavailable.

              - `Heating Curve Control Profile` selects the built-in control
              behavior for stability (including smoothing/hysteresis behavior).

              - **PID Kp/Ki/Kd** defines correction on system supply
              temperature:
                - Kp too high: fast but nervous response.
                - Ki too high: slow oscillation/overshoot.
                - Keep Kd low in slow hydraulic systems.

              </details>
            text_only: true
          - type: entities
            show_header_toggle: false
            entities:
              - entity: number.openquatt_curve_tsupply_20degc
                name: Supply @ -20C
              - entity: number.openquatt_curve_tsupply_10degc
                name: Supply @ -10C
              - entity: number.openquatt_curve_tsupply_0degc
                name: Supply @ 0C
              - entity: number.openquatt_curve_tsupply_5degc
                name: Supply @ 5C
              - entity: number.openquatt_curve_tsupply_10degc_2
                name: Supply @ 10C
              - entity: number.openquatt_curve_tsupply_15degc
                name: Supply @ 15C
              - entity: number.openquatt_curve_fallback_tsupply_no_outside_temp
                name: Fallback supply
              - entity: select.openquatt_heating_curve_control_profile
                name:
                  type: entity
              - entity: number.openquatt_heating_curve_pid_kp
                name: Heating Curve PID Kp
              - entity: number.openquatt_heating_curve_pid_ki
                name: Heating Curve PID Ki
              - entity: number.openquatt_heating_curve_pid_kd
                name: Heating Curve PID Kd
      - type: grid
        cards:
          - type: heading
            icon: mdi:water-thermometer
            heading: Water temperature limit
            heading_style: title
          - type: markdown
            content: >-
              <details>

              <summary><strong>Parameter explanation</strong></summary>


              - Uses `Water Supply Temp (Selected)` as the measured limit source.

              - **Maximum water temperature** is the normal ceiling for measured
              supply temperature.

              - **Soft band** starts the rollback below that ceiling. Power House
              reduces effective requested heat most strongly between `max - band`
              and `max`.

              - **Trip** is the absolute upper limit. In `CM3` the boiler drops
              out first; a hard HP stop follows only if the overshoot persists.


              </details>
            text_only: true
          - type: entities
            show_header_toggle: false
            entities:
              - entity: number.openquatt_maximum_water_temperature
                name: Maximum water temperature
              - entity: number.openquatt_water_temperature_soft_band
                name: Water temperature soft band
              - entity: number.openquatt_maximum_water_temperature_trip
                name: Maximum water temperature trip
      - type: grid
        cards:
          - type: heading
            icon: mdi:heat-wave
            heading: Heat allocation
            heading_style: title
          - type: markdown
            content: >-
              <details>

              <summary><strong>Parameter explanation</strong></summary>


              - **Minimum runtime** keeps a started compressor on for at least
              `300 s`. You can lengthen this runtime, but not lower it.

              - **Demand filter ramp up** controls how many demand steps per
              minute `Demand filtered` may rise toward `Demand raw` in Power
              House mode.

              - In heating-curve mode, PID demand is passed through directly;
              allocation is single-HP-first with dual-enable hysteresis and
              sequential level steps.

              - In Power House mode, OpenQuatt compares the best single-HP and
              dual-HP options, prefers the lower-power topology by default, and
              lets a less efficient topology win only when heat match is clearly
              better. Switches toward a higher-power topology are held briefly to
              reduce back-and-forth switching.

              - **Dual HP enable level (lvl)** defines at which sustained
              single-HP compressor level a second HP may be enabled in
              heating-curve mode.

              - Disable level is derived internally as `enable - 1` to keep tuning
              compact.

              - **Enable/disable hold** adds time hysteresis to damp frequent
              toggling in heating-curve mode.

              - Lower enable level or shorter enable-hold = faster second-HP
              activation in heating-curve mode.

              - Longer disable-hold = dual-HP stays active longer in
              heating-curve mode.


              </details>
            text_only: true
          - type: entities
            show_header_toggle: false
            entities:
              - entity: number.openquatt_minimum_runtime
                name: Minimum runtime
              - entity: number.openquatt_demand_filter_ramp_up
                name: Demand filter ramp up
              - entity: number.openquatt_dual_hp_enable_level
                name: Dual HP enable level
              - entity: number.openquatt_dual_hp_enable_hold
                name: Dual HP enable hold
              - entity: number.openquatt_dual_hp_disable_hold
                name: Dual HP disable hold
      - type: grid
        cards:
          - type: heading
            icon: mdi:tune-variant
            heading: Flow tuning
            heading_style: title
          - type: markdown
            content: >-
              <details>

              <summary><strong>Parameter explanation</strong></summary>


              - **Flow PI Kp/Ki** defines flow-control dynamics; adjust in small
              steps.


              </details>
            text_only: true
          - type: entities
            show_header_toggle: false
            entities:
              - entity: number.openquatt_flow_pi_kp
                name: Flow PI Kp
              - entity: number.openquatt_flow_pi_ki
                name: Flow PI Ki
      - type: grid
        cards:
          - type: heading
            icon: mdi:fire
            heading: Boiler control
            heading_style: title
          - type: markdown
            content: >-
              <details>

              <summary><strong>Parameter explanation</strong></summary>

              - **CM3 deficit ON/OFF thresholds** define when boiler assist may
              switch on/off.

              - Boiler assist is still blocked by the water temperature limit
              when measured supply temperature gets too high.

              - Keep ON clearly higher than OFF to reduce toggling around the
              threshold.

              - If behavior is too aggressive: increase ON or decrease OFF.


              </details>
            text_only: true
          - type: entities
            show_header_toggle: false
            entities:
              - entity: number.openquatt_cm3_deficit_on_threshold
                name: CM3 deficit ON threshold
              - entity: number.openquatt_cm3_deficit_off_threshold
                name: CM3 deficit OFF threshold
      - type: grid
        column_span: 2
        cards:
          - type: heading
            icon: mdi:speedometer-medium
            heading: Excluded compressor levels
            heading_style: title
          - type: markdown
            content: >-
              <details>

              <summary><strong>Parameter explanation</strong></summary>


              - Select up to two compressor levels per HP that allocation logic
              should skip.

              - `None` means: no exclusion for that slot.

              - If a requested level is excluded, OpenQuatt searches down first
              and only then up.

              - Usually you keep both slots on `None`; only exclude levels for
              testing, noise, or specific constraints.

              - If both slots point to the same level, that still counts as a
              single exclusion.


              </details>
            text_only: true
            grid_options:
              columns: full
              rows: auto
          - type: entities
            title: HP1 excluded levels
            show_header_toggle: false
            entities:
              - entity: select.openquatt_hp1_excluded_compressor_level_a
                name: Excluded level A
              - entity: select.openquatt_hp1_excluded_compressor_level_b
                name: Excluded level B
              - entity: sensor.openquatt_hp1_excluded_compressor_levels
                name: Active exclusions
          - type: entities
            title: HP2 excluded levels
            show_header_toggle: false
            entities:
              - entity: select.openquatt_hp2_excluded_compressor_level_a
                name: Excluded level A
              - entity: select.openquatt_hp2_excluded_compressor_level_b
                name: Excluded level B
              - entity: sensor.openquatt_hp2_excluded_compressor_levels
                name: Active exclusions
    header:
      card:
        type: markdown
        content: >-
          # <ha-icon icon="mdi:tune-vertical"></ha-icon> Tuning

          Structural control tuning for limits, house model, heating curve, heat
          allocation, and flow.
    cards: []
  - title: Service & Test
    path: service-test
    icon: mdi:toolbox-outline
    type: sections
    max_columns: 3
    sections:
      - type: grid
        cards:
          - type: heading
            icon: mdi:tools
            heading: Runtime / hours
            heading_style: title
          - type: markdown
            content: >-
              <details>

              <summary><strong>Parameter explanation</strong></summary>


              - **Reset runtime counters**. Note: it can take up to 1 minute
              before the effect is visible.

              - **Reset cumulative energy counters** sets cumulative electricity
              and thermal energy counters back to 0.

              - **HP1/HP2 Runtime counters** show the current counters used for
              runtime balancing.

              - **Runtime lead HP** shows which unit is currently selected as
              lead based on the lowest runtime.


              </details>
            text_only: true
          - type: entities
            show_header_toggle: false
            entities:
              - entity: button.openquatt_reset_runtime_counters_hp1_hp2
                name: Reset runtime counters
              - entity: button.openquatt_reset_cumulative_energy_counters
                name: Reset cumulative energy counters
              - entity: sensor.openquatt_hp1_runtime_hours
                name: HP1 Runtime
              - entity: sensor.openquatt_hp2_runtime_hours
                name: HP2 Runtime
              - entity: sensor.openquatt_runtime_lead_hp
                name: Runtime lead HP
      - type: grid
        cards:
          - type: heading
            icon: mdi:tools
            heading: Flow autotune
            heading_style: title
          - type: markdown
            content: >-
              <details>

              <summary><strong>Parameter explanation</strong></summary>


              - Start **Flow autotune** only on a stable installation without
              active faults.

              - Set `u_step` and `max duration` first, then start autotune.

              - Apply `Apply autotune Kp/Ki` only if suggested values are
              sensible.


              </details>
            text_only: true
          - type: entities
            show_header_toggle: false
            entities:
              - entity: switch.openquatt_flow_autotune_enable
                name: Flow autotune enable
              - entity: button.openquatt_flow_autotune_start
                name: Flow autotune start
              - entity: button.openquatt_flow_autotune_abort
                name: Flow autotune abort
              - entity: button.openquatt_apply_flow_autotune_kp_ki
                name: Apply autotune Kp/Ki
              - entity: number.openquatt_flow_autotune_u_step_ipwm
                name: Autotune u_step (iPWM)
              - entity: number.openquatt_flow_autotune_max_duration_s
                name: Autotune max duration
              - entity: number.openquatt_flow_autotune_kp_suggested
                name: Autotune Kp suggested
              - entity: number.openquatt_flow_autotune_ki_suggested
                name: Autotune Ki suggested
              - entity: sensor.openquatt_flow_autotune_status
                name: Autotune status
      - type: grid
        cards:
          - type: heading
            icon: mdi:flask-outline
            heading: Manual Modbus test reader
            heading_style: title
          - type: markdown
            content: |-
              <details>
              <summary><strong>Explanation</strong></summary>

              One-shot manual register read for debugging/testing:

              - First set the register number.
              - Then press **Debug Read HP1 register** or **Debug Read HP2 register**.
              - Result is shown as `U16` and `S16`.

              </details>
            text_only: true
          - type: entities
            show_header_toggle: false
            entities:
              - entity: number.openquatt_debug_modbus_register
                name: Modbus register
              - entity: button.openquatt_debug_read_hp1_register
                name: Debug Read HP1 register
              - entity: button.openquatt_debug_read_hp2_register
                name: Debug Read HP2 register
              - entity: sensor.openquatt_debug_modbus_value_u16
                name: Result U16
              - entity: sensor.openquatt_debug_modbus_value_s16
                name: Result S16
              - entity: sensor.openquatt_debug_modbus_last_target
                name: Last target
    header:
      card:
        type: markdown
        content: >-
          # <ha-icon icon="mdi:toolbox-outline"></ha-icon> Service & Test

          Manual service actions and temporary test tooling.
    cards: []
  - title: Diagnostics
    path: diagnostics
    icon: mdi:stethoscope
    type: sections
    max_columns: 3
    sections:
      - type: grid
        cards:
          - type: heading
            icon: mdi:tag-text
            heading: Version information
            heading_style: title
          - type: markdown
            content: |-
              <details>

              <summary><strong>Explanation</strong></summary>

              This block shows firmware version and OTA update status:

              - `OpenQuatt Version`: version currently running on the ESP
              (from build-time `project_version`).
              - `OpenQuatt Release Channel`: build channel currently running
              on the ESP (`main` or `dev`).
              - `Firmware Update Channel`: selects which OTA track the update
              entity follows next (`main` or `dev`).
              - `Firmware Update`: compares your installed firmware with the
              latest GitHub release and indicates if an update is available.
              - `Check Firmware Updates`: forces an immediate update check
              (without waiting for the next scheduled poll).

              Note: after a new release, the update entity may take a short
              time to reflect the latest version (cache/refresh interval).

              </details>
            text_only: true
          - type: entities
            title: Version
            show_header_toggle: false
            entities:
              - entity: sensor.openquatt_openquatt_version
                name: OpenQuatt Version
              - entity: sensor.openquatt_openquatt_release_channel
                name: OpenQuatt Release Channel
              - entity: select.openquatt_firmware_update_channel
                name: Firmware Update Channel
              - entity: update.openquatt_firmware_update
                name: Firmware Update
              - entity: button.openquatt_check_firmware_updates
                name: Check Firmware Updates
          - type: heading
            icon: mdi:chip
            heading: Controller information
            heading_style: title
          - type: markdown
            content: |-
              <details>

              <summary><strong>Explanation</strong></summary>

              Basic runtime diagnostics of the controller:

              - `Status`: online/offline state of the ESP node.
              - `Uptime`: time since last reboot.
              - `ESP Internal Temperature`: controller die temperature for enclosure/thermal diagnostics.
              - `IP Address`: current network address.
              - `WiFi SSID`: connected wireless network.
              - `WiFi Signal`: RSSI signal strength in dBm.
              - `ESPHome Version`: version of the ESPHome runtime.
              - `Restart`: reboots the controller node from Home Assistant.

              </details>
            text_only: true
          - type: entities
            title: Controller
            show_header_toggle: false
            entities:
              - entity: binary_sensor.openquatt_status
                name: Status
              - entity: sensor.openquatt_uptime
                name: Uptime
              - entity: sensor.openquatt_esp_internal_temperature
                name: ESP Internal Temperature
              - entity: sensor.openquatt_ip_address
                name: IP Address
              - entity: sensor.openquatt_wifi_ssid
                name: WiFi SSID
              - entity: sensor.openquatt_wifi_signal
                name: WiFi Signal
              - entity: sensor.openquatt_esphome_version
                name: ESPHome Version
              - entity: button.openquatt_restart
                name: Restart
      - type: grid
        column_span: 1
        cards:
          - type: heading
            icon: mdi:home-lightning-bolt
            heading: PH diagnostics
            heading_style: title
          - type: markdown
            content: >-
              <details>


              <summary><strong>Explanation</strong></summary>


              Use this block to inspect PH control behavior.


              - Relevant when PH control is active.

              - `P_house` is the model estimate based on outdoor temperature.

              - `P_req` is the limited heat request after deadband/ramp limiter.

              - `Effective room target = room setpoint + comfort bias`.

              - `Comfort bias` shows the adaptive warm-bias governor state.

              If `P_req` looks unexpectedly high/low: check outside source, room
              setpoint/temp, and ramp/deadband tuning.


              </details>
            text_only: true
          - type: entities
            show_header_toggle: false
            entities:
              - entity: sensor.openquatt_outside_temperature_selected
                name: Outside temp (selected)
              - entity: sensor.openquatt_room_setpoint_selected
                name: Room setpoint (selected)
              - entity: sensor.openquatt_room_temperature_selected
                name: Room temp (selected)
              - entity: sensor.openquatt_power_house_effective_room_target
                name: Effective room target
              - entity: sensor.openquatt_power_house_comfort_bias
                name: Comfort bias
              - entity: sensor.openquatt_power_house_p_house
                name: P_house
              - entity: sensor.openquatt_power_house_p_req
                name: P_req
      - type: grid
        column_span: 1
        cards:
          - type: heading
            icon: mdi:radiator
            heading: Heating Curve diagnostics
            heading_style: title
          - type: markdown
            content: >-
              <details>

              <summary><strong>Explanation</strong></summary>


              Use this block to inspect heating-curve behavior step by step.


              - This section is most relevant when heating-curve control is active.

              - First compare `Supply target` and `Supply actual` to see control
              error.

              - Use `Heating Curve PID` and `Reset PID integral` for fine tuning
              when response is too slow or too nervous.

              - `Outside temp (selected)` helps explain why `Supply target`
              rises or drops.


              </details>
            text_only: true
          - type: entities
            show_header_toggle: false
            entities:
              - entity: climate.openquatt_heating_curve_pid
                name: Heating Curve PID
              - entity: sensor.openquatt_outside_temperature_selected
                name: Outside temp (selected)
              - entity: sensor.openquatt_heating_curve_supply_target
                name: Supply target
              - entity: sensor.openquatt_water_supply_temp_selected
                name: Supply actual (selected)
              - entity: button.openquatt_reset_heating_curve_pid_integral
                name: Reset PID integral
    cards: []
    header:
      card:
        type: markdown
        content: >-
          # <ha-icon icon="mdi:stethoscope"></ha-icon> Diagnostics

          Controller and firmware diagnostics, focused on troubleshooting.
