Zastosuj sensor node
z pakietu HA
[
{
"id": "34db4660906ab92a",
"type": "ha-sensor",
"z": "89ad645d5d0accb6",
"name": "",
"entityConfig": "ce1fee6eac3da320",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [
{
"property": "value",
"value": "payload.value",
"valueType": "msg"
},
{
"property": "value2",
"value": "payload.value2",
"valueType": "msg"
},
{
"property": "value3",
"value": "payload.value3",
"valueType": "msg"
}
],
"inputOverride": "allow",
"outputProperties": [],
"x": 1070,
"y": 60,
"wires": [
[]
]
},
{
"id": "ab951c35188d7113",
"type": "api-current-state",
"z": "89ad645d5d0accb6",
"name": "",
"server": "7463fdcca985ae84",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "sensor.cr_kuchnia_battery",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 840,
"y": 60,
"wires": [
[
"34db4660906ab92a"
]
]
},
{
"id": "189f7b9abd65c3aa",
"type": "inject",
"z": "89ad645d5d0accb6",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 600,
"y": 60,
"wires": [
[
"ab951c35188d7113"
]
]
},
{
"id": "ce1fee6eac3da320",
"type": "ha-entity-config",
"server": "7463fdcca985ae84",
"deviceConfig": "",
"name": "Battery in or Out",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Battery in or Out"
},
{
"property": "icon",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": "power"
},
{
"property": "unit_of_measurement",
"value": "W"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "7463fdcca985ae84",
"type": "server",
"name": "Home Assistant",
"version": 5,
"addon": false,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": true,
"heartbeatInterval": "30",
"areaSelector": "friendlyName",
"deviceSelector": "friendlyName",
"entitySelector": "friendlyName",
"statusSeparator": ": ",
"statusYear": "hidden",
"statusMonth": "short",
"statusDay": "numeric",
"statusHourCycle": "default",
"statusTimeFormat": "h:m",
"enableGlobalContextStore": true
}
]