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

Power Production not valued #50

Closed
siegelpeter opened this issue Aug 12, 2024 · 5 comments
Closed

Power Production not valued #50

siegelpeter opened this issue Aug 12, 2024 · 5 comments
Labels
bug Something isn't working P1 Priority

Comments

@siegelpeter
Copy link

siegelpeter commented Aug 12, 2024

Version of the custom_component

1.7 la

Configuration

algorithm:
  initial_temp: 1000
  min_temp: 0.1
  cooling_factor: 0.95
  max_iteration_number: 100

devices:
  - name: "Reservoir pump"
    # The switch that controls the tank pump
    entity_id: "switch.eg_bad_licht_schalter"
    # the power of this pump
    power_max: 50
    # Always usable
    # check_usable_template: "{{ True }}"
    # 15 min minimum activation
    duration_min: 15
    # 5 min deactivation minimum
    duration_stop_min: 5
    # On enable/disable via a service call
    action_mode: "service_call"
    # The service enabling the switch
    activation_service: "switch/turn_on"
    # The service to deactivate the switch
    deactivation_service: "switch/turn_off"

grafik

Active Power:
grafik

net Consumption:
grafik
Is negative when power is exported (most of the day)

Describe the bug

the device is turned on as soon as there is enough power. This works well. But in the evening there is not enough power the device is not turned off.
The Logs say that power production is not valued. but according to homeassistant it has the value 0. What can i do?

Debug log


Logger: custom_components.solar_optimizer.coordinator
Quelle: custom_components/solar_optimizer/coordinator.py:116
Integration: Solar Optimizer (Dokumentation, Probleme)
Erstmals aufgetreten: 11. August 2024 um 22:45:20 (99 Vorkommnisse)
Zuletzt protokolliert: 21:05:20

Power production is not valued. Solar Optimizer will be disabled

@jmcollin78
Copy link
Owner

Hello, yes this is something I also have seen. I will fix that.
The bug is, when the production is 0 or undefined, the calculation stops but forget to turn off all device.

@jmcollin78 jmcollin78 added bug Something isn't working P1 Priority labels Aug 14, 2024
@siegelpeter
Copy link
Author

Thank you

@siegelpeter
Copy link
Author

Tried to fix this by deactivating the devices like this:

        power_production = get_safe_float(self.hass, self._power_production_entity_id)
        if not power_production:
            _LOGGER.warning(
                "Power production is not valued. Solar Optimizer will be disabled"
            )
            for _, device in enumerate(self._devices):
                await device.deactivate()
            return None

But i get the following error in the logs:
Logger: homeassistant.helpers.service
Quelle: helpers/service.py:301

Referenced entities light.bad_eg are missing or not currently available

As im new to python and ha development i do not know why this is happening. Can you point me in the right direction?

would it make sense to simply return 0 if the power is not valued instead of aborting ?

@jmcollin78
Copy link
Owner

Tried to fix this by deactivating the devices like this:

        power_production = get_safe_float(self.hass, self._power_production_entity_id)
        if not power_production:
            _LOGGER.warning(
                "Power production is not valued. Solar Optimizer will be disabled"
            )
            for _, device in enumerate(self._devices):
                await device.deactivate()
            return None

But i get the following error in the logs: Logger: homeassistant.helpers.service Quelle: helpers/service.py:301

Referenced entities light.bad_eg are missing or not currently available

As im new to python and ha development i do not know why this is happening. Can you point me in the right direction?

would it make sense to simply return 0 if the power is not valued instead of aborting ?

Thank you I will test that.

@jmcollin78
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 Priority
Projects
None yet
Development

No branches or pull requests

2 participants