Documentation
¶
Index ¶
- type Marvin
- func (m *Marvin) Do(who, what, why string)
- func (m *Marvin) GetActivity(name string) *activity
- func (m *Marvin) LightSensor() bool
- func (m *Marvin) Log() (messages []*Message)
- func (m *Marvin) MotionSensor() bool
- func (sc Marvin) Register(c *chan State)
- func (m *Marvin) Run()
- func (m *Marvin) Save(path string) error
- func (m *Marvin) StateChanged()
- func (sc Marvin) Unregister(c *chan State)
- func (m *Marvin) UpdateActivity(name string)
- type Message
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Marvin ¶
type Marvin struct {
Hue hue.Hue
Activities map[string]*activity
Activity string
Motion bool
DayLight bool
LastTransition string
Present map[string]bool
Switch map[string]bool
Schedule scheduler.Schedule
Messages []string
States map[string]interface{}
Transitions map[string]struct {
Switch map[string]bool
Commands []struct {
Address string
State string
}
}
StatHatUserKey string
StartedOn time.Time
MotionOn time.Time
RecentMessages cb
// contains filtered or unexported fields
}
func NewMarvinFromFile ¶
func (*Marvin) GetActivity ¶
func (*Marvin) LightSensor ¶
func (*Marvin) MotionSensor ¶
func (*Marvin) StateChanged ¶
func (m *Marvin) StateChanged()
func (Marvin) Unregister ¶
func (sc Marvin) Unregister(c *chan State)
func (*Marvin) UpdateActivity ¶
Click to show internal directories.
Click to hide internal directories.

