-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem adding a second S40 in local mode using hostnames #317
Comments
btw: Thanks for this repo- great work! |
Yeah that's a bug, I fixed this in last release for cloud connections. I'll work on a fix. What are the specific host names you have so I can make sure I fix it right? |
|
Please provide an example domain name preserving any - or _ or . In the name. For example my_domain-pete.net aa_bbbbbb-cccc.net |
I did- my guess is that you need to replace |
possibly moving to a whitelist form instead of blacklisting specific characters and just removing all characters not in |
I think what happens is when end up with a double underscore and that causes HA to declare the entity id invalid. When I made the change in #310 I only did it for the cloud branch. |
According to the error message it's probably the |
I can't change the algorithm output as it'll break existing installs - at least when it outputs something valid. I do agree that the suggested approach would be simple and robust. |
Yeah, not surprising, but too bad! |
I took your recommendation, other approaches were looking more difficult. It will only cause a minor breakage for those who have more than one thermostat. |
If you want to test it, grab the __init__.py file from here https://github.com/PeteRager/lennoxs30/tree/connection-state-fix/custom_components/lennoxs30 Replace it in your custom component install and restart HA |
Since that'll change existing installations (ip addresses drop their self.connection_state = "lennoxs30.conn_" + re.sub("_+", "_", re.sub("[^A-Za-z0-9]","_",self._ip_address)) |
So that will "_+" will remove all double or triple underscores? |
Yeah, |
Thanks for your help. I've tried to avoid learning regex for 20+ years...thanks for giving me my first lesson. I've adjusted the changes. They are in this branch: https://github.com/PeteRager/lennoxs30/tree/2023.3.0 with this pull request |
Should be addressed in latest release 2024.3.0. Thanks for the help. |
Thanks! I'll update and test! re: regex: I've used them too much in the last 20+ years. Fully understand not wanting to be tainted with them :D |
Totally worked- thanks again! |
Describe the bug
I just installed 2 S40's, one for each furnace (upstairs and downstairs). I'm using a hostname, not an IP address, and the names are:
upstairs-hvac.<redacted>.net
downstairs-hvac.<redacted>.net
Upstairs worked just fine, but downstairs gets this error and fails to setup:
homeassistant.exceptions.InvalidEntityFormatError: Invalid entity id encountered: lennoxs30.conn_downstairs-hvac_<redacted>_net. Format should be <domain>.<object_id>
After a bunch of testing, I re-added the downstairs S40 with its IP address, and it worked. Strange that the hostname worked for upstairs, but not downstairs?
Version
**Integration Configuration **
Additional context
When adding the S40's, I installed the upstairs one first and it immediately worked. I've never gotten the downstairs one to add at all. I tried multiple combinations of removing the failed integration, restarting HA, and restarting the thermostat. The app_id for upstairs is
ha_up
, and I've generally triedha_down
for the downstairs one.The text was updated successfully, but these errors were encountered: