Shelly Verbraucher: dopppelte Einstellung entfernt - #3915
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Removing phase from the Shelly module config silently drops existing persisted values and should be handled with an explicit upgrade/legacy warning or migration to avoid unexpected phase-mapping behavior after updates.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Entfernt die doppelte Phasen-Einstellung in den Shelly-Verbraucher-Modulen, indem die Phasenlage nicht mehr im Shelly-spezifischen Modul-Config-Objekt gehalten wird, sondern aus der allgemeinen Verbraucher-Konfiguration (consumer config.phase_1) bezogen wird.
Changes:
- Shelly PM/EM Verbraucher lesen die Phasenlage nun aus
control.data.consumer_data[..].data.config.phase_1für dieparse_data(...)-Zuordnung. - Entfernt das Feld
phaseaus den Shelly-spezifischenShellyConfiguration-Klassen.
File summaries
| File | Description |
|---|---|
| packages/modules/consumers/shelly/shelly_pm/consumer.py | Nutzt consumer config.phase_1 statt Shelly-Modul-Config für die Phasen-Zuordnung beim Parsen. |
| packages/modules/consumers/shelly/shelly_pm/config.py | Entfernt die modul-spezifische phase-Einstellung aus der Shelly-PM-Konfiguration. |
| packages/modules/consumers/shelly/shelly_em/consumer.py | Nutzt consumer config.phase_1 statt Shelly-Modul-Config für die Phasen-Zuordnung beim Parsen. |
| packages/modules/consumers/shelly/shelly_em/config.py | Entfernt die modul-spezifische phase-Einstellung aus der Shelly-EM-Konfiguration. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| def __init__(self, | ||
| ip_address: Optional[str] = None, | ||
| factor: int = -1, | ||
| phase: int = 1, | ||
| username: Optional[str] = None, | ||
| password: Optional[str] = None) -> None: |
| def __init__(self, | ||
| ip_address: Optional[str] = None, | ||
| factor: int = -1, | ||
| phase: int = 1, | ||
| channel: int = 0, | ||
| username: Optional[str] = None, |
|
@LKuemmel mir ist gerade auch noch aufgefallen das beim Shelly Consumer ein Problem gibt, dass man die ohne User und PW nicht angelegen kann. Ich hab aber kein User und PW eingestellt, ohne dem lässt sich Shelly EM und PM aber nicht anlegen :)
|
|
Scheint mit diesem PR jetzt aber doch wieder zu gehen, ohne diesen gings nicht. Ignorier also was ich geschrieben hab :) |

No description provided.