Remove battery icon on device

Ricardoa year 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 Tananaeva year ago

You can use computed attributes to remove the battery level.

Ricardoa year ago

Thanks Anton, I added this attribute:

if (batteryLevel >= 0, 100, 100)

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

Anton Tananaeva year ago

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

Ricardoa year 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 Tananaeva year ago

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

Ricardoa year ago

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