I am curious to understand how to access some of the alternative Attributes
For example;
Attributes:
UpperQuantity
TotalPercentageUsed
TotalCharge
TotalAdditionalCharge
TotalDataUsed
TotalDataRemaining
UnitType
IsFinal
IsRechargeRequired
UpperQuantityDisplay
TotalDataUsedDisplay
TotalDataRemainingDisplay
IsThrottled
DataUsedThisDevice
DataUsedThisDeviceDisplay
PercentageUsedThisDevice
DataUsedOthers
DataUsedOthersDisplay
PercentageUsedOthers
Trusted
SingleService
I attempted to adjust myself by editing the /config/custom_components/optus/sensor.py file
specifically I adjusted optus_sharedtierdatausage section where it was listed as ;
def get_value(self, ftype):
if ftype == "state":
if self.sensor == "daysRemaining":
return self.coordinator.data[self.sensor]
elif self.sensor == "smsUsage":
return self.coordinator.data[self.sensor]["amount"]
elif self.sensor == "mmsUsage":
return self.coordinator.data[self.sensor]["amount"]
elif self.sensor == "tierVoiceUsage":
return self.coordinator.data[self.sensor]["totalCharge"]
elif self.sensor == "tierDataUsage":
return self.coordinator.data[self.sensor]["totalDataUsed"]
elif self.sensor == "sharedTierDataUsage":
return self.coordinator.data[self.sensor]["totalDataUsed"]
#return self.coordinator.data[self.sensor]["DataUsedThisDeviceDisplay"]
The last line is commented out now, but its what I tried and it didnt work, and the entry just showed up with Unknown for its values.
I am curious to understand how to access some of the alternative Attributes
For example;
Attributes:
UpperQuantity
TotalPercentageUsed
TotalCharge
TotalAdditionalCharge
TotalDataUsed
TotalDataRemaining
UnitType
IsFinal
IsRechargeRequired
UpperQuantityDisplay
TotalDataUsedDisplay
TotalDataRemainingDisplay
IsThrottled
DataUsedThisDevice
DataUsedThisDeviceDisplay
PercentageUsedThisDevice
DataUsedOthers
DataUsedOthersDisplay
PercentageUsedOthers
Trusted
SingleService
I attempted to adjust myself by editing the /config/custom_components/optus/sensor.py file
specifically I adjusted optus_sharedtierdatausage section where it was listed as ;
The last line is commented out now, but its what I tried and it didnt work, and the entry just showed up with Unknown for its values.