zerog2k
(Jens J )
September 5, 2025, 11:44pm
1
I’m trying to setup the HA integration w/ Things Network v3.
The issue I’m running into is that one of the entities is missing, i.e. door_open
(which should be of boolean type).
Here is the decoded payload in TTN:
The value of door_open
is always either true
or false
.
But I don’t see that one in the list of entities in the integration. (I see all the other items though.) So I’m confused as to why it’s not showing up.
I did turn on debug logging for the Things Network integration, and I did find this in the logs:
2025-09-05 18:37:11.949 DEBUG (MainThread) [homeassistant.components.thethingsnetwork.coordinator] fetched data: {'eui-70b3d57ed0068816': {'battery_percentage': TTN_Value(58), 'battery_voltage': TTN_Value(3.78), 'door_open': TTN_Value(False), 'message_counter': TTN_Value(592), 'message_type': TTN_Value(heartbeat), 'temperature': TTN_Value(25)}}
But door_open still does not show up in the entity list. I’m not sure where to go next…
1 Like
zerog2k
(Jens J )
September 6, 2025, 1:18am
2
Ok after a bit of playing around, this appears to be an issue where boolean sensors are not detected or created by the integration.
I see the integration code handles ttn_client.TTNSensorValue,
"""The Things Network's integration sensors."""
import logging
from ttn_client import TTNSensorValue
from homeassistant.components.sensor import SensorEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.typing import StateType
from .const import CONF_APP_ID, DOMAIN
from .entity import TTNEntity
but this class only handles types of string, int, or float.
There is a separate ttn_client.TTNBinarySensorValue which handles boolean.
But this does not appear to be handled by the things network integration.
I’m not sure why there is a separate ttn client sensor type.
@angelnu might you have ideas here?
Would you like me to create an issue on the HA core github?
1 Like
zerog2k
(Jens J )
September 6, 2025, 1:21am
3
Ok, hmm, looks like maybe there was a PR to add support here, but not sure why it never got merged, but closed out?
dev
← angelnu:binary_sensor
opened 09:20PM - 21 Aug 24 UTC
## Breaking change
## Proposed change
Implement Binary Sensors which i… s already supported by the client library
## Type of change
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [X] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
- This PR fixes or closes issue: NA
- This PR is related to issue: NA
- Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/34394
## Checklist
- [X] The code change is tested and works locally.
- [X] Local tests pass. **Your PR cannot be merged unless tests pass**
- [X] There is no commented out code in this PR.
- [X] I have followed the [development checklist][dev-checklist]
- [X] I have followed the [perfect PR recommendations][perfect-pr]
- [X] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [X] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [X] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [ ] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
To help with the load of incoming pull requests:
- [ ] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr