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

Calling the configure max soc service switches the charging program to standard #229

Closed
josephdouce opened this issue May 21, 2024 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@josephdouce
Copy link
Contributor

josephdouce commented May 21, 2024

The problem

Calling the configure max soc service switches the charging program to standard.

Is this the desired behaviour?

What version of MBAPI2020 do use?

v0.13.0

What was the last working version of MBAPI2020?

v0.13.0

What type of installation are you running?

Home Assistant OS

Diagnostics information

config_entry-mbapi2020-8214be536ccc11f2e4386e0cdfb082d6.json

Example YAML snippet

alias: Charge Automation
description: ""
trigger:
  - platform: time_pattern
    minutes: "01"
  - platform: time_pattern
    minutes: "31"
condition:
  - condition: state
    entity_id: sensor.car_charging_program
    state: Home
action:
  - choose:
      - conditions:
          - condition: numeric_state
            entity_id: >-
              sensor.octopus_energy_electricity_acc_current_rate
            above: 0.15
        sequence:
          - service: mbapi2020.battery_max_soc_configure
            data:
              vin: !secret
              max_soc: "50"
      - conditions:
          - condition: numeric_state
            entity_id: >-
              sensor.octopus_energy_electricity_acc_current_rate
            below: 0.15
        sequence:
          - service: mbapi2020.battery_max_soc_configure
            data:
              vin: !secret
              max_soc: "100"
mode: single

Anything in the logs that might be useful for us?

No response

Additional information

I was hoping to use the "Home" profile to enable me to automate my dumb chargers, I can simply use standard however I would expect the update max soc to update the current charge program.

@ReneNulschDE ReneNulschDE self-assigned this Jun 1, 2024
@ReneNulschDE ReneNulschDE added the bug Something isn't working label Jun 2, 2024
@ReneNulschDE
Copy link
Owner

No its not, I have not found a way to prevent this yet. I will keep it open and will dive deeper and check if I can use a different API to achieve the expected behavior.

@josephdouce
Copy link
Contributor Author

josephdouce commented Jun 5, 2024 via email

@josephdouce
Copy link
Contributor Author

josephdouce commented Jun 5, 2024 via email

@ReneNulschDE
Copy link
Owner

There is no documentation as the API is not supported. There is just this repo. I will check it later this week.

@josephdouce
Copy link
Contributor Author

josephdouce commented Jun 6, 2024 via email

@ReneNulschDE
Copy link
Owner

I have added the code to set the charge_program in the max_battery_configure service... Are you able to check the master branch code? Otherwise, it will be part of the beta release in the next a few days...

@ReneNulschDE ReneNulschDE added the solved Problem is solved, waiting for completion label Jun 14, 2024
@josephdouce
Copy link
Contributor Author

I checked the master branch, still switces to Standard when you call

service: mbapi2020.battery_max_soc_configure
data:
vin: VIN
max_soc: "100"
charge_program: "2"

@ReneNulschDE
Copy link
Owner

ReneNulschDE commented Jun 17, 2024

ok, let me check again... don't have an car with charge templates right now...

@ReneNulschDE ReneNulschDE removed the solved Problem is solved, waiting for completion label Jun 17, 2024
@josephdouce
Copy link
Contributor Author

josephdouce commented Jun 17, 2024

image

This screenshot was with charge program 3 selected.

Looks like the profile isn't being passed to the function,

If I change it to "charge_program: int" instead of "charge_program: int = 0" I get a missing argument error.

image

@josephdouce
Copy link
Contributor Author

josephdouce commented Jun 17, 2024

See PR #248

Fixed and Tested

@josephdouce
Copy link
Contributor Author

Fixed with PR#248

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

No branches or pull requests

2 participants