Volvo's announcement was that all cars would be electric or hybrid, but their definition of hybrid is very broad. It includes a "mild hybrid" system which can never run on pure battery. It's pretty cool, but more like a fuel efficiency improvement than it's like a Prius.
Mercedes (or other German manufacturers) aren't doing this lip service because of Tesla (not everything revolves around them) but because of the situation in Germany. It's a broader topic, but in short the big manufacturers are working together with the government, and making some concessions in exchange for no diesel bans of any kind.
It's more complicated than that. Diesel bans (when they come) will be declared by courts, not by politicians or officers in the executive branch. The purpose of said concessions is to calm German customers.