I resolved it as follows. Not quite sure what exactly was the problem. I believe the directory structures get corrupted somehow.
- Go to the config directory and look for the hidden directory “.storage”. Delete any “Evohome_custom” entries. On a Mac you make these files visible by pressing “cmd shift .”
- Delete the directory for “Evohome_custom” in the “custom_components” directory and all the files in it, especially the pycache directory.
- Go to the GitHub location for the official Evohome component. Copy all the files (is a bit cumbersome) and put them into a new custom_components directory called “evohome_custom”.
- In the “const.py” file change: DOMAIN = “evohome_custom”.
- In the “manifest.json” file change: “domain”: “evohome_custom”.
- In the same file ensure there is a version key entry: “version”: “1.0.0” #any version will do
- In the “init.py” file ensure you only have the following entries:
from homeassistant.const import (
ATTR_ENTITY_ID,
CONF_PASSWORD,
CONF_SCAN_INTERVAL,
CONF_USERNAME,
TEMP_CELSIUS,
)
- Then in your config file refer to the proper component name.
evohome_custom:
username: !secret evohome_username
password: !secret evohome_password
scan_interval: 300
location_idx: 1 #or any other location you have defined
- Then check whether it is all correct, with “Configuration, settings, check configuration”.
- Repair any mistakes that are generated.
- If you get the error “evohome_custom” not found and you are sure to have executed above steps diligently, do a cold start of home assistant by briefly interrupting the power to your machine. A restart from the “configuration, settings” will not work. After a cold start the “evohome_custom” directory will be recognised.