strautomator / core

Strautomator Core
MIT License
41 stars 5 forks source link

Weather summary has trailing space #11

Closed christopher-dG closed 2 years ago

christopher-dG commented 2 years ago

My weather automation looks like this:

Set activity description: ${weather.icon} ${weather.summary}, ${weather.temperature} (feels like ${weather.feelsLike}), humidity ${weather.humidity}, wind ${weather.windSpeed} ${weather.windDirection} 

And I end up with descriptions like this:

☀ Cool, clear , 20°C (feels like 20°C), humidity 83%, wind 52 kph W

Note the Cool, clear ,: the comma comes after a space which shouldn't be there.

I think this comes from this line, not sure why there's a trailing space:

https://github.com/strautomator/core/blob/d93b3f3b4fe051d9b49b3ce0210caa6c35ec2498/src/weather/utils.ts#L220

igoramadas commented 2 years ago

You're right. I remember adding that trailing space for a reason many months ago, but reviewing the code it's clear that it's not really necessary any longer. I won't waste time to investigate thou, as the fix is quite obvious :-)

Just removed it now: https://github.com/strautomator/core/commit/6f0bd42711d40d46f0c25641a5a072867b91ead2

Fix will be deployed this weekend.