Documentation ¶
Index ¶
- Constants
- func BaseForecast() m.Attributes
- func GetActorState(state string, n, w bool) (actorState entity_manager.ActorState)
- func GetImagePath(state string, night, winter bool) (imagePath *string)
- func GetIndexByState(state string) (idx int)
- func GetStateByIndex(idx int) (state string)
- func New() plugins.Plugable
- func NewActorStates(n, w bool) (states map[string]entity_manager.ActorState)
- func NewAttr() m.Attributes
- func NewForecast(days int) m.Attributes
- func NewSettings() m.Attributes
- type Actor
- type EventStateChanged
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 GetActorState ¶
func GetActorState(state string, n, w bool) (actorState entity_manager.ActorState)
GetActorState ...
func GetImagePath ¶
GetImagePath ...
func NewActorStates ¶
func NewActorStates(n, w bool) (states map[string]entity_manager.ActorState)
NewActorStates ...
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) 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 ...
Click to show internal directories.
Click to hide internal directories.