Block: Map ​
Type: math_map

Transform sensor readings and data values by scaling them from one number range to another. Essential for IoT projects that need to convert raw sensor data (like 0-1023 from Arduino analog pins) into meaningful units (like 0-100% humidity), or translate between different measurement systems. Perfect for normalizing data, creating percentage values, or adapting sensor outputs to match your specific needs.
Inputs ​
Value ​
The raw number you want to convert to a different scale. Examples: sensor reading of 512 (from 0-1023 analog range), temperature of 25°C (for Fahrenheit conversion), or any numerical data that needs scaling to a new range.
Compatible Blocks (click to expand)
Get Variable
Retrieve the value stored in a variable that was previously set using a Set Variable block.
Multiline Text
Create formatted text content with multiple lines, paragraphs, and line breaks.
Text
Enter any text content for use in your Actions - words, phrases, device commands, or messages.
Text Template
Create dynamic, personalized messages by combining static text with live data from your IoT system.
Join Text
Join two pieces of text into one combined string.
Text Compare
Compare two text values using different comparison operations.

Weather
Fetch the current or forecast weather conditions at the specified location.

Air Quality
Fetch current or forecast air quality conditions at the specified location using Open-Meteo Air Quality API.
Round/Floor/Ceiling
Convert decimal numbers to whole numbers using different rounding strategies.
Number
Enter any numerical value for use in your IoT Actions - whole numbers, decimals, positive, or negative.

Map
Transform sensor readings and data values by scaling them from one number range to another.

Constrain
Keep any number within specified minimum and maximum boundaries.
Compare Numbers
Build mathematical conditions by comparing any two numerical values in your Action logic.
Arithmetic
Perform mathematical calculations using sensor data, feed values, or any numbers in your Actions.

Logic Operation
Combine multiple conditions to create sophisticated decision logic in your Actions.
Negate
Flip any condition to its opposite - turns true into false and false into true.
Boolean
A simple true or false value for building logic conditions and controlling digital outputs.
Get Feed Value
Resolves to the last value of this feed or component, always a String.

JSONPath Query
Extract specific values from JSON data using JSONPath query syntax.
From_range ​
The original scale that your input value currently represents. Examples: (0,1023) for Arduino analog sensors, (0,255) for RGB color values, (-40,125) for temperature sensor ranges, or (0,100) for percentage data that needs different scaling.
Compatible Blocks (click to expand)
To_range ​
The new scale you want to convert your value to. Examples: (0,100) for percentage displays, (0.0,1.0) for normalized values, (32,212) for Fahrenheit conversion, or any target range that matches your display needs or system requirements.