Weather
In the Smart Home system, there is a basic “weather” plugin that provides the foundation for implementing weather plugins. This plugin enables access to weather information and allows the creation and integration of specific weather plugins for different data sources.
The “weather” plugin includes a list of weather conditions that can be used to display current weather conditions. Here is the list of weather conditions supported by the “weather” plugin:
clearSky
: Clear sky.fair
: Fair weather.partlyCloudy
: Partly cloudy.cloudy
: Cloudy.lightRainShowers
: Light rain showers.rainShowers
: Rain showers.heavyRainShowers
: Heavy rain showers.lightRainShowersAndThunder
: Light rain showers and thunder.rainShowersAndThunder
: Rain showers and thunder.heavyRainShowersAndThunder
: Heavy rain showers and thunder.lightSleetShowers
: Light sleet showers.sleetShowers
: Sleet showers.heavySleetShowers
: Heavy sleet showers.lightSleetShowersAndThunder
: Light sleet showers and thunder.sleetShowersAndThunder
: Sleet showers and thunder.heavySleetShowersAndThunder
: Heavy sleet showers and thunder.lightSnowShowers
: Light snow showers.snowShowers
: Snow showers.heavySnowShowers
: Heavy snow showers.lightSnowShowersAndThunder
: Light snow showers and thunder.snowShowersAndThunder
: Snow showers and thunder.heavySnowShowersAndThunder
: Heavy snow showers and thunder.lightRain
: Light rain.rain
: Rain.heavyRain
: Heavy rain.lightRainAndThunder
: Light rain and thunder.rainAndThunder
: Rain and thunder.heavyRainAndThunder
: Heavy rain and thunder.lightSleet
: Light sleet.sleet
: Sleet.heavySleet
: Heavy sleet.
The “weather” plugin has basic settings that allow you to configure its behavior and the display of weather information. Here is a description of the basic settings of the “weather” plugin:
lat
: Latitude - a numerical value indicating the geographic latitude of the location for retrieving weather data. Providing the correct latitude allows obtaining up-to-date weather for the specified region.lon
: Longitude - a numerical value indicating the geographic longitude of the location for retrieving weather data. Providing the correct longitude helps obtain up-to-date weather for the specified region.theme
: Theme - a parameter that determines the appearance and style of displaying weather data. Possible values may vary depending on the implementation of the plugin and user settings.winter
: Winter - a boolean value indicating which type of weather to display for the winter season. This setting allows adapting the display of weather depending on the time of year.
Please note that specific settings and their values may vary depending on the implementation of the “weather” plugin.
The “weather” plugin implements the following basic properties for displaying weather:
main
: Main weather description (e.g., “Clear”, “Cloudy”, “Rain”, etc.).datetime
: Date and time of the weather data.humidity
: Air humidity.max_temperature
: Maximum temperature.min_temperature
: Minimum temperature.pressure
: Atmospheric pressure.wind_bearing
: Wind direction. 8
. wind_speed
: Wind speed.
For each of the five days of weather forecast (day1, day2, day3, day4, day5), similar properties are available, with the corresponding day prefix. For example, for the first day of the forecast, properties like day1_main
, day1_datetime
, day1_humidity
, etc., are accessible.
Example usage of the “weather” plugin’s basic properties:
const weatherPlugin = new WeatherPlugin();
// Get current weather data
const currentWeather = EntityGetAttributes('weather_owm.weather1')
console.log(currentWeather.main);
console.log(currentWeather.datetime);
console.log(currentWeather.humidity);
console.log(currentWeather.max_temperature);
console.log(currentWeather.min_temperature);
console.log(currentWeather.pressure);
console.log(currentWeather.wind_bearing);
console.log(currentWeather.wind_speed);
// Get weather data for the first day of the forecast
const day1Weather = EntityGetAttributes('weather_owm.weather1')
console.log(day1Weather.day1_main);
console.log(day1Weather.day1_datetime);
console.log(day1Weather.day1_humidity);
console.log(day1Weather.day1_max_temperature);
console.log(day1Weather.day1_min_temperature);
console.log(day1Weather.day1_pressure);
console.log(day1Weather.day1_wind_bearing);
console.log(day1Weather.day1_wind_speed);
Please note that specific properties and their values may vary depending on the implementation of the “weather” plugin and the weather data source.