Skip to content
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

IndexError: list index out of range #40

Open
AlbertHakvoort opened this issue Jul 13, 2023 · 2 comments
Open

IndexError: list index out of range #40

AlbertHakvoort opened this issue Jul 13, 2023 · 2 comments

Comments

@AlbertHakvoort
Copy link

I get the following error

Starting discovery process...Found 1 spas
Connecting to spa Wellis at 172.xx.xx.xx ... connected!
Heater: Temperature 37.0°C, SetPoint 34.0°C, Real SetPoint 34.0°C, Operation Cooling
Pump 1: OFF
Lights: OFF
WaterCare: Waiting...
Smart Winter Mode:Risk: NO
Circulating Pump: OFF
Ozone: OFF
Smart Winter Mode:Active: False
Filter Status:Clean: False
Filter Status:Purge: False
Economy Mode: False
Error Sensor: VSP1CommLost, VSP2CommLost
Welcome to the Gecko shell. Type help or ? to list commands.

Wellis$ LOG> ERROR Unhandled exception in receive_handler func
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/geckolib/driver/udp_socket.py", line 181, in dispatch_recevied_data
receive_handler.handled(remote_end)
File "/usr/local/lib/python3.9/dist-packages/geckolib/driver/udp_protocol_handler.py", line 101, in handled
self._on_handled(self, sender)
File "/usr/local/lib/python3.9/dist-packages/geckolib/automation/watercare.py", line 64, in _on_watercare
self._on_change(self, old_mode, self.active_mode)
File "/usr/local/lib/python3.9/dist-packages/geckolib/driver/observable.py", line 39, in _on_change
f"{self.class.name} {sender} changed "
File "/usr/local/lib/python3.9/dist-packages/geckolib/automation/watercare.py", line 92, in str
return f"{self.name}: {GeckoConstants.WATERCARE_MODE_STRING[self.active_mode]}"
IndexError: list index out of range

@AlbertHakvoort
Copy link
Author

If nothing selected in the scheduler, it wil send a empty state. I added a extra MODE state to solve the error

WATERCARE_MODE = (
AwayFromHome,
Standard,
EnergySaving,
SuperEnergySaving,
Weekender,
NotSet,
) = range(6)

WATERCARE_MODE_STRING = [
    "Away From Home",
    "Standard",
    "Energy Saving",
    "Super Energy Saving",
    "Weekender",
    "Not Set",

@AlbertHakvoort
Copy link
Author

photo_2023-07-13_15-27-07

After selecting the Mode the problem is also solved.. You can't deselect it ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant