HomeAssistant Sensor for OilFox using the official customer API.
If you habe some problems or ideas just let me know!
It is listed in HACS, just search for "OilFox". If you prefer the manual installation, it is done like other custom components :)
Please use the configuration flow in system - settings - integration
Important: the yaml configuration has been removed in version 1.0.1 release! Please use the config flow.
Option Flow since version 1.0.1 to modify the http timeout:
2022-09-17 17:12:31.584 WARNING (MainThread) [custom_components.oilfox.sensor] Import yaml configration settings into config flow
After installing the component and configure the sensor new entities will be added. Something like sensor.oilfox_hadwareid_sensor
Multiple Devices on the OilFox account are supported.
Enable the Debug Log in the Intergration Menu available in Settings - Integration - OilFox
For debug log messages you need to adjust the log config for custom_components.oilfox.sensor based on the HA documentation Example configuration.yaml
logger:
default: info
logs:
custom_components.oilfox: debug
The API only provides text based battery status. In order to convert them into some numeric values I used the following mapping:
FULL = 100%
GOOD = 70%
MEDIUM = 50%
WARNING" = 20%
CRITICAL = 0%
These values should work with Low battery level detection & notification for all battery sensors.
The API provides text based validationError status. Used the mappings based on the Documentation:
NO_METERING = No measurement yet
EMPTY_METERING = Incorrect Measurement
NO_EXTRACTED_VALUE = No fill level detected
SENSOR_CONFIG = Faulty measurement
MISSING_STORAGE_CONFIG = Storage configuration missing
INVALID_STORAGE_CONFIG = Incorrect storage configuration
DISTANCE_TOO_SHORT = Measured distance too small
ABOVE_STORAGE_MAX = Storage full
BELOW_STORAGE_MIN = Calculated filling level implausible
This component is using the official OilFox customer Api
As this is my first homeassistant component there is a lot to impove. If I have time I will try to get this component more to the homeassisant recommendations