Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.zwave_js.config_validation Namespace Reference

Functions

bool boolean (Any value)
 

Variables

 BITMASK_SCHEMA
 
 VALUE_SCHEMA
 

Detailed Description

Config validation for the Z-Wave JS integration.

Function Documentation

◆ boolean()

bool homeassistant.components.zwave_js.config_validation.boolean ( Any  value)
Validate and coerce a boolean value.

Definition at line 22 of file config_validation.py.

Variable Documentation

◆ BITMASK_SCHEMA

homeassistant.components.zwave_js.config_validation.BITMASK_SCHEMA
Initial value:
1 = vol.All(
2  cv.string,
3  vol.Lower,
4  vol.Match(
5  r"^(0x)?[0-9a-f]+$",
6  msg="Must provide an integer (e.g. 255) or a bitmask in hex form (e.g. 0xff)",
7  ),
8  lambda value: int(value, 16),
9 )

Definition at line 11 of file config_validation.py.

◆ VALUE_SCHEMA

homeassistant.components.zwave_js.config_validation.VALUE_SCHEMA
Initial value:
1 = vol.Any(
2  boolean,
3  float,
4  int,
5  vol.Coerce(int),
6  vol.Coerce(float),
7  BITMASK_SCHEMA,
8  cv.string,
9  dict,
10 )

Definition at line 35 of file config_validation.py.