Map from Google - Slovenia

In Slovenia there is a clear separation between the area of the plain that extends around Nova Gorica and northern Istria, which has a mild climate, and the inland areas, which have 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 goes above 2,000 mm (79 in) in the mountains, and even 3,000 mm (118 in) in the most exposed slopes. Only in the far east, rainfall became less abundant and decreases below 900 mm (35.5 in).

Piran

The western plains of Slovenia, which are influenced by the sea, are not vast, because about 30 kilometres (18 miles) from the coast there is a mountain range which 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 like Portorož, Piran, Izola, Koper, even though you cannot fully define it 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 that may be accompanied by clear skies (light Bora) or a cloudy weather 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ž.
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 that are not 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, but tempered by the breezes. The rains are frequent throughout the year, and they experience 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 cloudy, but you have to take into account some thunderstorms in the afternoon, and even a few days in which Atlantic disturbances manage to get here, maybe followed by cool gusts of Bora.

As soon as you move forward in inland areas, you find the elevations that block the mild influence of the Adriatic Sea. Already in Postojna, 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 the nights remain cool. The rains are abundant throughout the year, with a relative break only in January, February and July. In autumn, the rains can be torrential.

Ljubljana

In Ljubljana, at 300 metres (1,000 feet) above sea level, the average in January is 0 °C (32 °F), that of July is 21 °C (70 °F). Here, too, rainfall is abundant, about 1,400 mm (55 in) per year, making it 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 rains and 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 periods of 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 in temperature are mainly due to the altitude. Going east, however, the annual precipitation decreases gradually: in Maribor it goes down to 875 mm (34.5 in), and here especially autumn and winter are relatively less rainy, since summer has equally its load of thunderstorms. This applies to the entire easternmost 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 offshoot and the southern massif which not coincidentally is called "snowy mountain" (Snežnik). In Kranjska Gora, at 800 m above sea level, 1,740 mm (68.5 in) of rain or snow per year fall, even more so 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 inland areas 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 suffer from 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 Bora.
In summer: light clothes, T-shirts and shorts, but also long pants, jacket and sweatshirt for the evening or cooler days; raincoat or umbrella. In the mountains, hiking shoes, sunscreen and sunglasses.