custom-components / zaptec

zaptec charger custom component for home assistant
MIT License
64 stars 20 forks source link

Feature request #30

Closed stephanlarsson closed 1 year ago

stephanlarsson commented 1 year ago

Hi,

Love that this custom component exists.

I think now that Easee is in trouble, a lot of customers will choose to move to Zapotec in Sweden/Scandinavia. Are there any plans to implement switches on top of sensors? Would be nice if it could be made to work with the HACS custom charger card.

No criticism intended, I'm just looking for more HA goodness 😍

Thanks.

Hellowlol commented 1 year ago

What switches would you be interessed in?

stephanlarsson commented 1 year ago

Primarily the possibility to start/stop charging, change output amperage. But also, LED intensity, trigger update, lock/unlock cable, trigger restricted and non-restricted access.

That would be my Santa wish list.

tomekwl commented 1 year ago

Hi,

Although I see the ability to send commands to the charger in the code, I'm not able to create any automation. In particular, I am looking for a possibility to pause/resume charging based on PV status. Any guidance on how to proceed to get this functionality would be greatly appreciated.

philsson commented 1 year ago

Primarily the possibility to start/stop charging, change output amperage. But also, LED intensity, trigger update, lock/unlock cable, trigger restricted and non-restricted access.

That would be my Santa wish list.

This would be great! I'm looking into buying an electric car very soon and as you mentioned with Easee this looks like a good alternative. Feature I'm after most specifically is being able to load balance (set the charging current). Would not need any extra load balancer hardware if I could do everything through Home Assistant. Was looking through the API and it seems there is support for it.

philsson commented 1 year ago

Any advice on how to create a proper switch in home assistant? I'm thinking of creating a template switch using the charger status with actions on state change to call the stop_pause and resume services. Wanted to integrate the charger with the EV Smart Charging integration from HACS which requires a switch.

EDIT: This is the swtich I came up with. Simple enough and hopefully works just as intended

  - platform: template
    switches:
      zaptec:
        unique_id: zaptec_go_switch
        value_template: "{{ is_state('sensor.zaptec_charger_zap******', 'charging') }}"
        turn_on:
          service: script.zaptec_resume_charging
        turn_off:
          service: script.zaptec_stop_pause_charging

where the scripts are

zaptec_stop_pause_charging:
  alias: Zaptec Stop Pause Charging
  sequence:
  - service: zaptec.stop_pause_charging
    target: {}
    data:
      charger_id: ***
  mode: single
  icon: mdi:pause
zaptec_resume_charging:
  alias: Zaptec Resume Charging
  sequence:
  - service: zaptec.resume_charging
    data:
      charger_id: ***
  mode: single
  icon: mdi:play-pause
sveinse commented 1 year ago

@stephanlarsson @philsson It might be useful to know that I'm working on a significant improvement to zaptec, which turns a lot of these attributes into ordinary entities. It is tracked in PR #56 which will be released once its stable. It is at beta test in my fork at https://github.com/sveinse/zaptec and is installable via HACS (yet I'd be careful on production environments). See the URL for instructions if you want to give it a go. I'm grateful for all feedback I can get. If there are any entities missing, please let me know.

stephanlarsson commented 1 year ago

Hi @sveinse,

I just installed your fork and will be trying it out and reporting back if I run into anything. But right off the bat I can tell this is exactly the kind of direction I was hoping the Zaptec integration would take. So thank you very much for your addition to the Integration!

edit: that will input will be submitted in the fork github page.