SmartHomeShop Docs

Usage

WallSense reports to Home Assistant all day without you having to do anything. This page shows what it does in daily use and how to build on it with automations.

Note: This page describes the current firmware, a WiFi test build. Names and behavior can change until release.

In Daily Use

  • Presence: Occupancy is on when either radar sees someone, also when you sit still.
  • Position: the LD2450 tracks up to three people with X/Y coordinates. The LD2412 does not report a position.
  • Air quality: CO2, VOC, NOx, temperature and humidity show how the air in the room develops.
  • Light: Illuminance shows the ambient light in lux, so lights can switch on only when the room is dark enough.
  • Touch: the front works as a touch surface. See Touch Control.
  • LEDs: the rear LEDs are off until you use them. See LED Lighting.

Key Entities

Entity Use for
Occupancy Room occupied or empty, the best choice for most automations
LD2412 Moving Target, LD2412 Still Target Telling movement from sitting still
LD2450 Target Count Number of people tracked, up to 3
LD2450 Target 1 X, LD2450 Target 1 Y Position of target 1, targets 2 and 3 work the same way
SCD41 CO2 Ventilation
SHT45 Temperature, SHT45 Humidity Climate, heating and ventilation. The SHT45 is the primary climate sensor
SGP41 VOC Index, SGP41 NOx Index Air-quality trends. These are index values, not ppm
Illuminance Light automations
Touch Button Your own touch actions
Rear LED Effects Color, brightness and effects of the rear LEDs

Sensor Definitions lists every entity.

Automation Examples

Paste these into the YAML editor of a new automation. The examples use wallsense as the device name. Entity IDs can differ per installation, so check yours on the device page in Home Assistant. Thresholds are examples, so choose values that suit your room.

Light On When Occupied and Dark

alias: "Living room: light on when occupied and dark"
triggers:
  - trigger: state
    entity_id: binary_sensor.wallsense_occupancy
    to: "on"
conditions:
  - condition: numeric_state
    entity_id: sensor.wallsense_illuminance
    below: 100
actions:
  - action: light.turn_on
    target:
      entity_id: light.living_room

Light Off When the Room Is Empty

alias: "Living room: light off when empty"
triggers:
  - trigger: state
    entity_id: binary_sensor.wallsense_occupancy
    to: "off"
    for:
      minutes: 5
actions:
  - action: light.turn_off
    target:
      entity_id: light.living_room

Ventilation on High CO2

alias: "Living room: ventilate on high CO2"
triggers:
  - trigger: numeric_state
    entity_id: sensor.wallsense_scd41_co2
    above: 1000
    for:
      minutes: 5
actions:
  - action: fan.turn_on
    target:
      entity_id: fan.ventilation

LED Notification on High CO2

alias: "Living room: rear LEDs red on high CO2"
triggers:
  - trigger: numeric_state
    entity_id: sensor.wallsense_scd41_co2
    above: 1000
    for:
      minutes: 5
actions:
  - action: light.turn_on
    target:
      entity_id: light.wallsense_rear_led_effects
    data:
      effect: "None"
      rgb_color: [255, 0, 0]
      brightness_pct: 30

LED Lighting has more examples, including how to switch the LEDs off again.

Touch as a Light Switch

alias: "Living room: touch toggles the light"
triggers:
  - trigger: state
    entity_id: binary_sensor.wallsense_touch_button
    from: "off"
    to: "on"
actions:
  - action: light.toggle
    target:
      entity_id: light.living_room

A press also triggers the built-in LED action in the current firmware. See Touch Control.

Zone Around the Sofa

The current firmware has no zone entities yet. Radar zones and the Room Designer will follow. Until then you can build a zone in Home Assistant from the position of the LD2450 targets.

Walk through the room and read LD2450 Target 1 X and LD2450 Target 1 Y to find the edges of your zone. Y is the distance into the room and X is the distance to the left or right, both in millimeters. Check for yourself which side is positive. Then add a template binary sensor to configuration.yaml:

template:
  - binary_sensor:
      - name: "Sofa zone"
        device_class: occupancy
        delay_off: "00:00:10"
        state: >
          {% set ns = namespace(hit=false) %}
          {% for n in [1, 2, 3] %}
            {% set x = states('sensor.wallsense_ld2450_target_' ~ n ~ '_x') | float(none) %}
            {% set y = states('sensor.wallsense_ld2450_target_' ~ n ~ '_y') | float(none) %}
            {% if x is not none and y is not none and -1500 <= x <= 500 and 1000 <= y <= 3000 %}
              {% set ns.hit = true %}
            {% endif %}
          {% endfor %}
          {{ ns.hit }}

The target entities are unknown when a target is gone, so the template skips them. Use the new sensor in an automation like any other:

alias: "Sofa: reading lamp on"
triggers:
  - trigger: state
    entity_id: binary_sensor.sofa_zone
    to: "on"
actions:
  - action: light.turn_on
    target:
      entity_id: light.reading_lamp

Dashboard Ideas

  • Occupancy with LD2450 Target Count.
  • CO2 gauge with green, yellow and red ranges.
  • History graph of SHT45 Temperature and SHT45 Humidity.
  • Tiles for SGP41 VOC Index and SGP41 NOx Index.
  • A light tile for Rear LED Effects.

Related