M8-T11: add WarmteLink discovery and history API

This commit is contained in:
2026-08-23 21:22:06 +02:00
parent 4884a19e3d
commit a9458394f2
8 changed files with 671 additions and 38 deletions
+115 -6
View File
@@ -1945,7 +1945,7 @@
}
},
{
"name": "start",
"name": "from",
"in": "query",
"required": false,
"schema": {
@@ -1958,11 +1958,11 @@
"type": "null"
}
],
"title": "Start"
"title": "From"
}
},
{
"name": "end",
"name": "to",
"in": "query",
"required": false,
"schema": {
@@ -1975,7 +1975,7 @@
"type": "null"
}
],
"title": "End"
"title": "To"
}
}
],
@@ -3462,6 +3462,27 @@
"title": "CatalogEntrySchema",
"description": "An entity from the catalog with its current toggle state."
},
"ChannelBindingSummaryResponse": {
"properties": {
"count": {
"type": "integer",
"title": "Count"
},
"meter_ids": {
"items": {
"type": "integer"
},
"type": "array",
"title": "Meter Ids"
}
},
"type": "object",
"required": [
"count",
"meter_ids"
],
"title": "ChannelBindingSummaryResponse"
},
"ChannelReadingResponse": {
"properties": {
"recorded_at": {
@@ -4055,6 +4076,67 @@
"title": "DeviceInfoSchema",
"description": "HA device grouping info for an exposable entity."
},
"DiscoverChannelResponse": {
"properties": {
"uuid": {
"type": "string",
"title": "Uuid"
},
"label": {
"type": "string",
"title": "Label"
},
"unit": {
"type": "string",
"title": "Unit"
},
"latest_value": {
"anyOf": [
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
},
{
"type": "null"
}
],
"title": "Latest Value"
},
"latest_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Latest At"
},
"latest_quality": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Latest Quality"
}
},
"type": "object",
"required": [
"uuid",
"label",
"unit",
"latest_value",
"latest_at",
"latest_quality"
],
"title": "DiscoverChannelResponse"
},
"DiscoverResponse": {
"properties": {
"requested": {
@@ -4069,6 +4151,17 @@
"type": "string",
"title": "Status"
},
"request_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Request Id"
},
"detail": {
"anyOf": [
{
@@ -4079,6 +4172,13 @@
}
],
"title": "Detail"
},
"channels": {
"items": {
"$ref": "#/components/schemas/DiscoverChannelResponse"
},
"type": "array",
"title": "Channels"
}
},
"type": "object",
@@ -4691,12 +4791,17 @@
"total": {
"type": "integer",
"title": "Total"
},
"source_status": {
"type": "string",
"title": "Source Status"
}
},
"type": "object",
"required": [
"items",
"total"
"total",
"source_status"
],
"title": "MeterSourceChannelListResponse"
},
@@ -4781,6 +4886,9 @@
},
"type": "array",
"title": "Bound Meter Ids"
},
"binding_summary": {
"$ref": "#/components/schemas/ChannelBindingSummaryResponse"
}
},
"type": "object",
@@ -4794,7 +4902,8 @@
"latest_at",
"latest_quality",
"binding_count",
"bound_meter_ids"
"bound_meter_ids",
"binding_summary"
],
"title": "MeterSourceChannelResponse"
},
+73 -4
View File
@@ -1467,7 +1467,7 @@ paths:
minimum: 1
default: 100
title: Limit
- name: start
- name: from
in: query
required: false
schema:
@@ -1475,8 +1475,8 @@ paths:
- type: string
format: date-time
- type: 'null'
title: Start
- name: end
title: From
- name: to
in: query
required: false
schema:
@@ -1484,7 +1484,7 @@ paths:
- type: string
format: date-time
- type: 'null'
title: End
title: To
responses:
'200':
description: Successful Response
@@ -2597,6 +2597,21 @@ components:
- enabled
title: CatalogEntrySchema
description: An entity from the catalog with its current toggle state.
ChannelBindingSummaryResponse:
properties:
count:
type: integer
title: Count
meter_ids:
items:
type: integer
type: array
title: Meter Ids
type: object
required:
- count
- meter_ids
title: ChannelBindingSummaryResponse
ChannelReadingResponse:
properties:
recorded_at:
@@ -3050,6 +3065,43 @@ components:
- name
title: DeviceInfoSchema
description: HA device grouping info for an exposable entity.
DiscoverChannelResponse:
properties:
uuid:
type: string
title: Uuid
label:
type: string
title: Label
unit:
type: string
title: Unit
latest_value:
anyOf:
- type: string
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
- type: 'null'
title: Latest Value
latest_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Latest At
latest_quality:
anyOf:
- type: string
- type: 'null'
title: Latest Quality
type: object
required:
- uuid
- label
- unit
- latest_value
- latest_at
- latest_quality
title: DiscoverChannelResponse
DiscoverResponse:
properties:
requested:
@@ -3061,11 +3113,21 @@ components:
status:
type: string
title: Status
request_id:
anyOf:
- type: integer
- type: 'null'
title: Request Id
detail:
anyOf:
- type: string
- type: 'null'
title: Detail
channels:
items:
$ref: '#/components/schemas/DiscoverChannelResponse'
type: array
title: Channels
type: object
required:
- requested
@@ -3542,10 +3604,14 @@ components:
total:
type: integer
title: Total
source_status:
type: string
title: Source Status
type: object
required:
- items
- total
- source_status
title: MeterSourceChannelListResponse
MeterSourceChannelResponse:
properties:
@@ -3593,6 +3659,8 @@ components:
type: integer
type: array
title: Bound Meter Ids
binding_summary:
$ref: '#/components/schemas/ChannelBindingSummaryResponse'
type: object
required:
- uuid
@@ -3605,6 +3673,7 @@ components:
- latest_quality
- binding_count
- bound_meter_ids
- binding_summary
title: MeterSourceChannelResponse
MeterSourceCreate:
properties: