Skip to content

Add an explicit way to signal we don't want to set power for a battery pool anymore #600

@llucax

Description

@llucax

Coming from #591 (comment)

For now we are accepting set_power(0) to say we don't want to set power for a battery pool anymore, even if the exclusion bounds says we can't set the power to 0 (the battery pool will accept 0 as a special case and forward it even if it is out of bounds).

This is not a very clear interface. When there are exclusion bounds that forbid 0 as a value, as an user it is confusing. If I want to stop using a battery but the bounds say I can't set power to 0, I still have to send a set_power(0). Maybe someone will just send the lowest power accepted by the bounds instead, thinking that they can't use 0.

It would be better to have an explicit way to say "release this battery(pool)".

Either set_power(None) or maybe even a different method, like battery_pool.release().

Then the implementation can still send 0 even if it is out of bounds, that's fine.

This might be implemented / solved in #161.

Metadata

Metadata

Assignees

Labels

part:power-managementAffects the management of battery power and distributionresolution:wontfixThis will not be worked onscope:breaking-changeBreaking change, users will need to update their codetype:enhancementNew feature or enhancement visitble to users

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions