Battery level sensor

Dear,
I try to create one sensor with the level of battery of one sensor because I want to monitor it and send me a notification if the level go under a certain level. I try this code but I receive one error. Can anyone help me please? Thank you

2018-12-31 11:04:51 ERROR (Thread-2) [homeassistant.util.yaml] while scanning for the next token
found character ‘\t’ that cannot start any token
in “/home/homeassistant/.homeassistant/packages/battery.yaml”, line 111, column 1

I use this code in a package folder called battery.yaml:

sensor:
  - platform: template
    sensors:
      hline_1:
        value_template: hline

    # Batterie termometri

sensors:
  - platform: template
	bat5:
	  friendly_name: "bat_5"
	  unit_of_measurement: '%'
	  value_template: '{{ states.sensor.binary_sensor.openclose_17.attributes.battery_level }}'
	  icon_template: mdi:battery

That error is usually related to the use of tab instead of spaces in yaml files

If you need it, this are the sensor and automation I use to check the tablet battery and tell the plug to charge it:
Sensor:

#Tablet battery level
  - platform: template
    sensors:
      display_tablet_battery:
        value_template: '{{ states.display.tablet.attributes.battery_level }}'
        friendly_name: 'Livello batteria tablet'
        unit_of_measurement: "%"

Automation:

id: tablet on
alias: Tablet Battery Charge on
trigger:
- below: '21'
  entity_id: sensor.display_tablet_battery
  platform: numeric_state
condition: []
action:
- data:
    entity_id: switch.presa_tablet
  service: switch.turn_on

As you can see it turn on the plug as the battery level goes under 21% (and another automation turn the plug off when it reaches 100%)

Try rewriting the sensor like this:

sensor:
  - platform: template
    sensors:
      hline_1:
        value_template: hline
      # Batterie termometri
      bat5:
        friendly_name: "bat_5"
	    unit_of_measurement: '%'
	    value_template: '{{ states.sensor.binary_sensor.openclose_17.attributes.battery_level }}'
	    icon_template: mdi:battery

works fine, thank you!