ha-myenergi icon indicating copy to clipboard operation
ha-myenergi copied to clipboard

Unlock Zappi from HA, Schedule charge from HA, Frontend lovelace card

Open sabbie-github opened this issue 2 years ago • 12 comments

Thank you for the work on this integration - much appreciated! Would it be possible to add the functionality to:

  • lock/unlock zappi from HA
  • edit and activate charging schedule from HA?

Also, does anyone have a fully functional frontend lovelace card for Zappi? I am using the Charger Card from @tmjo, but that is written for a different charger and not specific to zappi. I have made some edits to make it fit, but I am only a beginner with next to no experience here. Anyone else have a better, all-in-one frontend card?

Could anyone help me get the boost/eco/eco+/stop selector working in code section "group1" so the dropdown actually calls the relevant service? I can't get it to work, probably @tmjo would know best, the original card is his great work I have tried to adapt here...

image of my card and the code: zappi Screenshot 2023-02-17 130622 zappi Screenshot 2023-02-17 130622 select

type: custom:charger-card
title: Zappi EV Charger
entity: sensor.myenergi_zappi_xxx_status
customCardTheme: theme_transp_white
customImage: /local/media/white_zappi-removebg-preview.png
brand: zappi
show_leds: false
details:
  status:
    entity_id: sensor.myenergi_zappi_xxx_status
  substatus:
    entity_id: null
    unit_show: true
  smartcharging:
    entity_id: switch.myenergi_zappi_xxx_charge_mode
  currentlimits:
    - Fast
    - Eco
    - Eco+
    - Stopped
  statetext:
    Charging: Charging
    Paused: Paused
    Stopped: Stopped
    Completed: Complete
    Boosting: Boosting
  collapsiblebuttons:
    group1:
      text: Charger Mode
      icon: mdi:speedometer
    group2:
      text: Info
      icon: mdi:information
    group3:
      text: Settings
      icon: mdi:cog
  info_left:
    - entity_id: sensor.myenergi_zappi_xxx_plug_status
      text: Connection Status
    - entity_id: sensor.myenergi_xxx_power_charging
      text: Charge Power NOW
      unit_show: true
      icon: mdi:car-electric
  info_right:
    - entity_id: sensor.bmw_530e_remaining_battery_percent
      text: Car Battery Charge %
      icon: mdi:car-electric-outline
      unit_show: true
  group1:
    - entity_id: select.myenergi_zappi_xxx_charge_mode
      tap_action:
        action: call-service
        service: select.select_option
        data:
          option: Eco
        target:
          entity_id: select.myenergi_zappi_xxx_charge_mode
  group2:
    - entity_id: sensor.myenergi_xxx_power_charging
      unit_show: true
      text: Charge NOW
      icon: mdi:car-electric
    - entity_id: sensor.myenergi_zappi_xxx_charge_added_session
      unit_show: true
      text: Charge in Last Session
    - entity_id: sensor.myenergi_zappi_xxx_energy_used_today
      unit_show: true
      text: Grid Use Today
      icon: mdi:transmission-tower-export
    - entity_id: sensor.bmw_530e_remaining_battery_percent
      unit_show: true
      icon: mdi:battery-charging-medium
      text: Car Battery Charge %
    - entity_id: sensor.myenergi_xxx_voltage_grid
      unit_show: true
      text: Grid Voltage
      icon: mdi:flash-triangle-outline
    - entity_id: sensor.myenergi_xxx_frequency_grid
      unit_show: true
      text: Grid Frequency
  group3:
    - entity_id: number.myenergi_zappi_xxx_device_priority
      unit_show: true
      text: Device Priority
    - entity_id: number.myenergi_zappi_xxx_minimum_green_level
      unit_show: true
      text: Minimum Green Level
  stats:
    default:
      - entity_id: sensor.myenergi_zappi_xxx_charge_added_session
        text: Charge in Last Session
        unit_show: true
      - entity_id: select.myenergi_zappi_xxx_charge_mode
        text: Charge Mode
    Charging:
      - entity_id: sensor.myenergi_zappi_xxx_charge_added_session
        text: Charge in Last Session
        unit_show: true
      - entity_id: sensor.myenergi_xxx_power_charging
        text: Charge Power Now
        unit_show: true
      - entity_id: select.myenergi_zappi_xxx_charge_mode
        text: Charge Mode
    Paused:
      - entity_id: sensor.myenergi_zappi_xxx_charge_added_session
        text: Charge in Last Session
        unit_show: true
      - entity_id: select.myenergi_zappi_xxx_charge_mode
        text: Charge Mode
    Completed:
      - entity_id: sensor.myenergi_zappi_xxx_charge_added_session
        text: Charge in Last Session
        unit_show: true
      - entity_id: select.myenergi_zappi_xxx_charge_mode
        text: Charge Mode
    Boosting:
      - entity_id: sensor.myenergi_zappi_xxx_charge_added_session
        text: Charge in Last Session
        unit_show: true
      - entity_id: sensor.myenergi_xxx_power_charging
        text: Charge Power Now
        unit_show: true
      - entity_id: select.myenergi_zappi_xxx_charge_mode
        text: Charge Mode

sabbie-github avatar Feb 17 '23 13:02 sabbie-github

please show

customImage: /local/media/white_zappi-removebg-preview.png

found one at https://cdn.shopify.com/s/files/1/0551/6004/5615/products/zappi2_1200x1200.png?v=1642844080 but: where to put it?

lhumb avatar Apr 09 '23 07:04 lhumb

Go on file editor and load it to your local media directory that you will use to link w the above code I used code customImage: /local/media/white_zappi-removebg-preview.png Meaning I loaded the image to my local/media folder

sabbie-github avatar Apr 09 '23 14:04 sabbie-github

Ok -- I found the location inside my directories so that customImage: /local/media/zappi_white_223x302.png is displayed: /home/homeassistant/.homeassistant/www/media/zappi_white_223x302.png

Thank you very much

lhumb avatar Apr 09 '23 16:04 lhumb

Hi Guys, Are we any closer to adding a button to the integration to "unlock" the charger please?

scott400k avatar Jul 03 '23 09:07 scott400k

Hi Guys, Are we any closer to adding a button to the integration to "unlock" the charger please?

I don't believe that's possible via the current myenergi API, so third party integrations are not going to be able to offer that functionality.

LeiChat avatar Jul 03 '23 09:07 LeiChat

@sabbie-github : A home assistant integration should be kept simple and only integrate (as the name suggests) 3rd party functionality in an home assistant eco system. Things like UI cards and scheduling are features which home assistant provides to varying degrees of genericness. In theorie, HA would only need one scheduling componenten in stead of each EV charger integration building their own.

I'm aware that Zappi has also scheduling capabilities, but as far as I know, this is not exposed through the API.

AJediIAm avatar Jul 03 '23 10:07 AJediIAm

@AJediIAm , scheduling is exposed, see https://myenergi.info/endpoints-for-setting-zappi-boost-timers-t951.html ... I've just tried it and it works.

rastislavpapp avatar Jul 11 '23 19:07 rastislavpapp

@AJediIAm , scheduling is exposed, see https://myenergi.info/endpoints-for-setting-zappi-boost-timers-t951.html ... I've just tried it and it works.

+1 for the feature request than ;)

AJediIAm avatar Jul 13 '23 09:07 AJediIAm

Hi Guys, Are we any closer to adding a button to the integration to "unlock" the charger please?

https://github.com/CJNE/pymyenergi/commit/04e932dc61d7173bafb1565825e0a14bb16733ba adds the command to the underlying API integration...

Also, cross ref #95

reedy avatar Sep 08 '23 10:09 reedy

It looks like this has been released - how do we access it in the integration? I can't find any sensor/state/entity/action to view or change the locked status. Am I missing something?

narjekdjcusbe avatar Nov 25 '23 10:11 narjekdjcusbe

It has to be added, so you need to wait for the author to do the work, or propose the change yourself having worked out the new code requirements.

G6EJD avatar Nov 25 '23 17:11 G6EJD

Would be really nice if someone would be able to add this

frankvandenhurk avatar Jun 22 '24 07:06 frankvandenhurk