Rename VentInfo to Measurements, add heater element water temperature to Home Assistant data

This commit is contained in:
Jarno Rankinen 2023-02-28 20:47:47 +02:00
parent b6450914d1
commit 6053698552
5 changed files with 37 additions and 28 deletions

View File

@ -44,13 +44,14 @@ type pingvinRegister struct {
Multiplier int `json:"multiplier"`
}
type pingvinVentInfo struct {
type pingvinMeasurements struct {
Roomtemp1 float32 `json:"room_temp1"` // Room temperature at panel 1
SupplyHeated float32 `json:"supply_heated"` // Temperature of supply air after heating
SupplyHrc float32 `json:"supply_hrc"` // Temperature of supply air after heat recovery
SupplyIntake float32 `json:"supply_intake"` // Temperature of outside air at device
SupplyIntake24h float32 `json:"supply_intake_24h"` // 24h avg of outside air humidity
SupplyHum float32 `json:"supply_hum"` // Supply air humidity
Watertemp float32 `json:"watertemp"` // Heater element return water temperature
ExtractIntake float32 `json:"extract_intake"` // Temperature of extract air
ExtractHrc float32 `json:"extract_hrc"` // Temperature of extract air after heat recovery
ExtractHum float32 `json:"extract_hum"` // Relative humidity of extract air
@ -58,17 +59,17 @@ type pingvinVentInfo struct {
}
type pingvinStatus struct {
HeaterPct int `json:"heater_pct"` // After heater valve position
HrcPct int `json:"hrc_pct"` // Heat recovery turn speed
TempSetting float32 `json:"temp_setting"` // Requested room temperature
FanPct int `json:"fan_pct"` // Circulation fan setting
VentInfo pingvinVentInfo `json:"vent_info"` // Measurements
HrcEffIn int `json:"hrc_efficiency_in"` // Calculated HRC efficiency, intake
HrcEffEx int `json:"hrc_efficiency_ex"` // Calculated HRC efficiency, extract
OpMode string `json:"op_mode"` // Current operating mode, text representation
DaysUntilService int `json:"days_until_service"` // Days until next filter service
Uptime string `json:"uptime"` // Unit uptime
SystemTime string `json:"system_time"` // Time and date in unit
HeaterPct int `json:"heater_pct"` // After heater valve position
HrcPct int `json:"hrc_pct"` // Heat recovery turn speed
TempSetting float32 `json:"temp_setting"` // Requested room temperature
FanPct int `json:"fan_pct"` // Circulation fan setting
Measurements pingvinMeasurements `json:"measurements"` // Measurements
HrcEffIn int `json:"hrc_efficiency_in"` // Calculated HRC efficiency, intake
HrcEffEx int `json:"hrc_efficiency_ex"` // Calculated HRC efficiency, extract
OpMode string `json:"op_mode"` // Current operating mode, text representation
DaysUntilService int `json:"days_until_service"` // Days until next filter service
Uptime string `json:"uptime"` // Unit uptime
SystemTime string `json:"system_time"` // Time and date in unit
}
var (

View File

@ -18,6 +18,7 @@ views:
- entity: sensor.enervent_pingvin_supply_air_hrc
- entity: sensor.enervent_pingvin_outside_air_humidity
- entity: sensor.enervent_pingvin_supply_air
- entity: sensor.enervent_pingvin_heater_return_water
- entity: sensor.enervent_pingvin_extract_air
- entity: sensor.enervent_pingvin_waste_air
- entity: sensor.enervent_pingvin_extract_air_humidity

View File

@ -6,7 +6,7 @@ rest:
value_template: "{{ value_json['op_mode'] }}"
icon: mdi:information
- name: "Enervent Pingvin room temperature 1"
value_template: "{{ value_json['vent_info']['room_temp1'] }}"
value_template: "{{ value_json['measurements']['room_temp1'] }}"
unit_of_measurement: "°C"
- name: "Enervent Pingvin heating"
value_template: "{{ value_json['heater_pct'] }}"
@ -37,24 +37,27 @@ rest:
unit_of_measurement: "pv"
icon: mdi:calendar
- name: "Enervent Pingvin supply air"
value_template: "{{ value_json['vent_info']['supply_heated'] }}"
value_template: "{{ value_json['measurements']['supply_heated'] }}"
unit_of_measurement: "°C"
- name: "Enervent Pingvin supply air HRC"
value_template: "{{ value_json['vent_info']['supply_hrc'] }}"
value_template: "{{ value_json['measurements']['supply_hrc'] }}"
unit_of_measurement: "°C"
- name: "Enervent Pingvin outside air"
value_template: "{{ value_json['vent_info']['supply_intake'] }}"
value_template: "{{ value_json['measurements']['supply_intake'] }}"
unit_of_measurement: "°C"
- name: "Enervent Pingvin outside air 24h"
value_template: "{{ value_json['vent_info']['supply_intake_24h'] }}"
value_template: "{{ value_json['measurements']['supply_intake_24h'] }}"
unit_of_measurement: "°C"
- name: "Enervent Pingvin outside air humidity"
value_template: "{{ value_json['vent_info']['supply_hum'] }}"
value_template: "{{ value_json['measurements']['supply_hum'] }}"
unit_of_measurement: "%"
icon: mdi:water-percent
- name: "Enervent Pingvin heater return water"
value_template: "{{ value_json['measurements']['watertemp'] }}"
unit_of_measurement: "°C"
- name: "Enervent Pingvin extract air"
value_template: "{{ value_json['vent_info']['extract_intake'] }}"
value_template: "{{ value_json['measurements']['extract_intake'] }}"
unit_of_measurement: "°C"
- name: "Enervent Pingvin waste air"
value_template: "{{ value_json['vent_info']['extract_hrc'] }}"
value_template: "{{ value_json['measurements']['extract_hrc'] }}"
unit_of_measurement: "°C"

View File

@ -18,6 +18,7 @@ views:
- entity: sensor.enervent_pingvin_tuloilma_lto
- entity: sensor.enervent_pingvin_tuloilma_kosteus
- entity: sensor.enervent_pingvin_tuloilma
- entity: sensor.enervent_pingvin_paluuvesi
- entity: sensor.enervent_pingvin_poistoilma
- entity: sensor.enervent_pingvin_jateilma
- entity: sensor.enervent_pingvin_poistoilma_kosteus_48h

View File

@ -6,7 +6,7 @@ rest:
value_template: "{{ value_json['op_mode'] }}"
icon: mdi:information
- name: "Enervent Pingvin huonelämpötila 1"
value_template: "{{ value_json['vent_info']['room_temp1'] }}"
value_template: "{{ value_json['measurements']['room_temp1'] }}"
unit_of_measurement: "°C"
- name: "Enervent Pingvin lämmitys"
value_template: "{{ value_json['heater_pct'] }}"
@ -37,24 +37,27 @@ rest:
unit_of_measurement: "pv"
icon: mdi:calendar
- name: "Enervent Pingvin tuloilma"
value_template: "{{ value_json['vent_info']['supply_heated'] }}"
value_template: "{{ value_json['measurements']['supply_heated'] }}"
unit_of_measurement: "°C"
- name: "Enervent Pingvin tuloilma LTO"
value_template: "{{ value_json['vent_info']['supply_hrc'] }}"
value_template: "{{ value_json['measurements']['supply_hrc'] }}"
unit_of_measurement: "°C"
- name: "Enervent Pingvin tuloilma ulko"
value_template: "{{ value_json['vent_info']['supply_intake'] }}"
value_template: "{{ value_json['measurements']['supply_intake'] }}"
unit_of_measurement: "°C"
- name: "Enervent Pingvin tuloilma ulko 24h"
value_template: "{{ value_json['vent_info']['supply_intake_24h'] }}"
value_template: "{{ value_json['measurements']['supply_intake_24h'] }}"
unit_of_measurement: "°C"
- name: "Enervent Pingvin tuloilma kosteus"
value_template: "{{ value_json['vent_info']['supply_hum'] }}"
value_template: "{{ value_json['measurements']['supply_hum'] }}"
unit_of_measurement: "%"
icon: mdi:water-percent
- name: "Enervent Pingvin paluuvesi"
value_template: "{{ value_json['measurements']['watertemp'] }}"
unit_of_measurement: "°C"
- name: "Enervent Pingvin poistoilma"
value_template: "{{ value_json['vent_info']['extract_intake'] }}"
value_template: "{{ value_json['measurements']['extract_intake'] }}"
unit_of_measurement: "°C"
- name: "Enervent Pingvin jäteilma"
value_template: "{{ value_json['vent_info']['extract_hrc'] }}"
value_template: "{{ value_json['measurements']['extract_hrc'] }}"
unit_of_measurement: "°C"