node-red-contrib-home-assistant
node-red-contrib-home-assistant copied to clipboard
History Node Not Filtering Per Entity
Describe the bug The history node does not seem to respect the entity filter. A node is set up with the entity filter set to strictly a specific entity but the returned output is an array of all entities. This functionality was added in #28
To Reproduce Steps to reproduce the behavior:
- Add an inject node, Get History node, and debug node
- Manually configure the Get History node with start and end dates and a specific entity to filter
- Wire nodes in sequence
- Manually start the flow
Expected behavior The Get History node should return an array containing only the chosen entity's updates for the given time period
Screenshots
Flow setup
Returned message contents (took ~65 seconds to generate history for past 30 minutes on RPI3)
Example Flow
[
{
"id": "9b2880f5.09aad",
"type": "inject",
"z": "77a95d32.723cc4",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 700,
"y": 580,
"wires": [
[
"9bf26de6.02c38"
]
]
},
{
"id": "9bf26de6.02c38",
"type": "api-get-history",
"z": "77a95d32.723cc4",
"name": "Tool0 History",
"server": "aad53eb0.732ad",
"startdate": "2018-09-19T03:26:38.952Z",
"enddate": "2018-09-19T03:56:38.952Z",
"entityid": "sensor.octoprint_actual_tool0_temp",
"entityidtype": "is",
"x": 990,
"y": 620,
"wires": [
[
"6ef015a5.cca53c"
]
]
},
{
"id": "6ef015a5.cca53c",
"type": "debug",
"z": "77a95d32.723cc4",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"x": 1050,
"y": 740,
"wires": []
},
{
"id": "aad53eb0.732ad",
"type": "server",
"z": "",
"name": "Home Assistant",
"url": "http://hassio/homeassistant",
"pass": "redacted"
}
]
Environment (please complete the following information):
- Node Red Version: 0.19.1
- NR Home Assistant Plugin Version: 0.3.2
- Is Node Red running in Docker: Yes - Frenck's hass.io addon version 0.6.1
Other (please complete the following information):
- Have you searched previous issues for duplicates?: Yes
- Did you attempt to reproduce the issue in the dev docker environment, if so what were results (See README.md): No
Additional context