Remove battery icon on device

Ricardo 2 years ago

Nice to greet you. I would like to know if it is possible to remove the battery icon displayed on the device. I don't want the customer to see it because I am installing used equipment whose batteries are not at 100%. I have searched and found nothing in the settings. I would appreciate it if someone could help me with this. Regards.

Anton Tananaev 2 years ago

You can use computed attributes to remove the battery level.

Ricardo 2 years ago

Thanks Anton, I added this attribute:

if (batteryLevel >= 0, 100, 100)

but the status doesn't change. Is it defined correctly?

Anton Tananaev 2 years ago

I'm not familiar with this syntax. Where did you get it from? Please link to the documentation where you found it.

Ricardo 2 years ago

Sorry, I was given the wrong advice. But I managed to solve it with the calculated attribute of the battery level. I left the expression at 100 and the battery level went to 100%.
thanks.

Anton Tananaev 2 years ago

You can also put null as an expression and it will be removed.

Ricardo 2 years ago

I tried it, and it works perfectly. Thank you!