node-red-contrib-home-assistant-websocketnode-red-contrib-home-assistant-websocket
Guides
Nodes
FAQ
Cookbook
Scrubber
Discussions
Discord
Github
Guides
Nodes
FAQ
Cookbook
Scrubber
Discussions
Discord
Github
  • Config Nodes

    • Device Config
    • Entity Config
    • Server Config
  • General Nodes

    • Action
    • API
    • Current State
    • Device
    • Events: all
    • Events: calendar
    • Events: state
    • Fire Event
    • Get Entities
    • Get History
    • Poll State
    • Render Template
    • Sentence
    • Tag
    • Time
    • Trigger: state
    • Wait Until
    • Webhook
    • Zone
  • Entity Nodes

    • Binary Sensor
    • Button
    • Entity
    • Number
    • Select
    • Sensor
    • Switch
    • Text
    • Time
    • Update Config

Poll State

The Poll State node outputs the state of an entity at regular intervals. It can also be configured to trigger at startup and whenever the entity changes state, if desired. This node is useful for regularly checking the status of an entity, ensuring your automations stay up to date with the latest information.

Configuration

Entity ID required

The entity id of the entity to poll for.

Update Interval

  • Type: number

The amount of time between checking/sending updates.

If State

  • Type: string

If the conditional statement is evaluated as true send the message to the first output otherwise send it to the second output. If blank there will only be one output.

Also see:

  • Conditionals

State Type

  • Type: string

Convert the state of the entity to the selected type. Boolean will be converted to true based on if the string is equal by default to (y|yes|true|on|home|open). Original value stored in msg.data.original_state

Output Initially

  • Type: boolean

Output once on startup/deploy then on each interval

Expose to Home Assistant

  • Type: boolean

Creates a switch within Home Assistant to enable/disable this node. This feature requires Node-RED custom integration to be installed in Home Assistant

Outputs

topic

  • Type: string

entity_id of changed entity

payload

  • Type: object

The last known state of the entity

data.timeSinceChanged

  • Type: string

Human readable format string of time since last updated, example "1 hour ago"

data.timeSinceChangedMs

  • Type: number

Number of milliseconds since last changed

References

  • Home Assistant State Objects
Help us improve this page!
Last Updated:
Contributors: Jason
Prev
Get History
Next
Render Template