ofalvai / home-assistant-szep-kartya

Custom component for tracking the balance of an OTP SZÉP Kártya
19 stars 5 forks source link

Error while setting up platform szep_kartya #1

Closed amaximus closed 2 years ago

amaximus commented 4 years ago

HASS 0.101.3 throws this error for a card_number different from 896747 (in fact for a 8-digit card_number):

2019-11-15 17:49:40 ERROR (MainThread) [homeassistant.config] Invalid config for [sensor.szep_kartya]: length of value must be at least 8 for dictionary value @ data['card_number']. Got 896747. (See /home/pi/homeassistant_conf/sensors/mkb_szepkartya.yaml, line 0). Please check the docs at https://home-assistant.io/integrations/sensor.szep_kartya/

ofalvai commented 4 years ago

I'm not sure I understand. The number you use (896747) is not 8 digits. Can you post your config?

amaximus commented 4 years ago

That's the point: I don't have this number anywhere, I still see it mentioned in the error log.

My config is:

(ha_venv3_7) pi@raspberrypi:~/homeassistant_conf/sensors $ sed 's/[0-5]/d/g' mkb_szepkartya.yaml
platform: szep_kartya
card_number: dddd7ddd
card_code: !secret szepkartya_code
name: 'Szép Kártya'
(ha_venv3_7) pi@raspberrypi:~/homeassistant_conf/sensors 

Checking my whole config, this 896747 number doesn't appear anywhere else, except for the error log entry:

(ha_venv3_7) pi@raspberrypi:~/homeassistant_conf $ find . -type f -exec grep -Hn 896747 {} \;
./home-assistant.log:8:2019-11-24 13:28:36 ERROR (MainThread) [homeassistant.config] Invalid config for [sensor.szep_kartya]: length of value must be at least 8 for dictionary value @ data['card_number']. Got 896747. (See /home/pi/homeassistant_conf/sensors/mkb_szepkartya.yaml, line 0). Please check the docs at https://home-assistant.io/integrations/sensor.szep_kartya/
(ha_venv3_7) pi@raspberrypi:~/homeassistant_conf $
amaximus commented 4 years ago

It might need to be stated whether the MKB Szépkártya is also supported or not. I can see only OTP URLs in the sensor.py.

joe-sol commented 2 years ago

It might need to be stated whether the MKB Szépkártya is also supported or not. I can see only OTP URLs in the sensor.py.

Hi amaximus , is there a workaround / solution for the MKB szépkártya too ?

Köszi!

amaximus commented 2 years ago

The documentation should say that this integration upports only OTP Szépkártya, but not MKB or K=H.