docs: normalize & make basic corrections to documentation

This commit is contained in:
2025-08-01 21:19:47 -05:00
parent e13fd6ab5b
commit 292879a8a9
28 changed files with 132 additions and 229 deletions

View File

@@ -67,8 +67,6 @@ type msgState struct {
Attributes map[string]any `json:"attributes"`
}
/* Methods */
func NewEntityListener() elBuilder1 {
return elBuilder1{EntityListener{
lastRan: carbon.Now().StartOfCentury(),
@@ -154,10 +152,8 @@ func (b elBuilder3) RunOnStartup() elBuilder3 {
return b
}
/*
Enable this listener only when the current state of {entityId} matches {state}.
If there is a network error while retrieving state, the listener runs if {runOnNetworkError} is true.
*/
// EnabledWhen enables this listener only when the current state of {entityId} matches {state}.
// If there is a network error while retrieving state, the listener runs if {runOnNetworkError} is true.
func (b elBuilder3) EnabledWhen(entityId, state string, runOnNetworkError bool) elBuilder3 {
if entityId == "" {
panic(fmt.Sprintf("entityId is empty in EnabledWhen entityId='%s' state='%s'", entityId, state))
@@ -171,10 +167,8 @@ func (b elBuilder3) EnabledWhen(entityId, state string, runOnNetworkError bool)
return b
}
/*
Disable this listener when the current state of {entityId} matches {state}.
If there is a network error while retrieving state, the listener runs if {runOnNetworkError} is true.
*/
// DisabledWhen disables this listener when the current state of {entityId} matches {state}.
// If there is a network error while retrieving state, the listener runs if {runOnNetworkError} is true.
func (b elBuilder3) DisabledWhen(entityId, state string, runOnNetworkError bool) elBuilder3 {
if entityId == "" {
panic(fmt.Sprintf("entityId is empty in EnabledWhen entityId='%s' state='%s'", entityId, state))