Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[blockly] change help urls to official OH blockly rules docs #1337

Merged
merged 2 commits into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function (f7, sinks, voices) {
this.setNextStatement(true, null)
this.setColour(0)
this.setTooltip('Plays a sound file from the sounds folder to the given sink.')
this.setHelpUrl('https://www.openhab.org/docs/configuration/multimedia.html')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-voice-and-multimedia.html#play-audio')
}
}

Expand Down Expand Up @@ -82,7 +82,7 @@ export default function (f7, sinks, voices) {
this.setNextStatement(true, null)
this.setColour(0)
this.setTooltip('Plays a sound file from the sounds folder to the given sink at a given volume. \n Note: rather set volume first via thing volume channel, then play sound without volume parameter as it may be more reliable.')
this.setHelpUrl('https://www.openhab.org/docs/configuration/multimedia.html')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-voice-and-multimedia.html#play-audio-with-volume')
}
}

Expand Down Expand Up @@ -118,7 +118,7 @@ export default function (f7, sinks, voices) {
this.setNextStatement(true, null)
this.setColour(0)
this.setTooltip('plays an audio stream from an url to the given sink(s)')
this.setHelpUrl('https://www.openhab.org/docs/configuration/multimedia.html')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-voice-and-multimedia.html#play-stream')
}
}

Expand Down Expand Up @@ -148,7 +148,7 @@ export default function (f7, sinks, voices) {
this.setNextStatement(true, null)
this.setColour(0)
this.setTooltip('stops the audio stream at the given sink')
this.setHelpUrl('https://www.openhab.org/docs/configuration/multimedia.html')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-voice-and-multimedia.html#stop-stream')
}
}

Expand Down Expand Up @@ -183,7 +183,7 @@ export default function (f7, sinks, voices) {
this.setNextStatement(true, null)
this.setColour(0)
this.setTooltip('Speak text at the given device via text-to-speech')
this.setHelpUrl('https://www.openhab.org/addons/voice/googletts/')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-voice-and-multimedia.html#say')
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function (f7) {
this.setOutput(true, 'String')
this.setColour('%{BKY_COLOUR_HUE}')
this.setTooltip('converts a colour\'s hex rgb representation to openHAB\'s hue-saturation-brightness string')
this.setHelpUrl('https://www.openhab.org/docs/configuration/items.html#state')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-standard-ext.html#create-hsb-color-from-rgb-color-openhab')
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function (f7) {
this.setOutput(true, 'DayOffset')
this.setColour(70)
this.setTooltip('today\'s date for ephemeris check block')
this.setHelpUrl('https://www.openhab.org/docs/configuration/actions.html#ephemeris')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-date-handling.html#today')
}
}

Expand All @@ -42,7 +42,7 @@ export default function (f7) {
this.setOutput(true, 'DayOffset')
this.setColour(70)
this.setTooltip('today with a positive or negative day offset for ephemeris check block')
this.setHelpUrl('https://www.openhab.org/docs/configuration/actions.html#ephemeris')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-date-handling.html#today-x-days')
}
}

Expand Down Expand Up @@ -76,7 +76,7 @@ export default function (f7) {
this.setOutput(true, 'ZonedDateTime')
this.setColour(70)
this.setTooltip('today with a positive or negative day offset for ephemeris check block')
this.setHelpUrl('https://www.openhab.org/docs/configuration/actions.html#ephemeris')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-date-handling.html#get-date-now-with-offset')
}
}

Expand Down Expand Up @@ -106,7 +106,7 @@ export default function (f7) {
this.setOutput(true, 'ZonedDateTime')
this.setColour(70)
this.setTooltip('Calender entry for ephemeris check block or other openHAB Blocks that require a day or date input in the format yyyy-MM-dd')
this.setHelpUrl('https://www.openhab.org/docs/configuration/actions.html#ephemeris')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-date-handling.html#date-picker')
}
}

Expand Down Expand Up @@ -134,7 +134,7 @@ export default function (f7) {
this.setOutput(true, 'ZonedDateTime')
this.setColour(70)
this.setTooltip('Calender entry as format yyyy-MM-dd or yyyy-MM-dd HH:mm:ss or yyyy-MM-dd HH:mm:ss +HH:mm (ZonedDateTime)')
this.setHelpUrl('https://www.openhab.org/docs/configuration/actions.html#ephemeris')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-date-handling.html#get-date')
}
}

Expand Down Expand Up @@ -164,7 +164,7 @@ export default function (f7) {
this.setOutput(true, 'String')
this.setColour(160)
this.setTooltip('converts an ZonedDateTime into a date string')
this.setHelpUrl('https://www.openhab.org/docs/configuration/actions.html#ephemeris')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-date-handling.html#get-string-representation-of-date')
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default function (f7) {
this.updateShape_()
this.setOutput(true, 'Dictionary')
this.setMutator(new Blockly.Mutator(['dicts_create_with_item']))
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-standard-ext.html#dictionary-for-managing-key-value-pairs')
this.setTooltip('Create a key/value dictionary')
},
/**
Expand Down Expand Up @@ -187,6 +188,7 @@ export default function (f7) {
.setCheck('String')
this.setInputsInline(true)
this.setOutput(true, 'String')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-standard-ext.html#get-value-of-key-from-dictionary')
this.setTooltip('Retrieve a specified attribute from the context that could be set from a calling rule or script')
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function (f7) {
this.setInputsInline(true)
this.setTooltip('checks if the given day is a holiday, weekend or weekday')
this.setOutput(true, null)
this.setHelpUrl('https://www.openhab.org/docs/configuration/actions.html#ephemeris')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-ephemeris.html#holiday-weekend-or-weekday-check')
}
}

Expand Down Expand Up @@ -72,7 +72,7 @@ export default function (f7) {
this.setInputsInline(true)
this.setTooltip('name of the holiday for the given day')
this.setOutput(true, null)
this.setHelpUrl('https://www.openhab.org/docs/configuration/actions.html#ephemeris')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-ephemeris.html#get-the-holiday-name-for-a-particular-date')
}
}

Expand Down Expand Up @@ -100,7 +100,7 @@ export default function (f7) {
this.setInputsInline(true)
this.setTooltip('days from today until the given bank holiday name')
this.setOutput(true, null)
this.setHelpUrl('https://www.openhab.org/docs/configuration/actions.html#ephemeris')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-ephemeris.html#get-the-number-of-days-until-a-specific-holiday')
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function (f7) {
this.setNextStatement(true, null)
this.setColour(0)
this.setTooltip('Send a command to an item')
this.setHelpUrl('https://www.openhab.org/docs/configuration/actions.html#event-bus-actions')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-items-things.html#send-command')
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function (f7) {
this.setColour(160)
this.setInputsInline(true)
this.setTooltip('Pick an item from the Model')
this.setHelpUrl('https://www.openhab.org/docs/configuration/items.html')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-items-things.html#item')
this.setOutput(true, null)
}
}
Expand All @@ -37,7 +37,7 @@ export default function (f7) {
this.setOutput(true, 'Array')
this.setColour(0)
this.setTooltip('Retrieve the members of a group')
this.setHelpUrl('https://www.openhab.org/docs/configuration/items.html')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-items-things.html#get-members-of-group')
this.setOutput(true, null)
}
}
Expand All @@ -57,7 +57,7 @@ export default function (f7) {
this.setOutput(true, 'oh_itemtype')
this.setColour(0)
this.setTooltip('Get an item from the item registry')
this.setHelpUrl('https://www.openhab.org/docs/configuration/items.html')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-items-things.html#get-item')
}
}

Expand All @@ -77,7 +77,7 @@ export default function (f7) {
this.setOutput(true, 'String')
this.setColour(0)
this.setTooltip('Get an item state from the item registry')
this.setHelpUrl('https://www.openhab.org/docs/configuration/items.html#state')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-items-things.html#get-state-of-item')
}
}

Expand Down Expand Up @@ -115,7 +115,7 @@ export default function (f7) {
this.setOutput(true, 'String')
this.setColour(0)
this.setTooltip('Retrieve a specific attribute from the item. Note that groups and tags return a list and should be used with the loops-block \'for each item ... in list\'. ')
this.setHelpUrl('https://www.openhab.org/docs/configuration/items.html')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-items-things.html#get-particular-attributes-of-an-item')
},
/**
* Modify this block to have the correct output type based on the attribute.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function (f7) {
this.setNextStatement(true, null)
this.setColour(0)
this.setTooltip('Print a message on the console')
this.setHelpUrl('https://www.openhab.org/docs/administration/logging.html')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-logging.html#print-statement')
}
}

Expand All @@ -33,7 +33,7 @@ export default function (f7) {
this.setNextStatement(true, null)
this.setColour(0)
this.setTooltip('Write a message in the openHAB log')
this.setHelpUrl('https://www.openhab.org/docs/administration/logging.html')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-logging.html#log-statement')
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function defineOHBlocks_Notifications (f7) {
this.setInputsInline(false)
this.setColour(0)
this.setTooltip('Send a notification message to a specific openhab user')
this.setHelpUrl('https://www.openhab.org/docs/configuration/actions.html#cloud-notification-actions')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-notifications.html#send-notification-to-specific-cloud-email-user')
}
}

Expand All @@ -43,7 +43,7 @@ export default function defineOHBlocks_Notifications (f7) {
this.setInputsInline(false)
this.setColour(0)
this.setTooltip('send a notification to all clients. Provide icon name without prefix')
this.setHelpUrl('https://www.openhab.org/docs/configuration/actions.html#cloud-notification-actions')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-notifications.html#send-notification-to-all-devices-and-users')
}
}

Expand Down Expand Up @@ -71,7 +71,7 @@ export default function defineOHBlocks_Notifications (f7) {
this.setInputsInline(false)
this.setColour(0)
this.setTooltip('Sends a notification to the log only not to any device')
this.setHelpUrl('https://www.openhab.org/docs/configuration/actions.html#cloud-notification-actions')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-notifications.html#send-notification-to-log-only')
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function defineOHBlocks_Persistence (f7) {
}
return TIP[methodName]
})
this.setHelpUrl('https://www.openhab.org/docs/configuration/persistence.html')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-persistence.html#get-statistical-value-of-an-item')
}
}

Expand Down Expand Up @@ -97,7 +97,7 @@ export default function defineOHBlocks_Persistence (f7) {
return TIP[methodName]
})

this.setHelpUrl('https://www.openhab.org/docs/configuration/persistence.html')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-persistence.html#check-item-change-update-since-a-point-in-time')
}
}

Expand Down Expand Up @@ -129,7 +129,7 @@ export default function defineOHBlocks_Persistence (f7) {
this.setOutput(true, 'ZonedDateTime')
this.setColour(0)
this.setTooltip('Get the last update time of the provided item')
this.setHelpUrl('https://www.openhab.org/docs/configuration/persistence.html')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-persistence.html#provide-last-updated-date-of-an-item')
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function defineOHBlocks_Scripts (f7, scripts) {
this.setNextStatement(true, null)
this.setColour(0)
this.setTooltip('Calls a script file which must be located in the $OPENHAB_CONF/scripts folder')
this.setHelpUrl('https://www.openhab.org/docs/configuration/actions.html#openhab-subsystem-actions')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-run-and-process.html#call-script-file')
}
}

Expand Down Expand Up @@ -57,7 +57,7 @@ export default function defineOHBlocks_Scripts (f7, scripts) {
this.setNextStatement(true, null)
this.setColour(0)
this.setTooltip('Run a rule or script with a certain UID, and optional parameters')
// this.setHelpUrl('') // TODO provide a openhab documentation URL
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-run-and-process.html#run-rule-or-script-created-in-ui')
}
}

Expand Down Expand Up @@ -182,7 +182,7 @@ export default function defineOHBlocks_Scripts (f7, scripts) {
}
return TIP[contextData]
})
this.setHelpUrl('https://www.openhab.org/docs/developer/utils/events.html')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-run-and-process.html#retrieve-rule-context-information')
}
}

Expand All @@ -204,6 +204,7 @@ export default function defineOHBlocks_Scripts (f7, scripts) {
this.setInputsInline(false)
this.setOutput(true, 'any')
this.setColour(0)
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-run-and-process.html#retrieve-context-attribute-from-rule')
this.setTooltip('Retrieve a specified attribute from the context that could be set from a calling rule or script')
}
}
Expand Down Expand Up @@ -232,6 +233,7 @@ export default function defineOHBlocks_Scripts (f7, scripts) {
this.setPreviousStatement(true, null)
this.setNextStatement(true, null)
this.setColour(0)
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-run-and-process.html#inline-script')
this.setTooltip('Allows inlining arbitrary script code which has to be syntactically correct')
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function defineOHBlocks (f7) {
this.setColour(160)
this.setInputsInline(true)
this.setTooltip('Pick a thing from the Thing List')
this.setHelpUrl('https://www.openhab.org/docs/concepts/things.html')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-items-things.html#thing')
this.setOutput(true, null)
}
}
Expand All @@ -35,7 +35,7 @@ export default function defineOHBlocks (f7) {
this.setOutput(true, 'String')
this.setColour(0)
this.setTooltip('Gets status information of the given thing, e.g. if the thing is online')
this.setHelpUrl('https://www.openhab.org/docs/concepts/things.html#thing-status')
this.setHelpUrl('https://www.openhab.org/docs/configuration/blockly/rules-blockly-items-things.html#get-thing-status')
}
}

Expand Down
Loading