Remove battery icon on device

Ricardo6 months 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 Tananaev6 months ago

You can use computed attributes to remove the battery level.

Ricardo6 months ago

Thanks Anton, I added this attribute:

if (batteryLevel >= 0, 100, 100)

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

Anton Tananaev6 months ago

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

Ricardo6 months 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 Tananaev6 months ago

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

Ricardo6 months ago

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