Home Assistant integration for Sensit devices.
Sensors supported:
- Temperature sensor
- Battery sensor
For now, only local mode is supported: raw data must be pushed to Home Assistant is a sensor called 'sensor.DEVICE_ID' with the ID of your Sensit. To do, you can rely on callback (see below).
- Add integration on your platform:
- With HACS (advised): follow the initial configuration and add this GitHub repository as Custom repository (HACS, Integrations, dots top-right of page).
- Manually: copy files in custom_components/sensit folder on your Home assistant instance in the config folder, with the same path custom_components/sensit
- Home assistant must be restarted after installation.
- On the integration page of home assistent, click Add integration
- Select Sensit integration.
- Configure the new Sensit in the integration:
- Add device ID
- Choose a unique name for your sensit (can be the same as ID)
- Choose Version (1, 2 or 3)
- Optionnaly, choose mode (only local is supported for now).
- Repeat from 4 of you want to do more sensits.
- Create a Long-lived access token in home assistant
- Go to your profile.
- Click on 'Create token' at the bottom of page.
- Connect to the Sigfox backend
- Go to Callback page of the device type with sensits
- Create new Custom Callback:
- Select Data uplink
- Channel URL
- URL pattern https://HOST:PORT/api/states/sensor.{device}
- Mode POST
- Check send SNi
- Add a 'authorization' header with value 'Bearer YOUR_TOKEN'
- Set application/json as Content type.
- Set data.
Data can be customized, for the integration, we will only need the raw data pushed to sensor.deviceID Data example:
{
"state": "{data}", "attributes": {"friendly_name": "Sensit raw data", "version": "v2", "id": "{device}"}
}
More details on Home Assistant HTTP Sensors in the documentation.