sensor:
  - platform: sql
    db_url: !secret db_url
    queries:
      - name: db_size
        query: "SELECT (pg_database_size('homeassistant')/1024/1024) as db_size;"
        column: db_size
        unit_of_measurement: MB
    scan_interval: 120
