This is a custom integration for Home Assistant that can be used to modify, patch or overwrite constants in other components. It cannot be setup via UI, but requires configuration via your configuration.yaml file.
Use this button to add the repository to your HACS custom repositories:
Or use following procedure for HACS 2.0 or later to add the custom repository:
- Open the HACS panel in your Home Assistant frontend.
- Click the three dots in the top-right corner and select "Custom Repositories."
- Add a new custom repository via the Popup dialog:
- Repository URL:
https://github.com/thomluther/ha-constant-modifier - Type: Integration
- Repository URL:
- Click "Add" and verify that the
HA constant modifierrepository was added to the list. - Close the Popup dialog and verify that
HA constant modifierintegration is now listed in the Home Assistant Community Store. - You cannot install the integration via the Home Assistant UI, but you need to configure it as described below
- It was observed that when adding the repository to HACS via the button, an error may occur although it was added. You may check if you can find HA constant modifier listed as possible HACS integration to be installed. If not, try to add the repository again.
- After adding the custom repository and installing the integration under HACS, you must restart Home Assistant to pick up the changes in your custom integration folder
- HA 2024.02 will report the required restart automatically under problems
- After HA restart, you can configure the integration through your
configuration.yamlfile.
- Using the tool of choice to open the directory (folder) for your HA configuration (where your
configuration.yamlis located, e.g./homeassistant) - If you do not have a
custom_componentsdirectory (folder) there, you need to create it - In the
custom_componentsdirectory (folder) create a new folder calledconstant_modifier - Download all the files from the
custom_components/constant_modifier/directory (folder) in this repository - Place the files you downloaded in the new directory (folder) you created
- Restart Home Assistant
- In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "HA constant modifier"
- Even if listed, you cannot configure the integration via the UI but need to configure it through your
configuration.yamlfile.
Open your Home Assistant configuration.yaml file and add the HA component modules and any constants you want to modify. For example:
constant_modifier:
zhaquirks.xiaomi:
MotionCluster.reset_s: 5 # default 70
OccupancyCluster.reset_s: 180 # default 600This integration was forked from original component, which does not seem to be maintained anymore. The main purpose for me to modify it for latest HA versions is to modify ZHA device constants, such as Aqara/Xiaomi occupancy timeout and motion reset timeout, which otherwise cannot be modified easily through the ZHA integration. This is discussed in length in HA community forum post Xiaomi Human / Body / Motion Sensor - Timeout
Original version of ha-constant-modifier was authored by @walthowd.
If you like this project, please give it a star on GitHub
