weather

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name ...
	Name = "weather"
	// EntityWeather ...
	EntityWeather = string("weather")
)
View Source
const (
	// AttrForecast ...
	AttrForecast = "forecast"
	// AttrForecastDay1 ...
	AttrForecastDay1 = "forecast_day1"
	// AttrForecastDay2 ...
	AttrForecastDay2 = "forecast_day2"
	// AttrForecastDay3 ...
	AttrForecastDay3 = "forecast_day3"
	// AttrForecastDay4 ...
	AttrForecastDay4 = "forecast_day4"
	// AttrForecastDay5 ...
	AttrForecastDay5 = "forecast_day5"
	// AttrWeatherCondition ...
	AttrWeatherCondition = "condition"
	// AttrWeatherDatetime ...
	AttrWeatherDatetime = "datetime"
	// AttrWeatherAttribution ...
	AttrWeatherAttribution = "attribution"
	// AttrWeatherHumidity ...
	AttrWeatherHumidity = "humidity"
	// AttrWeatherOzone ...
	AttrWeatherOzone = "ozone"
	// AttrWeatherPressure ...
	AttrWeatherPressure = "pressure"
	// AttrWeatherTemperature ...
	AttrWeatherTemperature = "temperature"
	// AttrWeatherMinTemperature ...
	AttrWeatherMinTemperature = "min_temperature"
	// AttrWeatherMaxTemperature ...
	AttrWeatherMaxTemperature = "max_temperature"
	// AttrWeatherVisibility ...
	AttrWeatherVisibility = "visibility"
	// AttrWeatherWindBearing ...
	AttrWeatherWindBearing = "wind_bearing"
	// AttrWeatherWindSpeed ...
	AttrWeatherWindSpeed = "wind_speed"
	// AttrWeatherMain ...
	AttrWeatherMain = "main"
	// AttrWeatherDescription ...
	AttrWeatherDescription = "description"
	// AttrWeatherIcon ...
	AttrWeatherIcon = "icon"

	// Attribution ...
	Attribution = ""

	// AttrLat ...
	AttrLat = "lat"
	// AttrLon ...
	AttrLon = "lon"
	// AttrPlugin ...
	AttrPlugin = "plugin"
)
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"
)
View Source
const (
	// StatePositionUpdate ...
	StatePositionUpdate = "positionUpdate"
)
View Source
const (
	// TopicPluginWeather ...
	TopicPluginWeather = string("plugin.weather")
)

Variables

This section is empty.

Functions

func BaseForecast

func BaseForecast() m.Attributes

BaseForecast ...

func GetActorState

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

GetActorState ...

func GetImagePath

func GetImagePath(state 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 New

func New() plugins.Plugable

New ...

func NewActorStates

func NewActorStates(n, w bool) (states map[string]entity_manager.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 Actor

type Actor struct {
	entity_manager.BaseActor
	// contains filtered or unexported fields
}

Actor ...

func NewActor

func NewActor(entity *m.Entity,
	entityManager entity_manager.EntityManager,
	eventBus bus.Bus) *Actor

NewActor ...

func (*Actor) SetState

func (e *Actor) SetState(params entity_manager.EntityStateParams) error

SetState ...

func (*Actor) Spawn

func (e *Actor) Spawn() entity_manager.PluginActor

Spawn ...

func (*Actor) UpdatePosition

func (e *Actor) UpdatePosition(settings m.Attributes)

UpdatePosition ...

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