weather

package
v0.17.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = "0.0.1"

	AttrForecast     = "forecast"
	AttrForecastDay1 = "forecast_day1"
	AttrForecastDay2 = "forecast_day2"
	AttrForecastDay3 = "forecast_day3"
	AttrForecastDay4 = "forecast_day4"
	AttrForecastDay5 = "forecast_day5"

	AttrWeatherCondition   = "condition"
	AttrWeatherOzone       = "ozone"
	AttrWeatherAttribution = "attribution"
	AttrWeatherTemperature = "temperature"
	AttrWeatherVisibility  = "visibility"
	AttrWeatherDescription = "description"
	AttrWeatherIcon        = "icon"

	AttrWeatherMain               = "main"
	AttrWeatherDatetime           = "datetime"
	AttrWeatherHumidity           = "humidity"
	AttrWeatherMaxTemperature     = "max_temperature"
	AttrWeatherMinTemperature     = "min_temperature"
	AttrWeatherPressure           = "pressure"
	AttrWeatherWindBearing        = "wind_bearing"
	AttrWeatherWindSpeed          = "wind_speed"
	Day1AttrWeatherMain           = "day1_main"
	Dya1AttrWeatherIcon           = "day1_icon"
	Day1AttrWeatherDatetime       = "day1_datetime"
	Day1AttrWeatherHumidity       = "day1_humidity"
	Day1AttrWeatherMaxTemperature = "day1_max_temperature"
	Day1AttrWeatherMinTemperature = "day1_min_temperature"
	Day1AttrWeatherPressure       = "day1_pressure"
	Day1AttrWeatherWindBearing    = "day1_wind_bearing"
	Day1AttrWeatherWindSpeed      = "day1_wind_speed"
	Day2AttrWeatherMain           = "day2_main"
	Dya2AttrWeatherIcon           = "day2_icon"
	Day2AttrWeatherDatetime       = "day2_datetime"
	Day2AttrWeatherHumidity       = "day2_humidity"
	Day2AttrWeatherMaxTemperature = "day2_max_temperature"
	Day2AttrWeatherMinTemperature = "day2_min_temperature"
	Day2AttrWeatherPressure       = "day2_pressure"
	Day2AttrWeatherWindBearing    = "day2_wind_bearing"
	Day2AttrWeatherWindSpeed      = "day2_wind_speed"
	Day3AttrWeatherMain           = "day3_main"
	Dya3AttrWeatherIcon           = "day3_icon"
	Day3AttrWeatherDatetime       = "day3_datetime"
	Day3AttrWeatherHumidity       = "day3_humidity"
	Day3AttrWeatherMaxTemperature = "day3_max_temperature"
	Day3AttrWeatherMinTemperature = "day3_min_temperature"
	Day3AttrWeatherPressure       = "day3_pressure"
	Day3AttrWeatherWindBearing    = "day3_wind_bearing"
	Day3AttrWeatherWindSpeed      = "day3_wind_speed"
	Day4AttrWeatherMain           = "day4_main"
	Dya4AttrWeatherIcon           = "day4_icon"
	Day4AttrWeatherDatetime       = "day4_datetime"
	Day4AttrWeatherHumidity       = "day4_humidity"
	Day4AttrWeatherMaxTemperature = "day4_max_temperature"
	Day4AttrWeatherMinTemperature = "day4_min_temperature"
	Day4AttrWeatherPressure       = "day4_pressure"
	Day4AttrWeatherWindBearing    = "day4_wind_bearing"
	Day4AttrWeatherWindSpeed      = "day4_wind_speed"
	Day5AttrWeatherMain           = "day5_main"
	Dya5AttrWeatherIcon           = "day5_icon"
	Day5AttrWeatherDatetime       = "day5_datetime"
	Day5AttrWeatherHumidity       = "day5_humidity"
	Day5AttrWeatherMaxTemperature = "day5_max_temperature"
	Day5AttrWeatherMinTemperature = "day5_min_temperature"
	Day5AttrWeatherPressure       = "day5_pressure"
	Day5AttrWeatherWindBearing    = "day5_wind_bearing"
	Day5AttrWeatherWindSpeed      = "day5_wind_speed"

	// Attribution ...
	Attribution = ""

	// AttrLat ...
	AttrLat = "lat"
	// AttrLon ...
	AttrLon = "lon"
	// AttrTheme ...
	AttrTheme = "theme"
	// AttrWinter ...
	AttrWinter = "winter"
)
View Source
const (
	// StateClearSky ...
	StateClearSky = "clearSky"
	// StateFair ...
	StateFair = "fair"
	// StatePartlyCloudy ...
	StatePartlyCloudy = "partlyCloudy"
	// StateCloudy ...
	StateCloudy = "cloudy"
	// StateLightRainShowers ...
	StateLightRainShowers = "lightRainShowers"
	// StateRainShowers ...
	StateRainShowers = "rainShowers"
	// StateHeavyRainShowers ...
	StateHeavyRainShowers = "heavyRainShowers"
	// StateLightRainShowersAndThunder ...
	StateLightRainShowersAndThunder = "lightRainShowersAndThunder"
	// StateRainShowersAndThunder ...
	StateRainShowersAndThunder = "rainShowersAndThunder"
	// StateHeavyRainShowersAndThunder ...
	StateHeavyRainShowersAndThunder = "heavyRainShowersAndThunder"
	// StateLightSleetShowers ...
	StateLightSleetShowers = "lightSleetShowers"
	// StateSleetShowers ...
	StateSleetShowers = "sleetShowers"
	// StateHeavySleetShowers ...
	StateHeavySleetShowers = "heavySleetShowers"
	// StateLightSleetShowersAndThunder ...
	StateLightSleetShowersAndThunder = "lightSleetShowersAndThunder"
	// StateSleetShowersAndThunder ...
	StateSleetShowersAndThunder = "sleetShowersAndThunder"
	// StateHeavySleetShowersAndThunder ...
	StateHeavySleetShowersAndThunder = "heavySleetShowersAndThunder"
	// StateLightSnowShowers ...
	StateLightSnowShowers = "lightSnowShowers"
	// StateSnowShowers ...
	StateSnowShowers = "snowShowers"
	// StateHeavySnowShowers ...
	StateHeavySnowShowers = "heavySnowShowers"
	// StateLightSnowShowersAndThunder ...
	StateLightSnowShowersAndThunder = "lightSnowShowersAndThunder"
	// StateSnowShowersAndThunder ...
	StateSnowShowersAndThunder = "snowShowersAndThunder"
	// StateHeavySnowShowersAndThunder ...
	StateHeavySnowShowersAndThunder = "heavySnowShowersAndThunder"
	// StateLightRain ...
	StateLightRain = "lightRain"
	// StateRain ...
	StateRain = "rain"
	// StateHeavyRain ...
	StateHeavyRain = "heavyRain"
	// StateLightRainAndThunder ...
	StateLightRainAndThunder = "lightRainAndThunder"
	// StateRainAndThunder ...
	StateRainAndThunder = "rainAndThunder"
	// StateHeavyRainAndThunder ...
	StateHeavyRainAndThunder = "heavyRainAndThunder"
	// StateLightSleet ...
	StateLightSleet = "lightSleet"
	// StateSleet ...
	StateSleet = "sleet"
	// StateHeavySleet ...
	StateHeavySleet = "heavySleet"
	// StateLightSleetAndThunder ...
	StateLightSleetAndThunder = "lightSleetAndThunder"
	// StateSleetAndThunder ...
	StateSleetAndThunder = "sleetAndThunder"
	// StateHeavySleetAndThunder ...
	StateHeavySleetAndThunder = "heavySleetAndThunder"
	// StateLightSnow ...
	StateLightSnow = "lightSnow"
	// StateSnow ...
	StateSnow = "snow"
	// StateHeavySnow ...
	StateHeavySnow = "heavySnow"
	// StateLightSnowAndThunder ...
	StateLightSnowAndThunder = "lightSnowAndThunder"
	// StateSnowAndThunder ...
	StateSnowAndThunder = "snowAndThunder"
	// StateHeavySnowAndThunder ...
	StateHeavySnowAndThunder = "heavySnowAndThunder"
	// StateFog ...
	StateFog = "fog"
)

Variables

This section is empty.

Functions

func BaseForecast

func BaseForecast() m.Attributes

BaseForecast ...

func GetActorState

func GetActorState(state, theme string, n, w bool) (actorState supervisor.ActorState)

GetActorState ...

func GetImagePath

func GetImagePath(state, theme string, night, winter bool) (imagePath *string)

GetImagePath ...

func GetIndexByState

func GetIndexByState(state string) (idx int)

GetIndexByState ...

func GetStateByIndex

func GetStateByIndex(idx int) (state string)

GetStateByIndex ...

func NewActorStates

func NewActorStates(n, w bool) (states map[string]supervisor.ActorState)

NewActorStates ...

func NewAttr

func NewAttr() m.Attributes

NewAttr ...

func NewForecast

func NewForecast(days int) m.Attributes

NewForecast ...

func NewSettings

func NewSettings() m.Attributes

NewSettings ...

Types

type EventStateChanged

type EventStateChanged struct {
	Type       string          `json:"type"`
	EntityId   common.EntityId `json:"entity_id"`
	State      string          `json:"state"`
	Attributes m.Attributes    `json:"attributes"`
	Settings   m.Attributes    `json:"settings"`
}

EventStateChanged ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL