golles / ha-kamstrup_403

Custom component that integrates the Kamstrup 403 heating system into Home Assistant. This component does also support a few other heating systems
MIT License
70 stars 10 forks source link

Why do I have 28 hidden entities? #95

Closed JohNan closed 1 year ago

JohNan commented 1 year ago

Did you read the instructions?

The problem

There's 28 hidden entities which are never populated with a value. Is this by design or is something not working correclty?

Integration version

2.5.0

Home Assistant version

core-2023.6.1

Python version

3.11.3

Home Assistant log

2023-06-09 13:13:57.283 DEBUG (MainThread) [custom_components.kamstrup_403] Start update
2023-06-09 13:13:57.283 DEBUG (MainThread) [custom_components.kamstrup_403] Get values for [60, 68, 99, 113, 1001, 1004]
2023-06-09 13:13:58.010 DEBUG (MainThread) [custom_components.kamstrup_403] New value for sensor 60, value: 30.648 MWh
2023-06-09 13:13:58.010 DEBUG (MainThread) [custom_components.kamstrup_403] New value for sensor 68, value: 638.34 m³
2023-06-09 13:13:58.011 DEBUG (MainThread) [custom_components.kamstrup_403] New value for sensor 99, value: 0.0 
2023-06-09 13:13:58.011 DEBUG (MainThread) [custom_components.kamstrup_403] New value for sensor 113, value: 6.0 
2023-06-09 13:13:58.011 DEBUG (MainThread) [custom_components.kamstrup_403] New value for sensor 1001, value: 72092005.0 
2023-06-09 13:13:58.011 DEBUG (MainThread) [custom_components.kamstrup_403] New value for sensor 1004, value: 15380.0 h
2023-06-09 13:13:58.011 DEBUG (MainThread) [custom_components.kamstrup_403] Finished update, 0 out of 6 readings failed
2023-06-09 13:13:58.012 DEBUG (MainThread) [custom_components.kamstrup_403] Finished fetching kamstrup_403 data in 0.729 seconds (success: True)

Diagnostics

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.6.1",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.3",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Stockholm",
    "os_name": "Linux",
    "os_version": "6.1.21-v8",
    "supervisor": "2023.06.1",
    "host_os": "Home Assistant OS 10.2",
    "docker_version": "23.0.6",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
   ...
    "kamstrup_403": {
      "version": "2.5.0",
      "requirements": [
        "pyserial==3.5"
      ]
    }
   ...
  },
  "integration_manifest": {
    "domain": "kamstrup_403",
    "name": "Kamstrup 403",
    "codeowners": [
      "@golles"
    ],
    "config_flow": true,
    "documentation": "https://github.com/golles/ha-kamstrup_403/blob/main/README.md",
    "iot_class": "local_polling",
    "issue_tracker": "https://github.com/golles/ha-kamstrup_403/issues",
    "requirements": [
      "pyserial==3.5"
    ],
    "version": "2.5.0",
    "is_built_in": false
  },
  "data": {
    "config_entry": {
      "entry_id": "51c1f994ec19b4acee33c2e09bbfb382",
      "version": 1,
      "domain": "kamstrup_403",
      "title": "socket://192.168.1.123:4001",
      "data": {
        "port": "socket://192.168.1.123:4001"
      },
      "options": {
        "scan_interval": 120,
        "timeout": 3.0
      },
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "unique_id": null,
      "disabled_by": null
    },
    "data": {
      "60": {
        "value": 30.648,
        "unit": "MWh"
      },
      "68": {
        "value": 638.34,
        "unit": "m\u00b3"
      },
      "99": {
        "value": 0.0,
        "unit": ""
      },
      "113": {
        "value": 6.0,
        "unit": ""
      },
      "1001": {
        "value": 72092005.0,
        "unit": ""
      },
      "1004": {
        "value": 15380.0,
        "unit": "h"
      }
    },
    "registered_commands": [
      60,
      68,
      99,
      113,
      1001,
      1004
    ]
  }
}

Additional information

Here's a screenshot of the entities

Screenshot 2023-06-09 at 13 03 53
golles commented 1 year ago

Hi, this is by design, most meters have a battery, and reading data will impact battery life. This component can read up to 8 sensors in one reading, so I kept the number of enabled sensors under this number. If you like some of the hidden sensors, you can click on them, the cog wheel, and then enable them, during the next update they will have a value (if your meter supports that sensor).

I didn't write this in the instructions, as I assumed this is the standard behavior of HA (keep some entities enabled), do you think I should add it?

JohNan commented 1 year ago

Aha! Now I feel a bit stupid. 😅 I just read that they were Unavailable and never looked further.

I think it might be a good addition to the Readme.

Thank you for a great integration and specifically for making it possible to read from a socket. I had to put a Raspberry pi next to my heating central and forward the USB connected IR reader using socat. It works like a charm 😊