Mains supply on battery doorbell.

I have wired up my battery doorbell after appalling battery life. Bought the recommended 18v transformer. Wired up the doorbell today and tonight got a message warning telling my my battery is very low? Yet it’s been connected to the mains all day?
Really regretting buying this.