Battery attribute is offered in graph page for sensors which are not battery devices
For MySensorsPIR devices ( and maybe others too) an option batterySensor exists. If this is set to false (the default value) it still apears in the graph page and it is activated too.