Configuration Options¶
- class hass_inspirair.env_config.EnvConfigMeta
Configuration options for the application.
The following order will be applied while looking options up.
Environment variables
Config file
default values defined here
- HI_CFG_LANGUAGE = 'de'
The language in which selection options and entity names will be registered
- HI_CFG_LOGLEVEL = 'INFO'
logging level
- HI_MQTT_HOST = 'localhost'
MQTT Broker Hostname
- HI_MQTT_PORT = 1883
MQTT Broker Port
- HI_MQTT_PREFIX = 'homeassistant'
MQTT topic prefix, which will be applied on every request
- HI_MQTT_USERNAME = ''
MQTT username
- HI_MQTT_PASSWORD = ''
MQTT password
- HI_MODBUS_CLIENT = 'hass_inspirair.modbus.client.get_async_serial_client'
“<package>.<function>” which should be used to create an modbus client.
e.g. “hass_inspirair.modbus.client.get_async_serial_client” will basically result in an import of the following form:
from hass_inspirair.modbus.client import get_async_serial_client
- HI_MODBUS_SLAVE_ID = 2
Slave id used to connect to
- HI_MODBUS_POLLING_INTERVALL = 30
Frequency of polling in seconds
- HI_MODBUS_SERIAL_DEVICE = '/dev/ttyACM'
Serial device when using hass_inspirair.modbus.client.get_async_serial_client
- HI_MODBUS_TCP_HOST = 'localhost'
Hostname when using hass_inspirair.modbus.client.get_async_tcp_client
- HI_MODBUS_TCP_PORT = 5020
Port when using hass_inspirair.modbus.client.get_async_tcp_client
config.ini¶
Config values in the ini file will be translated into config values.
[cfg]
language: de
loglevel: INFO
[mqtt]
host: localhost
port: 1883
prefix: homeassistant
username:
password:
[modbus]
client: hass_inspirair.modbus.client.get_async_serial_client
polling_intervall: 30
slave_id: 2
[modbus_tcp]
host: localhost
port: 5020
[modbus_serial]
device: /dev/ttyACM