myTselection / youfone_be

Yoin.be Youfone.nl Home Assistant custom component HACS to get Yoin / Youfone mobile phone subscription and usage details for Belgium and Netherlands.
MIT License
3 stars 1 forks source link

Only seeing 1 subscription #16

Closed bezigebever closed 1 year ago

bezigebever commented 1 year ago

We have 4 Youphone numbers in this subscription, but only 1 appears with 3 sensors. Should I do something else ?

myTselection commented 1 year ago

could you share the 'usage_details_json' and 'user_details_json' and 'subscription_details_json' attributes of your sensor? you may want to anonymize parts of it.

bezigebever commented 1 year ago

Many thanks for your help, this are the requested attributes:

usage_details_json: 
Message: null
ResultCode: 0
Object:
  - Properties:
      - Key: UsedAmount
        Value: '1380'
      - Key: BundleDurationWithUnits
        Value: 5120 MB
      - Key: Percentage
        Value: '26.95'
      - Key: _isUnlimited
        Value: '0'
      - Key: _isExtraMbsAvailable
        Value: '1'
    SectionId: 1
  - Properties:
      - Key: UsedAmount
        Value: '0'
      - Key: BundleDurationWithUnits
        Value: 200 Min
      - Key: Percentage
        Value: '0.00'
      - Key: _isUnlimited
        Value: '0'
    SectionId: 2
  - Properties:
      - Key: StartDate
        Value: 1 mei 2023
      - Key: NumberOfRemainingDays
        Value: '19'
    SectionId: 3

user_details_json: 
Message: Authorization succes
ResultCode: 0
Object:
  Customer:
    CustomerNumber: 2021025133
    Email: XXX
    FirstName: XXX
    Gender: null
    Id: 34649
    Initials: XXX
    IsBusinessCustomer: false
    Language: nl
    LastName: XXX
    PhoneNumber: 'XXX69'
    Prefix: null
    RoleId: 2
  Customers:
    - CustomerId: 34958
      CustomerNumber: 2021025442
      IsDefaultCustomer: false
      Msisdn: 32XXX12
      ProvisioningTypeId: 1
      RoleId: 3
    - CustomerId: 34959
      CustomerNumber: 2021025443
      IsDefaultCustomer: false
      Msisdn: 32XXX43
      ProvisioningTypeId: 1
      RoleId: 3
    - CustomerId: 34961
      CustomerNumber: 2021025445
      IsDefaultCustomer: false
      Msisdn: 32XXX28
      ProvisioningTypeId: 1
      RoleId: 3
    - CustomerId: 34649
      CustomerNumber: 2021025133
      IsDefaultCustomer: true
      Msisdn: 32XXX69
      ProvisioningTypeId: 1
      RoleId: 2
  CustomersCount: 4

subscription_details_json: 
'21':
  AbonnementType: 5 GB<br/>200 min/sms
  Price: 10,-
  ContractStartDate: 27 juli 2022
  ContractDuration: 1 maand
  _renew: '1'
'23':
  Msisdn: '+32XXX12'
  PUK: 'XXX'
  ICCShort: 'XXX'
  MsisdnStatus: Actief
  _msisdnButtonVisible: Suspend
  _swapRequest: '1'
'24':
  DataSubscription: 5 GB
  ExtraServices: Dataplafond
'26':
  VoiceSmsSubscription: 200 min/sms
  ExtraServices: Belplafond
myTselection commented 1 year ago

thanks a lot for this info! based on this I will be able to create a new version that supports multiple phonenumbers in one subscription.

myTselection commented 1 year ago

Hi, I've created a new release v4.0.0 which should support multiple sim cards within one single account. Could you validate and let me know if this works for you? Can't fully test it myself as I don't have this case myself...

bezigebever commented 1 year ago

Just tested it, seems perfect. Many thanks, great job !