-
Notifications
You must be signed in to change notification settings - Fork 274
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
Shelly 3EM, PlugS, Plus PlugS, PM MINI Gen3 - added model ids, discov… #2902
base: master
Are you sure you want to change the base?
Conversation
…ery_by , only_self_usage
"device_type": "smart_switch", | ||
"calculation_strategy": "fixed", | ||
"only_self_usage": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be true for smart switches with built-in powermeter. See https://docs.powercalc.nl/library/device-types/smart-switch/#smart-switch-with-built-in-powermeter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shelly 3EM has 4 clamps for phase measurement, and on top of that, it has a relay. This relay is not equipped with measurement capabilities. Hence we should add an option to the user to add fixed consumption.
Note, I didn't change smart_switch into power_meter intentionally. Not even provided profiles (even though we were discussing such an option). I decided that based on the fact, that the relay is an integral part of the Shelly 3EM, it's discovered by core HA integration as well as Shelly MQTT Discovery script. If the maintainer who is configuring it via yaml (like me) wants to use the full capabilities of PowerCalc, it should add a switch to the device.
Otherwise, we would face a lack of feature, in case such a user decides to add the switch later - we have no configuration flow to change the profile alone.
IMO it's cleaner to make this requirement from the beginning.
This device however decides to re-measure, to distinguish self-consumption with and without relay on. I'm gonna do that in the near future, since right now I have both my 3EMs installed in the switchboard (planned to be replaced by Pro 3EM)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see and agree, need to give it some thought.
This device does have only 1 switch entity in HA, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct
No new measurements per se.
Changes to already existing profiles (not power measurements)
All devices get:
alias
containing model iddiscovery_by
attributedevice
entity
(unchanged behavior)only_self_usage
attributetrue
false
(unchanged behavior)on top of that:
fixed_config
entry since not neededPS. If you don't mind, I reordered attributes to group them by the meaning