* Platform schema had duplicate retain keys, which made it always set to default. * Optimistic state changed was inverted, due to using integer position instead of boolean. * Add more tests for mqtt cover.