weather output, map nullcheck

This commit is contained in:
Loren Norman 2025-07-22 17:07:25 -04:00
parent 76e5324d14
commit 3d0dbe114f
2 changed files with 6 additions and 1 deletions

View file

@ -63,7 +63,7 @@ export default {
generators: { generators: {
json: (block, generator) => { json: (block, generator) => {
const const
value = JSON.parse(generator.valueToCode(block, 'VALUE', 0)), value = JSON.parse(generator.valueToCode(block, 'VALUE', 0) || null),
from = JSON.parse(generator.valueToCode(block, 'FROM_RANGE', 0)), from = JSON.parse(generator.valueToCode(block, 'FROM_RANGE', 0)),
to = JSON.parse(generator.valueToCode(block, 'TO_RANGE', 0)), to = JSON.parse(generator.valueToCode(block, 'TO_RANGE', 0)),
payload = { mapValue: { value, from, to }} payload = { mapValue: { value, from, to }}

View file

@ -9,6 +9,11 @@ export default {
ioPlus: true, ioPlus: true,
description: "Fetch the current or forecast weather conditions at the specified location.", description: "Fetch the current or forecast weather conditions at the specified location.",
connections: {
mode: "value",
output: "expression",
},
mixins: [ mixins: [
'replaceDropdownOptions', 'replaceDropdownOptions',
{ weatherMixin } { weatherMixin }