From ca00e95adf7671c64a4241eb35f33e3c4bb8c9ba Mon Sep 17 00:00:00 2001 From: "thimo.vandenbroek" Date: Mon, 16 Dec 2024 17:44:33 +0000 Subject: [PATCH] delete --- config/custom_components/peblar/README.MD | 100 -------------- config/custom_components/peblar/__init__.py | 48 ------- .../__pycache__/__init__.cpython-313.pyc | Bin 2457 -> 0 bytes .../__pycache__/config_flow.cpython-313.pyc | Bin 3760 -> 0 bytes .../__pycache__/connectric.cpython-313.pyc | Bin 4009 -> 0 bytes .../peblar/__pycache__/const.cpython-313.pyc | Bin 738 -> 0 bytes .../__pycache__/coordinator.cpython-313.pyc | Bin 4674 -> 0 bytes .../peblar/__pycache__/entity.cpython-313.pyc | Bin 1523 -> 0 bytes .../peblar/__pycache__/number.cpython-313.pyc | Bin 5758 -> 0 bytes .../peblar/__pycache__/peblar.cpython-313.pyc | Bin 3973 -> 0 bytes .../peblar/__pycache__/sensor.cpython-313.pyc | Bin 5234 -> 0 bytes .../custom_components/peblar/config_flow.py | 81 ------------ config/custom_components/peblar/const.py | 45 ------- .../custom_components/peblar/coordinator.py | 82 ------------ config/custom_components/peblar/entity.py | 36 ----- config/custom_components/peblar/icons.json | 27 ---- config/custom_components/peblar/manifest.json | 10 -- config/custom_components/peblar/number.py | 106 --------------- config/custom_components/peblar/peblar.py | 81 ------------ config/custom_components/peblar/sensor.py | 124 ------------------ config/custom_components/peblar/strings.json | 96 -------------- .../peblar/translations/en.json | 40 ------ 22 files changed, 876 deletions(-) delete mode 100644 config/custom_components/peblar/README.MD delete mode 100644 config/custom_components/peblar/__init__.py delete mode 100644 config/custom_components/peblar/__pycache__/__init__.cpython-313.pyc delete mode 100644 config/custom_components/peblar/__pycache__/config_flow.cpython-313.pyc delete mode 100644 config/custom_components/peblar/__pycache__/connectric.cpython-313.pyc delete mode 100644 config/custom_components/peblar/__pycache__/const.cpython-313.pyc delete mode 100644 config/custom_components/peblar/__pycache__/coordinator.cpython-313.pyc delete mode 100644 config/custom_components/peblar/__pycache__/entity.cpython-313.pyc delete mode 100644 config/custom_components/peblar/__pycache__/number.cpython-313.pyc delete mode 100644 config/custom_components/peblar/__pycache__/peblar.cpython-313.pyc delete mode 100644 config/custom_components/peblar/__pycache__/sensor.cpython-313.pyc delete mode 100644 config/custom_components/peblar/config_flow.py delete mode 100644 config/custom_components/peblar/const.py delete mode 100644 config/custom_components/peblar/coordinator.py delete mode 100644 config/custom_components/peblar/entity.py delete mode 100644 config/custom_components/peblar/icons.json delete mode 100644 config/custom_components/peblar/manifest.json delete mode 100644 config/custom_components/peblar/number.py delete mode 100644 config/custom_components/peblar/peblar.py delete mode 100644 config/custom_components/peblar/sensor.py delete mode 100644 config/custom_components/peblar/strings.json delete mode 100644 config/custom_components/peblar/translations/en.json diff --git a/config/custom_components/peblar/README.MD b/config/custom_components/peblar/README.MD deleted file mode 100644 index 862d50bfb7597f..00000000000000 --- a/config/custom_components/peblar/README.MD +++ /dev/null @@ -1,100 +0,0 @@ -# Peblar Home Assistant Integration - -The Peblar Home Assistant Integration provides seamless integration with Peblar devices, enabling monitoring and control directly from Home Assistant. This integration supports configuring connection details, authenticating with the Peblar API, and setting up sensors and number entities. - ---- - -## Features - -- **Connection Management:** Configure the IP address and access token for your Peblar device. -- **Sensors:** Monitor key metrics like charging current, total energy, session energy, and charge power. -- **Number Entities:** Control parameters such as maximum charging current. -- **Reauthentication Support:** Easily reauthenticate in case of API authentication errors. - ---- - -## Installation - -### Installation via HACS - -1. Ensure that [HACS (Home Assistant Community Store)](https://hacs.xyz/) is installed in your Home Assistant setup. -2. Go to **HACS > Integrations**. -3. Click the three dots in the top-right corner and select **Custom Repositories**. -4. Add the URL of this repository and select `Integration` as the category. -5. Search for `Peblar` in HACS and click **Download**. - -### Manual Installation - -1. Download or clone the integration files. -2. Place the files in the `custom_components/peblar` directory within your Home Assistant configuration folder. - -### Step 2: Restart Home Assistant - -Restart Home Assistant to load the new integration. - -### Step 3: Add the Integration - -1. Navigate to **Settings > Devices & Services** in Home Assistant. -2. Click **Add Integration** and search for `Peblar`. -3. Follow the prompts to configure the integration. ---- - -## Configuration - -When setting up the Peblar integration, you will need: - -- **IP Address:** The IP address of your Peblar device. -- **Access Token:** The access token for authenticating with the Peblar API. - - -## Supported Entities - -### Sensors - -| Sensor | Unit | Device Class | State Class | -|----------------------------|--------------------|--------------|------------------| -| Charger Max Charging Current | mA | Current | Measurement | -| Charger Total Energy | Wh | Energy | Measurement | -| Charger Session Energy | Wh | Energy | Measurement | -| Charger Charge Power | W | Power | Measurement | - -### Number Entities - -| Entity | Min Value | Max Value | Step | Description | -|----------------------------|-----------|-----------|------|------------------------------| -| Charger Max Charging Current | 0 | 20000 | 1 | Set the maximum charging current | - ---- - -## Error Handling - -### Common Errors - -- **`cannot_connect`**: Unable to connect to the Peblar device. Check the IP address and ensure the device is online. -- **`invalid_auth`**: Authentication failed. Verify your access token. -- **`reauth_invalid`**: Reauthentication failed. Ensure the IP address and access token are correct. - -### Reauthentication - -If reauthentication is required: - -1. Open the Peblar integration settings in Home Assistant. -2. Update the IP address and/or access token. -3. Save the changes to reauthenticate. - ---- - -### Contributions - -Contributions are welcome! Feel free to open issues or submit pull requests. - ---- - -## License - -This project is licensed under the MIT License. See the `LICENSE` file for details. - ---- - -For more information or support, please refer to the [Home Assistant documentation](https://www.home-assistant.io) or contact the integration maintainer. - diff --git a/config/custom_components/peblar/__init__.py b/config/custom_components/peblar/__init__.py deleted file mode 100644 index cd9e32b8285fcc..00000000000000 --- a/config/custom_components/peblar/__init__.py +++ /dev/null @@ -1,48 +0,0 @@ -"""The Peblar integration.""" - -from __future__ import annotations - -from .peblar import Peblar - -from homeassistant.config_entries import ConfigEntry -from homeassistant.const import CONF_IP_ADDRESS, CONF_ACCESS_TOKEN, Platform -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import ConfigEntryAuthFailed - -from .const import DOMAIN, UPDATE_INTERVAL -from .coordinator import InvalidAuth, PeblarCoordinator, async_validate_input - -PLATFORMS = [Platform.NUMBER, Platform.SENSOR] - - -async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: - """Set up Peblar from a config entry.""" - peblar = Peblar( - entry.data[CONF_ACCESS_TOKEN], - entry.data[CONF_IP_ADDRESS], - ) - try: - await async_validate_input(hass, peblar) - except InvalidAuth as ex: - raise ConfigEntryAuthFailed from ex - - peblar_coordinator = PeblarCoordinator( - peblar, - hass, - ) - await peblar_coordinator.async_config_entry_first_refresh() - - hass.data.setdefault(DOMAIN, {})[entry.entry_id] = peblar_coordinator - - await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) - - return True - - -async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: - """Unload a config entry.""" - unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS) - if unload_ok: - hass.data[DOMAIN].pop(entry.entry_id) - - return unload_ok diff --git a/config/custom_components/peblar/__pycache__/__init__.cpython-313.pyc b/config/custom_components/peblar/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 150b87cb3b8f6534f36e7fb2463a8971fae200cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2457 zcmZ`)O>7fK6rTODy()Dncr?haO@D$#euIQj02XM4?iDE`76W<0O=k_U$)s z-h2CI=e=*%TSWvT(WT6O<3i{+I%y2n0nGYc0N0U>Fp?RWO)?UT*$9$3nNM;Ok9ok1 z>`J;MH+I|Do%Bco79=nBN+K3*ohRv&T5yYvg=DMb$9}+^>`k^w?YLbE;D9|BlO0kg z?v%Q4mlVXo2>M7&?`@>ie1mqdIcuOH7I({j*%wA1^SB34i;cpwt_7_8RAoQ-LPz(`IK>VZpWUk#tpqtoE_6Gd?Ct_w)j+PTuDqT zvC+}=m@Jckt%$|rFi~cvl4B_%OqW!vVBmRhZ++jG*J7qwG%Z!PKoQ&!FIKVU#?@j; z%STz_9-W$uB~qji|*bSJ=2W z+U&1K(b?@N>us!@WE=Vf)XN-)&{^g>mvXg07TLCjRff%=hMmr5_;jGL(tPi)!NOv}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qXy0QrQAHDv(B4Pr@E>URV>DSsldG-4tI8GS#@sFArm@^IxZr*6 Q4l?b34!fBkeiy?02ec9_G5`Po diff --git a/config/custom_components/peblar/__pycache__/config_flow.cpython-313.pyc b/config/custom_components/peblar/__pycache__/config_flow.cpython-313.pyc deleted file mode 100644 index da7ee4aee76ee65da77afc8493add4c1f9e70198..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3760 zcmaJEOKcm*b(XvQXvLpIQj{oDT7MFmB2C+IY(s+Wlon-JR86T`sSqF;+ZDN#Hl}vz z*`*E1IRpt%IL#rtI5mnEEzlm6Q(d41d`+A~k0ew;%)&+tq(ldHdeH?>z4Kcm(50SX#~j^aI(nhua32ofw1A10*7hL`HN>GC2o!2n1#)*&K&C z3UiaroC~`s?3{FCkLVKJlN~u8^AzWq?96$wH|N8?oFDrsu46Kg3*um|3wO~yKiQoN z;Sj(sv2!wE%u4Q5e^S7I}_dO$H#Q7q%I4kvVK=6 z=~$RnmdY{~RLxYDv23ckmVQa3Cm5?!)->IuI0Lrs8*-(hYRdq!8Eq~9lH3zEE}KPy zwS3~#+|1axG&7!=o4s!FwybL)$_nnmGm23yn+b>2H8z#MCS}IP#zj$@othlaTLFri zn3gix>j9HB4DEiM;I8jm$(I7<5i(cjU5K%v8-4D=ZspT0x=+*;FJ| zt5nT`gXq#4PFO!hh}roW0LPI4k+RUTH9~WY$PfZp9b`S<`ciW&u&||L-qFTRAdy`G z{2k^2n|FGFm&l3EGt3F(L3z(bw!|b{>-T<2E(doJ%oRnb8VWHpTuPA3U=l+xb)leZ zno=;+JfD?KSy+()3$(YCHA5(2eN_-=$ET$^aePL~W@a;zICg#fMn<@+nkxcmT2&08 zg7rIUQ7H;bYrAsNyycY(1;sEVQ@^EX7Oz$$xmd)2$y-iSHOq?Ss!-P_9GIjJ4#EUJ z=$fLL#%Y^z z>s%tCmaeQ>{)4W;eZcq#k#HHNm*`{knn(WdM)u)AJ$!QW#O6o!;Y(Y-%O79+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T!Zsa-rTa=3lRYesBjd9qAT}&+|_MF@i`n;z`2u z^L&$q-G2-nO!rAF>tcQr9XpEt%#6jkzhoEyzrMhX4RT*!>;d>29|IKM_}>TkiG#pT zSSNu!5dy~v{gXjD9}Q$#_Q@Fs!N2DR_*+EaZ{aI|Sr*{0P=dn($X)MhHHr&{iBkf! ziZ?A6R?I5aFlpfvOdcpnO)q=T4CVV91p@qPsaAuQwERQ5<@~R?97B5Mwda+t2 zuve09SLJf+Bp^v86&q$*h5kc_W49y~^@1efql6QUwumG_0}0QdB%3Bym#U^>0Ko_l z?7%;wPaN(i5Shr6Zji&Dqwl!kCdWBbjaahD!uq_U@3j-wrXQWV*klKtd?R+6u5j{C zC+wRDCY;&j1wCs~UzJrY;i9>T$vZ$ZZ{2^;0#x<=NHF2egn&PQ4~PLuRWKtM0F(Z~ z3KaBm8QMq4OCv2W6);DzE_02v>6ql4#oy7()rwiwtA@n_OnW-o@L5Mzps|K#&u*;K zb`hb4LRAb}ZEy#$ppLLYZxF-H$YX~|?`3r#KE?`F(sBY@pd^o-)mhMWTvRpLY?Tn& zbHY!9sTWX z6F7jXfeaHSNC<}c4kccoV=vJ0XQ<}~)cXv@{()xeX!d(_^%+XNKz-k%(dVJQ8VWw| z?f)(REB?8s^9%1Uyc^P%=bhgf4SQFMyu0NY+6**QP{TG#eru6^- diff --git a/config/custom_components/peblar/__pycache__/connectric.cpython-313.pyc b/config/custom_components/peblar/__pycache__/connectric.cpython-313.pyc deleted file mode 100644 index c27908dc0e27f922806faeef6d084c6c288cb5c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4009 zcmd57fK6rTOFosAP4l3*UYT> zaVbI^s;HuBixdGT;DosK*lSdQdb9;qtSJYia^V(msv@}b&Du_kiHh2Q#FO^T+nM*~ z_q{jY6dP0o^f0JR{!)j~pZupna#<+$fG~@ah@hm96!!~6a7&ShVbqS2QY%Wz+r^SL zktW5Ml5JMiJ+@_G!y%>-HBvgIs``kl3>ziI5-(e!;>Ykmiw+~`8xb)n5Gh&5dp;%* z`LL3dThaEi9q}ZURz$o>4{%@73%oArBPxumvZ_%Z)q}yXQCS7Imdao8JP5OBESQ3_ zL}SsEuq5}VD)WLBkD`&KzlsJzy&xt<&PP#-_v=zp0`1CARoMtT)F*=G(rhMCOc~C4 zryM7}Gak=2#PzfpKb6vr_{pvDY*0_9Q>LLirftQKQQL}%SwC#3gDt1mIg`e$A(3&W zY+`0zotVND$3BiN=GDi?38s{-)d)V3!PNN_I|t2aY-b$iJ*rbYN>a=_h4pbvXiR1@ z#i|$BGnIXXNkwMX*Q4(s9BMm-!(TTY=5Ok*#z{ zo6s#`I3^Gt5l}QhLAha+1b~x9U~EIxoL}0gb=-ohoktG>P4j_{e4r!e>mX~P>V@fe zpu(NbLl9q8;?f9r_Zk8Z7Dk$DD&co~IY=#O6)_;ai5OVrdgN8CM}7;}ql|6qh3Fnt zIN$Wz^TX@TH?O-txT{GB{FU%2m_SoddO!$rIgkPDRa-1 zP9`z=M0a$yzACA`*t8ieX&NGKb!qLMzjM)pAQyID>b^2|?a0+5ch_#2@vfXHm0Ymn z)tT}?by=Sa_WbWI3xRd{K=k_i`9OEh*Zp)cj)LKTOVH03n^&#zjD7|?4@rJ6LUY|v zbfI6@CcHyIbQ?wXZkBFG#Jy4Jc2wbVS7fL`y5kXte9|4C!sTFOXuEW$PaNu(?({1l z8`W?W!m$J;8sT8y%(ajdM+JZy(f|jyD}f4mhir+E@RmTq$kJs1vnvx^0pdzmL*)vn zNhgfDfS~0*pACNgJPBuav>EUdEx3*|5UNj9&ci*9Ez~QqQa{`p zUQu368@COZn0pJjuHkn60W>cU$b5sP1%60&K?4Url-~(}1qI=;C<}7YkA&bKsQz!y NkRZgKAkJO;e*n|U^6>xw diff --git a/config/custom_components/peblar/__pycache__/const.cpython-313.pyc b/config/custom_components/peblar/__pycache__/const.cpython-313.pyc deleted file mode 100644 index cd26a917c90f75ca7a74e6252c426603974ca6d1..0000000000000000000000000000000000000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hGQHGPA3slYAd_0 zU?N#*bg%?z{5v`)Wd9P|my?h^VkwD#^|YpXxq3s$ekR$8`Fih4;T#722$kZ6NtctL3fCrGn+nf)O`)om#~|d2 z?{pc@cOAdqa$G!?0nc=UChJhIX=)%kg&Z25bFU=Cm8KIpkQJcl5yz^8tkVhwT?YSZ z?Uw+44112t!ZkMlhQ@Ds?KQU_MnRXlLAMw9SVXwii^Z@e3W^4m-hk&O1yj)#U${QZ z$~EK`-V<7AekJcTGP{VTbo;!xa8_Iz7MIS7=CEkKT-h8Jw?=B}=G-WymJ6diDK4Iu zKRhp$&q~X~((+kpWmsByxwy4&*~$hXZ10jO8y`XQ|21PM8_nUS)QR(uth1? zDMgO@9pUFG{i*MCrpOISTONc_2LO>LHBPXPjZsWsvrUyZfK{S9x zyceTrC_Z90j`j}w5eq4WyNJOZVamc35+n2-3h+1bN_p`5j&Z7#U#l}?Ij`#D6wwN? zH^~%94RaRm<5P6d>WgvX;o_6y%SS<%IbrDG^?p=2VjZk1OgIPDMgRse75to8vX%?Ac~Oy diff --git a/config/custom_components/peblar/__pycache__/number.cpython-313.pyc b/config/custom_components/peblar/__pycache__/number.cpython-313.pyc deleted file mode 100644 index 1bd14be2ef777a6bd7f62f9e6639acb1f4f9d0ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5758 zcmc&2U2_xH^{#eTT76hD{>Go{Pf!A~gKYu<+z8tVNFb=!N<3m{w*d%+U5B!<&gnA#ERe&Rt2CjiK#RudTD^ zo_p@O_nv#cb_-P=0xeUo&V~Gh{0%#$#zqL?3PT(r*GVr?2qg-qIHFv{K^-#Ue3Xv} zREUUFWPKs(jJT+a;bK&ZxT%}r&ZsBirQV2-`dHr;t%~@mpW#w85UHls40lKOL~3Xa z!#&a3NFA*M+^hJa^^peJ5NV{1ktW*2XjRd@k!IQ)X`wBw?~k@d+Gv|hrd?e`3BX_V zQAZO2d`~k`YNma|ynVFc;t6T{bi;Ie7XjFy)B;Z({OaN7R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|`5yearZ&;9zoO%a|L&ssKJh)JYjaMO*Lhj{#ty@<6Er@!EEh_7)4 z9?(sO0_XFnZ*K9v$vu`F;u-E+f{+F`!Tk0#H+zzBcIw#h79_&E-Y-d}X_P$2@#Lf{N7s zWER?bgAdtn8WaN#b>qC&ovirk&kAoSTqzofRkM?Y>g-rn)Aj)&`BKLk9%$kIj;ASL*yp8wVq=If(TfUqi>VZHfxC3 zo9i3h@EzD_I&!zZ?{0n9-THGIb@dOcT>G4xy!#c$s&CDIxIo;TW3#E2b8dJVH+g)@ hFWS%WBzxW$-H$||KRVFEo#8${ezWyEf*3Qle*@~4G?oAW diff --git a/config/custom_components/peblar/__pycache__/peblar.cpython-313.pyc b/config/custom_components/peblar/__pycache__/peblar.cpython-313.pyc deleted file mode 100644 index 8dfe7a03eb05cf3f1756a1b10363766d2b641bc9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3973 zcmd5<&2JM&6rcUFosAP4La>{rj)@?NLy`>*sDg%4LzALHQxua53D9ceOp*o1Yi8C! zT#68fDypd3B1OOnI3aHQ3sD8?(H2y(rW}yk3%7t%6~U!%cI_mXsHhD{JZay&oqaR& zX5PpAwp6DgpoCZFX07VlkgE0)>N6tUGZ@(C=Vqo*7K24`6*ohVHO<;rl57{ zNHirZ$-SwHO|a7uG`#dy(Lksh#DvKC2uksJ9ZE=`U3pp2*2Bs4h@iP-%>;@mLpkrH zZD)3ATCPqrGNyJWWhAxJ+q7KJ$YfGx(y&b{t(~A&Iwt1)`>eE$({{H#ox!Xwp0y_} zV&)v3n8Fm>I*HTFYmAK%OetHh6MQO*sr@;&51Uii%G%63YEV2vQp`JvjWJAUOlC60 zsd3^1V+lAOv30Kuqul5y5Zk4lvB*i9F_M^SNsC}$>2Y&HOJ=EUP3cK%Dr2R=Myh2T zua}#i%rx`qx|ud@U1tH;KRuNWKTJ>ifn7kw#->YZF%-GvFShnQ@U;{}(Hq-u_229- zgtR+aArzmHFZmxe_Y|X>Z>cxctLL65QdpglfAE)JJW4LP5MH><9aCxoHVbZA%`uzN zZDA-T5FY)|)Ime}z$gg-C-uNsxNPq$2eXlDbCnC|QJ`Ty&{hbv<$Y~rJ#@WfiU&Fz zQ~m^D7DdoeXkA(@wpzKd{LrfiqDbh2C>rMTRT1=ZA68L9+$p7n5n-6;LKRhVDT*f0 zrj-_Pe^k*h-(?kfk>N!sEsls7@-;2S#c^RA?Uq{5xDb*2gWPQ`@k!l&Sb^5@&cWP*$`5@Zm!PgjggdIqu@K zQHVND%x)iuuhw-o$ae)G3Kdl(4K2U-h( z*7-nJA<$JqLQS~XuyN+VivhY3+-MoA8 zax@4VacG!_dKE$R3d0+!I^lIkIXTnP8scAi8}Yx!{m5(BkNghqM>(>+8!~%D;e7KO zuMKay*1YNY;9e#nh*!eXl_^u$#)Q@4(Fh=aY-yf<1GH83IXl+z*0dO@}3VbTV=q@A-4K1y~`M^hS~`O-M+EN7-C$_svNq_TK9 zx0jH!o4$<{+pmsc&E+g!_3I$4NzVi0$z0>&lk=C)FXNMyX%gzqZ#$6hJ^1V1eB)Qk zXr)GR(25_`t%HmXZul|xeeP<<_3mrk_X8byU&pgW-wpzkt%-)==!)x zsGTz555m%Q!h?(XGQ`SYVoy6*oNR(V(#2UH|JtZK7|~4XhHVpbG;3q3>$i~u!CeT? zaWvtKS8BQy*mr1A^eO7X2IQ%KA__`-NdjqsOHVy;R!=v!C|m#9E7U46cOE_({*=7B zK4vAsFsJ%EVc|^vF??QLkoo%E4Sqs)!v_v}D8CB;0}8?uQ5NKq9|^(VQSINJK|zQ; JMVve1{{bYD<0Jq8 diff --git a/config/custom_components/peblar/__pycache__/sensor.cpython-313.pyc b/config/custom_components/peblar/__pycache__/sensor.cpython-313.pyc deleted file mode 100644 index 929007aba9628fe1ecafb210890fe316b347e0bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5234 zcmcH-T~iy^^{%w~7UENY#fKIII07t)F=^}=$Er{b5(ui5lDH_|uBAm*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GOdg{2QjYJ+7~4Fp?p#o% z!#;Y*!X%gAUIO|E=qG?wD=j0_tok~50LWTJL4Q zB_z#4-*2=a)Gd|NIl9q}5^RzHTIks?>Mx#4xCk_2q4F-k12e-g|1lwE-SiC_{RWNv z6M62Vz9+1OF*Oi?$8N;TKQUPWLj-sbbLKvZ-bZJjur|i@1Oa&5ftacLh}-Y#*=^r< zcGjE&UpNQuF5PpE@7f+(k;!#?OlA5Wnas?{-qGJOf7I;4V1{Yg+kK1Ukp<|Fd_xS++`jn9;A5BsZ(^dM{{aJ0+$8`2 diff --git a/config/custom_components/peblar/config_flow.py b/config/custom_components/peblar/config_flow.py deleted file mode 100644 index 21259c29fbc35a..00000000000000 --- a/config/custom_components/peblar/config_flow.py +++ /dev/null @@ -1,81 +0,0 @@ -"""Config flow for Peblar integration.""" - -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any - -import voluptuous as vol -from .peblar import Peblar - -from homeassistant.config_entries import SOURCE_REAUTH, ConfigFlow, ConfigFlowResult -from homeassistant.const import CONF_ACCESS_TOKEN, CONF_IP_ADDRESS -from homeassistant.core import HomeAssistant - -from .const import DOMAIN -from .coordinator import InvalidAuth, async_validate_input - -COMPONENT_DOMAIN = DOMAIN - -STEP_USER_DATA_SCHEMA = vol.Schema( - { - vol.Required(CONF_IP_ADDRESS): str, - vol.Required(CONF_ACCESS_TOKEN): str, - } -) - - -async def validate_input(hass: HomeAssistant, data: dict[str, Any]) -> dict[str, str]: - """Validate the user input allows to connect. - - Data has the keys from STEP_USER_DATA_SCHEMA with values provided by the user. - """ - peblar = Peblar(data["access_token"], data["ip_address"]) - - await async_validate_input(hass, peblar) - - # Return info that you want to store in the config entry. - return {"title": "peblar"} - - -class peblarConfigFlow(ConfigFlow, domain=COMPONENT_DOMAIN): - """Handle a config flow for peblar.""" - - async def async_step_reauth( - self, entry_data: Mapping[str, Any] - ) -> ConfigFlowResult: - """Perform reauth upon an API authentication error.""" - return await self.async_step_user() - - async def async_step_user( - self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle the initial step.""" - if user_input is None: - return self.async_show_form( - step_id="user", - data_schema=STEP_USER_DATA_SCHEMA, - ) - - errors = {} - - try: - await self.async_set_unique_id(user_input["ip_address"]) - if self.source != SOURCE_REAUTH: - self._abort_if_unique_id_configured() - info = await validate_input(self.hass, user_input) - return self.async_create_entry(title=info["title"], data=user_input) - reauth_entry = self._get_reauth_entry() - if user_input["ip_address"] == reauth_entry.data["ip_address"]: - return self.async_update_reload_and_abort(reauth_entry, data=user_input) - errors["base"] = "reauth_invalid" - except ConnectionError: - errors["base"] = "cannot_connect" - except InvalidAuth: - errors["base"] = "invalid_auth" - - return self.async_show_form( - step_id="user", - data_schema=STEP_USER_DATA_SCHEMA, - errors=errors, - ) diff --git a/config/custom_components/peblar/const.py b/config/custom_components/peblar/const.py deleted file mode 100644 index 5c5a1c095c06a2..00000000000000 --- a/config/custom_components/peblar/const.py +++ /dev/null @@ -1,45 +0,0 @@ -"""Constants for the Eneco peblar integration.""" - -DOMAIN = "peblar" -UPDATE_INTERVAL = 30 - - -CHARGER_CURRENT_VERSION_KEY = "FirmwareVersion" -CHARGER_PART_NUMBER_KEY = "ProductPn" -CHARGER_SERIAL_NUMBER_KEY = "ProductSn" -CHARGER_SOFTWARE_KEY = "FirmwareVersion" -CHARGER_MAX_CHARGING_CURRENT_KEY = "ChargeCurrentLimit" -CHARGER_CHARGING_CURRENT_ACTUAL_KEY = "ChargeCurrentLimitActual" -CHARGER_TOTAL_ENERGY_KEY = "EnergyTotal" -CHARGER_SESSION_ENERGY_KEY = "EnergySession" -CHARGER_CHARGE_POWER_KEY = "PowerTotal" - -# CHARGER_ADDED_DISCHARGED_ENERGY_KEY = "added_discharged_energy" -# CHARGER_ADDED_ENERGY_KEY = "added_energy" -# CHARGER_ADDED_RANGE_KEY = "added_range" -# CHARGER_CHARGING_POWER_KEY = "charging_power" -# CHARGER_CHARGING_SPEED_KEY = "charging_speed" -# CHARGER_CHARGING_TIME_KEY = "charging_time" -# CHARGER_COST_KEY = "cost" -# CHARGER_CURRENT_MODE_KEY = "current_mode" -# CHARGER_CURRENT_VERSION_KEY = "currentVersion" -# CHARGER_CURRENCY_KEY = "currency" -# CHARGER_DATA_KEY = "config_data" -# CHARGER_DEPOT_PRICE_KEY = "depot_price" -# CHARGER_ENERGY_PRICE_KEY = "energy_price" -# CHARGER_FEATURES_KEY = "features" -# CHARGER_SERIAL_NUMBER_KEY = "serial_number" -# CHARGER_PART_NUMBER_KEY = "part_number" -# CHARGER_PLAN_KEY = "plan" -# CHARGER_POWER_BOOST_KEY = "POWER_BOOST" -# CHARGER_SOFTWARE_KEY = "software" -# CHARGER_MAX_AVAILABLE_POWER_KEY = "max_available_power" -# CHARGER_MAX_CHARGING_CURRENT_KEY = "max_charging_current" -# CHARGER_MAX_ICP_CURRENT_KEY = "icp_max_current" -# CHARGER_PAUSE_RESUME_KEY = "paused" -# CHARGER_LOCKED_UNLOCKED_KEY = "locked" -# CHARGER_NAME_KEY = "name" -# CHARGER_STATE_OF_CHARGE_KEY = "state_of_charge" -# CHARGER_STATUS_ID_KEY = "status_id" -# CHARGER_STATUS_DESCRIPTION_KEY = "status_description" -# CHARGER_CONNECTIONS = "connections" diff --git a/config/custom_components/peblar/coordinator.py b/config/custom_components/peblar/coordinator.py deleted file mode 100644 index 92a7e166142f48..00000000000000 --- a/config/custom_components/peblar/coordinator.py +++ /dev/null @@ -1,82 +0,0 @@ -"""DataUpdateCoordinator for the peblar integration.""" - -from __future__ import annotations - -from datetime import timedelta -import logging -from typing import Any - -import requests -from .peblar import Peblar - -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import HomeAssistantError -from homeassistant.helpers.update_coordinator import DataUpdateCoordinator - -from .const import CHARGER_MAX_CHARGING_CURRENT_KEY, DOMAIN, UPDATE_INTERVAL - -_LOGGER = logging.getLogger(__name__) - - -def _validate(peblar: Peblar) -> None: - """Authenticate using Peblar API.""" - try: - peblar.authenticate() - except requests.exceptions.HTTPError as peblar_connection_error: - if peblar_connection_error.response.status_code == 401: - raise InvalidAuth from peblar_connection_error - raise ConnectionError from peblar_connection_error - - -async def async_validate_input(hass: HomeAssistant, peblar: Peblar) -> None: - """Get new sensor data for Peblar component.""" - await hass.async_add_executor_job(_validate, peblar) - - -class PeblarCoordinator(DataUpdateCoordinator[dict[str, Any]]): - """Peblar Coordinator class.""" - - def __init__(self, peblar: Peblar, hass: HomeAssistant) -> None: - """Initialize.""" - self._peblar = peblar - - super().__init__( - hass, - _LOGGER, - name=DOMAIN, - update_interval=timedelta(seconds=UPDATE_INTERVAL), - ) - - def authenticate(self) -> None: - """Authenticate using Peblar API.""" - self._peblar.authenticate() - - def _get_data(self) -> dict[str, Any]: - """Get new sensor data for Peblar component.""" - data: dict[str, Any] = self._peblar.getChargerData() - data[CHARGER_MAX_CHARGING_CURRENT_KEY] = data[CHARGER_MAX_CHARGING_CURRENT_KEY] - return data - - async def _async_update_data(self) -> dict[str, Any]: - """Get new sensor data for Peblar component.""" - return await self.hass.async_add_executor_job(self._get_data) - - def _set_charging_current(self, charging_current: float) -> None: - """Set maximum charging current for Peblar.""" - try: - self._peblar.setMaxChargingCurrent(charging_current) - except requests.exceptions.HTTPError as peblar_connection_error: - if peblar_connection_error.response.status_code == 403: - raise InvalidAuth from peblar_connection_error - raise - - async def async_set_charging_current(self, charging_current: float) -> None: - """Set maximum charging current for Peblar.""" - await self.hass.async_add_executor_job( - self._set_charging_current, charging_current - ) - await self.async_request_refresh() - - -class InvalidAuth(HomeAssistantError): - """Error to indicate there is invalid auth.""" diff --git a/config/custom_components/peblar/entity.py b/config/custom_components/peblar/entity.py deleted file mode 100644 index 594b6b2713fe9d..00000000000000 --- a/config/custom_components/peblar/entity.py +++ /dev/null @@ -1,36 +0,0 @@ -"""Base entity for the peblar integration.""" - -from __future__ import annotations - -from homeassistant.helpers.device_registry import DeviceInfo -from homeassistant.helpers.update_coordinator import CoordinatorEntity - -from .const import ( - CHARGER_CURRENT_VERSION_KEY, - CHARGER_PART_NUMBER_KEY, - CHARGER_SERIAL_NUMBER_KEY, - CHARGER_SOFTWARE_KEY, - DOMAIN, -) -from .coordinator import PeblarCoordinator - - -class PeblarEntity(CoordinatorEntity[PeblarCoordinator]): - """Defines a base Peblar entity.""" - - _attr_has_entity_name = True - - @property - def device_info(self) -> DeviceInfo: - """Return device information about this Peblar device.""" - return DeviceInfo( - identifiers={ - ( - DOMAIN, - self.coordinator.data[CHARGER_SERIAL_NUMBER_KEY], - ) - }, - name=f"Peblar", - manufacturer="Peblar", - model_id=self.coordinator.data[CHARGER_PART_NUMBER_KEY], - ) diff --git a/config/custom_components/peblar/icons.json b/config/custom_components/peblar/icons.json deleted file mode 100644 index 359e05cb44122a..00000000000000 --- a/config/custom_components/peblar/icons.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "entity": { - "sensor": { - "charging_speed": { - "default": "mdi:speedometer" - }, - "added_range": { - "default": "mdi:map-marker-distance" - }, - "cost": { - "default": "mdi:ev-station" - }, - "current_mode": { - "default": "mdi:ev-station" - }, - "depot_price": { - "default": "mdi:ev-station" - }, - "energy_price": { - "default": "mdi:ev-station" - }, - "status_description": { - "default": "mdi:ev-station" - } - } - } -} diff --git a/config/custom_components/peblar/manifest.json b/config/custom_components/peblar/manifest.json deleted file mode 100644 index f278cbc2949d13..00000000000000 --- a/config/custom_components/peblar/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "domain": "peblar", - "name": "Peblar", - "codeowners": ["@thimo1996"], - "config_flow": true, - "documentation": "https://www.home-assistant.io/integrations/Eneco_Peblar", - "iot_class": "cloud_polling", - "requirements": [], - "version": "0.1.0" -} diff --git a/config/custom_components/peblar/number.py b/config/custom_components/peblar/number.py deleted file mode 100644 index b630fe0741f1f6..00000000000000 --- a/config/custom_components/peblar/number.py +++ /dev/null @@ -1,106 +0,0 @@ -"""Home Assistant component for accessing the Peblar Portal API. - -The number component allows control of charging current. -""" - -from __future__ import annotations - -from collections.abc import Awaitable, Callable -from dataclasses import dataclass -from typing import cast - -from homeassistant.components.number import NumberEntity, NumberEntityDescription -from homeassistant.config_entries import ConfigEntry -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import PlatformNotReady -from homeassistant.helpers.entity_platform import AddEntitiesCallback - -from .const import ( - CHARGER_MAX_CHARGING_CURRENT_KEY, - CHARGER_SERIAL_NUMBER_KEY, - DOMAIN, -) -from .coordinator import InvalidAuth, PeblarCoordinator -from .entity import PeblarEntity - - -@dataclass(frozen=True, kw_only=True) -class PeblarNumberEntityDescription(NumberEntityDescription): - """Describes Peblar number entity.""" - - max_value_fn: Callable[[PeblarCoordinator], float] - min_value_fn: Callable[[PeblarCoordinator], float] - set_value_fn: Callable[[PeblarCoordinator], Callable[[float], Awaitable[None]]] - - -NUMBER_TYPES: dict[str, PeblarNumberEntityDescription] = { - CHARGER_MAX_CHARGING_CURRENT_KEY: PeblarNumberEntityDescription( - key=CHARGER_MAX_CHARGING_CURRENT_KEY, - translation_key=CHARGER_MAX_CHARGING_CURRENT_KEY, - max_value_fn=lambda _: 20000.0, - min_value_fn=lambda _: 0.0, - set_value_fn=lambda coordinator: coordinator.async_set_charging_current, - native_step=1, - ), -} - - -async def async_setup_entry( - hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback -) -> None: - """Create Peblar number entities in HASS.""" - coordinator: PeblarCoordinator = hass.data[DOMAIN][entry.entry_id] - # Check if the user has sufficient rights to change values, if so, add number component: - try: - await coordinator.async_set_charging_current( - coordinator.data[CHARGER_MAX_CHARGING_CURRENT_KEY] - ) - except InvalidAuth: - return - except ConnectionError as exc: - raise PlatformNotReady from exc - - async_add_entities( - PeblarNumber(coordinator, entry, description) - for ent in coordinator.data - if (description := NUMBER_TYPES.get(ent)) - ) - - -class PeblarNumber(PeblarEntity, NumberEntity): - """Representation of the Peblar.""" - - entity_description: PeblarNumberEntityDescription - - def __init__( - self, - coordinator: PeblarCoordinator, - entry: ConfigEntry, - description: PeblarNumberEntityDescription, - ) -> None: - """Initialize a Peblar number entity.""" - super().__init__(coordinator) - self.entity_description = description - self._coordinator = coordinator - self._attr_unique_id = ( - f"{description.key}-{coordinator.data[CHARGER_SERIAL_NUMBER_KEY]}" - ) - - @property - def native_max_value(self) -> float: - """Return the maximum available value.""" - return self.entity_description.max_value_fn(self.coordinator) - - @property - def native_min_value(self) -> float: - """Return the minimum available value.""" - return self.entity_description.min_value_fn(self.coordinator) - - @property - def native_value(self) -> float | None: - """Return the value of the entity.""" - return cast(float | None, self._coordinator.data[self.entity_description.key]) - - async def async_set_native_value(self, value: float) -> None: - """Set the value of the entity.""" - await self.entity_description.set_value_fn(self.coordinator)(value) diff --git a/config/custom_components/peblar/peblar.py b/config/custom_components/peblar/peblar.py deleted file mode 100644 index 5557d1b99280be..00000000000000 --- a/config/custom_components/peblar/peblar.py +++ /dev/null @@ -1,81 +0,0 @@ -""" - -Peblar class - -""" - -import requests -import json - - -class Peblar: - def __init__(self, token, address, requestGetTimeout=None): - self.token = token - self.address = address - self._requestGetTimeout = requestGetTimeout - self.baseUrl = "http://" + self.address + "/api/wlac/v1/" - self.headers = { - "Content-type": "application/json", - "Authorization": f"{self.token}", - } - - @property - def requestGetTimeout(self): - return self._requestGetTimeout - - def authenticate(self): - try: - response = requests.get( - f"{self.baseUrl}system", - headers=self.headers, - timeout=self._requestGetTimeout, - ) - response.raise_for_status() - except requests.exceptions.HTTPError as err: - raise (err) - - def getChargerData(self): - try: - response = requests.get( - f"{self.baseUrl}system", - headers=self.headers, - timeout=self._requestGetTimeout, - ) - response.raise_for_status() - except requests.exceptions.HTTPError as err: - raise (err) - result1 = json.loads(response.text) - try: - response = requests.get( - f"{self.baseUrl}meter", - headers=self.headers, - timeout=self._requestGetTimeout, - ) - response.raise_for_status() - except requests.exceptions.HTTPError as err: - raise (err) - result2 = json.loads(response.text) - try: - response = requests.get( - f"{self.baseUrl}evinterface", - headers=self.headers, - timeout=self._requestGetTimeout, - ) - response.raise_for_status() - except requests.exceptions.HTTPError as err: - raise (err) - result3 = json.loads(response.text) - return result1 | result2 | result3 - - def setMaxChargingCurrent(self, newMaxChargingCurrentValue): - try: - response = requests.patch( - f"{self.baseUrl}evinterface", - headers=self.headers, - data=f'{{ "ChargeCurrentLimit": {newMaxChargingCurrentValue}}}', - timeout=self._requestGetTimeout, - ) - pass - except requests.exceptions.HTTPError as err: - raise (err) - return json.loads(response.text) diff --git a/config/custom_components/peblar/sensor.py b/config/custom_components/peblar/sensor.py deleted file mode 100644 index e7c445a3d7a72b..00000000000000 --- a/config/custom_components/peblar/sensor.py +++ /dev/null @@ -1,124 +0,0 @@ -"""Home Assistant component for accessing the Peblar Portal API. The sensor component creates multiple sensors regarding peblar performance.""" - -from __future__ import annotations - -from dataclasses import dataclass -import logging -from typing import cast - -from homeassistant.components.sensor import ( - SensorDeviceClass, - SensorEntity, - SensorEntityDescription, - SensorStateClass, -) -from homeassistant.config_entries import ConfigEntry -from homeassistant.const import ( - PERCENTAGE, - UnitOfElectricCurrent, - UnitOfEnergy, - UnitOfLength, - UnitOfPower, -) -from homeassistant.core import HomeAssistant -from homeassistant.helpers.entity_platform import AddEntitiesCallback -from homeassistant.helpers.typing import StateType - -from .const import ( - CHARGER_MAX_CHARGING_CURRENT_KEY, - CHARGER_SERIAL_NUMBER_KEY, - CHARGER_TOTAL_ENERGY_KEY, - CHARGER_SESSION_ENERGY_KEY, - CHARGER_CHARGE_POWER_KEY, - DOMAIN, -) -from .coordinator import PeblarCoordinator -from .entity import PeblarEntity - -UPDATE_INTERVAL = 30 - -_LOGGER = logging.getLogger(__name__) - - -@dataclass(frozen=True) -class PeblarSensorEntityDescription(SensorEntityDescription): - """Describes Peblar sensor entity.""" - - precision: int | None = None - - -SENSOR_TYPES: dict[str, PeblarSensorEntityDescription] = { - CHARGER_MAX_CHARGING_CURRENT_KEY: PeblarSensorEntityDescription( - key=CHARGER_MAX_CHARGING_CURRENT_KEY, - translation_key=CHARGER_MAX_CHARGING_CURRENT_KEY, - native_unit_of_measurement=UnitOfElectricCurrent.MILLIAMPERE, - device_class=SensorDeviceClass.CURRENT, - state_class=SensorStateClass.MEASUREMENT, - ), - CHARGER_TOTAL_ENERGY_KEY: PeblarSensorEntityDescription( - key=CHARGER_TOTAL_ENERGY_KEY, - translation_key=CHARGER_TOTAL_ENERGY_KEY, - native_unit_of_measurement=UnitOfEnergy.WATT_HOUR, - device_class=SensorDeviceClass.ENERGY, - state_class=SensorStateClass.MEASUREMENT, - ), - CHARGER_SESSION_ENERGY_KEY: PeblarSensorEntityDescription( - key=CHARGER_SESSION_ENERGY_KEY, - translation_key=CHARGER_SESSION_ENERGY_KEY, - native_unit_of_measurement=UnitOfEnergy.WATT_HOUR, - device_class=SensorDeviceClass.ENERGY, - state_class=SensorStateClass.MEASUREMENT, - ), - CHARGER_CHARGE_POWER_KEY: PeblarSensorEntityDescription( - key=CHARGER_CHARGE_POWER_KEY, - translation_key=CHARGER_CHARGE_POWER_KEY, - native_unit_of_measurement=UnitOfPower.WATT, - device_class=SensorDeviceClass.POWER, - state_class=SensorStateClass.MEASUREMENT, - ), -} - - -async def async_setup_entry( - hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback -) -> None: - """Create Peblar sensor entities in HASS.""" - coordinator: PeblarCoordinator = hass.data[DOMAIN][entry.entry_id] - - async_add_entities( - PeblarSensor(coordinator, description) - for ent in coordinator.data - if (description := SENSOR_TYPES.get(ent)) - ) - - -class PeblarSensor(PeblarEntity, SensorEntity): - """Representation of the Peblar portal.""" - - entity_description: PeblarSensorEntityDescription - - def __init__( - self, - coordinator: PeblarCoordinator, - description: PeblarSensorEntityDescription, - ) -> None: - """Initialize a Peblar sensor.""" - super().__init__(coordinator) - self.entity_description = description - self._attr_unique_id = ( - f"{description.key}-{coordinator.data[CHARGER_SERIAL_NUMBER_KEY]}" - ) - - @property - def native_value(self) -> StateType: - """Return the state of the sensor. Round the value when it, and the precision property are not None.""" - if ( - sensor_round := self.entity_description.precision - ) is not None and self.coordinator.data[ - self.entity_description.key - ] is not None: - return cast( - StateType, - round(self.coordinator.data[self.entity_description.key], sensor_round), - ) - return cast(StateType, self.coordinator.data[self.entity_description.key]) diff --git a/config/custom_components/peblar/strings.json b/config/custom_components/peblar/strings.json deleted file mode 100644 index f4378b328d8cca..00000000000000 --- a/config/custom_components/peblar/strings.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "config": { - "step": { - "user": { - "data": { - "station": "Station Serial Number", - "username": "[%key:common::config_flow::data::username%]", - "password": "[%key:common::config_flow::data::password%]" - } - }, - "reauth_confirm": { - "data": { - "username": "[%key:common::config_flow::data::username%]", - "password": "[%key:common::config_flow::data::password%]" - } - } - }, - "error": { - "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]", - "invalid_auth": "[%key:common::config_flow::error::invalid_auth%]", - "unknown": "[%key:common::config_flow::error::unknown%]", - "reauth_invalid": "Re-authentication failed; Serial Number does not match original" - }, - "abort": { - "already_configured": "[%key:common::config_flow::abort::already_configured_device%]", - "reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]" - } - }, - "entity": { - "lock": { - "lock": { - "name": "[%key:component::lock::title%]" - } - }, - "number": { - "maximum_charging_current": { - "name": "Maximum charging current" - }, - "energy_price": { - "name": "Energy price" - }, - "maximum_icp_current": { - "name": "Maximum ICP current" - } - }, - "sensor": { - "charging_power": { - "name": "Charging power" - }, - "max_available_power": { - "name": "Max available power" - }, - "charging_speed": { - "name": "Charging speed" - }, - "added_range": { - "name": "Added range" - }, - "added_energy": { - "name": "Added energy" - }, - "added_discharged_energy": { - "name": "Discharged energy" - }, - "cost": { - "name": "Cost" - }, - "state_of_charge": { - "name": "State of charge" - }, - "current_mode": { - "name": "Current mode" - }, - "depot_price": { - "name": "Depot price" - }, - "energy_price": { - "name": "Energy price" - }, - "status_description": { - "name": "Status description" - }, - "max_charging_current": { - "name": "Max charging current" - }, - "icp_max_current": { - "name": "Max ICP current" - } - }, - "switch": { - "pause_resume": { - "name": "Pause/resume" - } - } - } -} diff --git a/config/custom_components/peblar/translations/en.json b/config/custom_components/peblar/translations/en.json deleted file mode 100644 index 214d39117fa9d6..00000000000000 --- a/config/custom_components/peblar/translations/en.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "Device is already configured", - "reauth_successful": "Re-authentication was successful" - }, - "error": { - "cannot_connect": "Failed to connect", - "invalid_auth": "Invalid authentication", - "reauth_invalid": "Re-authentication failed; Token not valid", - "unknown": "Unexpected error" - }, - "step": { - "user": { - "data": { - "ip_address": "ip address", - "access_token": "access token" - } - } - } - }, - "entity": { - "number": { - "ChargeCurrentLimit": { - "name": "Maximum charging current" - } - }, - "sensor": { - "EnergyTotal": { - "name": "Total energy" - }, - "EnergySession": { - "name": "Session energy" - }, - "PowerTotal": { - "name": "Charging power" - } - } - } -} \ No newline at end of file