Map from Google - Slovenia

In Slovenia there is a clear separation between the western flat area stretching from Nova Gorica to northern Istria, which has a mild climate, and the interior, which has a moderately continental climate (in hills and valleys, and in the eastern plain) or a cold mountain climate (in the mountains).
Precipitation is abundant in the western part of the country, where it varies between 1,000 and 1,500 millimetres (40 and 60 inches) per year in plains and hills, while it exceeds 2,000 mm (80 in) in the mountains, and even 3,000 mm (120 in) in the most exposed slopes. Only in the far east, precipitation becomes less abundant, and decreases below 900 mm (35.5 in).

Piran

The western plains of Slovenia that are influenced by the sea are not vast, because about 30 kilometres (18 miles) away from the coast there is a mountain range that separates the interior from the sea. This flat area close to the coast has a climate that can be described as transitional Mediterranean. In fact, winter is quite mild in cities such as Portorož, Piran, Izola, Koper, though you cannot fully define it as Mediterranean: the average temperature in January is around 5/6 °C (41/43 °F). This area is exposed to a fearful wind: the temperature undergoes sudden drops when the Bora makes its appearance, a cold and furious wind which may be accompanied by clear skies (light Bora), or more rarely by cloudy skies, with rain or snow (dark Bora). Snowfall in this area is rare and usually not abundant, because the Bora comes from the dry plains of Eastern Europe, therefore it's usually dry.
Here are the average temperatures of Portorož, located on the coast of the northern Adriatic Sea, on the Gulf of Trieste.
Average temperatures - Portoroz
PortorozJanFebMarAprMayJunJulAugSepOctNovDec
PortorozJFMAMJJASOND
Min (°C)336913161919161274
Max (°C)681115192326262218128
Min (°F)373743485561666661544539
Max (°F)434652596673797972645446

Rainfall in Portorož is fairly abundant, around 1,000 millimetres (40 inches) per year, and is well distributed throughout the year, given that even in summer there can be some rain, often in the form of thunderstorms. However, the rainiest season is autumn. Here is the average rainfall.
Average precipitation - Portoroz
PortorozJanFebMarAprMayJunJulAugSepOctNovDecYear
PortorozJFMAMJJASONDY
Prec. (mm)65607080851007590110125105801045
Prec.(in)2.62.42.83.13.33.933.54.34.94.13.141.1
Days9881411109911121411126

The sea temperature is high enough for swimming in July and August, but all in all even in September.
Sea temperature - Portoroz
PortorozJanFebMarAprMayJunJulAugSepOctNovDec
PortorozJFMAMJJASOND
Sea (°C)121111131822242523191614
Sea (°F)545252556472757773666157

In cities which are not located right on the coast, the winter is a bit colder, as is the case of Nova Gorica and Ajdovscina, but the average is still above freezing, around 4/5 °C (39/41 °F) in January.
Summer in the western plain is warm or even hot, averaging around 23 °C (73 °F) in July and August, though it's tempered by the breeze. The rains are frequent throughout the year, with a maximum in autumn (September to November), a relative minimum in winter, and an increase between late spring and summer. This is not to say that summer is a bad season, but you have to take into account some thunderstorms in the afternoon, and even a few days in which Atlantic disturbances manage to move over the country, maybe accompanied with some cool gusts of Bora.

As soon as you move towards the interior, you will find some elevations, which are able to hinder the mild influence of the Adriatic Sea. Already in Postojna, located in the Karst Plateau, at 530 metres (1,700 feet) above sea level, winter is cold and snowy, while summer can be hot during the day, but nights remain cool. The rains are abundant throughout the year, with a relative break only in January, February and July; in autumn, they can sometimes be torrential.

Ljubljana

In Ljubljana, at 300 metres (1,000 feet) above sea level, the average of January is 0 °C (32 °F), that of July is 21 °C (70 °F). Rainfall is abundant here as well, about 1,400 mm (55 in) per year, in fact this is one of the rainiest capitals in Europe. Here is the average precipitation.
Average precipitation - Ljubljana
LjubljanaJanFebMarAprMayJunJulAugSepOctNovDecYear
LjubljanaJFMAMJJASONDY
Prec. (mm)9090751001201351151301401501301151390
Prec.(in)3.53.533.94.75.34.55.15.55.95.14.554.7
Days99891313998111211121

In winter, snow often falls, while in summer there is no shortage of afternoon thunderstorms, although the sunshine amount is acceptable. In winter, there are frequent fogs when the weather is stable, while cold waves from Russia can bring intense frosts; in summer there can be short heat waves, with peaks of 35 °C (95 °F). Here are the average temperatures.
Average temperatures - Ljubljana
LjubljanaJanFebMarAprMayJunJulAugSepOctNovDec
LjubljanaJFMAMJJASOND
Min (°C)-3-21591315141172-2
Max (°C)36111521242726221583
Min (°F)272834414855595752453628
Max (°F)374352597075817972594637

Across the central and eastern part of Slovenia, the climate is similar to that of Ljubljana, and the differences are mainly due to the altitude. Going to the east, however, annual precipitation gradually decreases: in Maribor it goes down to 875 mm (34.5 in), and especially autumn and winter are relatively less rainy, while summer receives equally its load of thunderstorms. This applies to the entire eastern area, from Maribor to the north-eastern flat area, on the border with Austria and Hungary.

In high mountains the climate is naturally colder. Snowfalls are especially abundant in the mountains of western Slovenia, on both the northern Alpine sector and in the massif to the south, which not coincidentally is called "snowy mountain" (Snežnik). In Kranjska Gora, at 800 metres (2,600 feet) above sea level, 1,740 mm (68.5 in) of rain or snow per year fall, and even more in the mountains that surround it. In summer, strong afternoon thunderstorms are possible, as well as heavy rains in autumn, especially in October. Here are the average temperatures.
Average temperatures - Kraniska Gora
Kraniska GoraJanFebMarAprMayJunJulAugSepOctNovDec
Kraniska GoraJFMAMJJASOND
Min (°C)-8-7-3058101062-3-7
Max (°C)1481217202323181362
Min (°F)181927324146505043362719
Max (°F)343946546368737364554336

When to go

The short coastline of Slovenia lends itself to beach life in summer, especially in July and August, even though there can be some cool and rainy days, or some afternoon thunderstorms.
The interior can be visited from June to September, bearing in mind, however, that sometimes the rains may be heavy even in summer in the western areas, such as in Ljubljana or Postunia. In July and August, every so often, periods of intense heat may occur, so if you don't like the heat you may prefer June and September.
In ski resorts, snow is almost always guaranteed. In February, the days are longer than in the Christmas period, so it's preferable for skiing.

What to pack

In winter: in the interior, warm clothes, sweater, down jacket, scarf, gloves, umbrella. On the coast, warm clothes, jacket, raincoat or umbrella, but also hat, scarf and gloves for the days with Bora.
In summer: light clothes, T-shirts and shorts, but also long pants, jacket and sweatshirt for the evening or for cooler days; raincoat or umbrella. In the mountains, hiking shoes, sunscreen and sunglasses.