Skip to content

Commit

Permalink
Revert "Support Z-Wave JS dimming lights using color intensity (#122639
Browse files Browse the repository at this point in the history
…)" (#127256)

This reverts commit c7cfd56.
  • Loading branch information
MartinHjelmare authored Oct 2, 2024
1 parent 40dbfab commit e3e68da
Show file tree
Hide file tree
Showing 3 changed files with 285 additions and 669 deletions.
55 changes: 28 additions & 27 deletions homeassistant/components/zwave_js/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,6 @@ class ZWaveDiscoverySchema:
command_class={CommandClass.SWITCH_BINARY}, property={CURRENT_VALUE_PROPERTY}
)

COLOR_SWITCH_CURRENT_VALUE_SCHEMA = ZWaveValueDiscoverySchema(
command_class={CommandClass.SWITCH_COLOR},
property={CURRENT_COLOR_PROPERTY},
property_key={None},
)

SIREN_TONE_SCHEMA = ZWaveValueDiscoverySchema(
command_class={CommandClass.SOUND_SWITCH},
property={TONE_ID_PROPERTY},
Expand Down Expand Up @@ -768,6 +762,33 @@ class ZWaveDiscoverySchema:
},
),
),
# HomeSeer HSM-200 v1
ZWaveDiscoverySchema(
platform=Platform.LIGHT,
hint="black_is_off",
manufacturer_id={0x001E},
product_id={0x0001},
product_type={0x0004},
primary_value=ZWaveValueDiscoverySchema(
command_class={CommandClass.SWITCH_COLOR},
property={CURRENT_COLOR_PROPERTY},
property_key={None},
),
absent_values=[SWITCH_MULTILEVEL_CURRENT_VALUE_SCHEMA],
),
# Logic Group ZDB5100
ZWaveDiscoverySchema(
platform=Platform.LIGHT,
hint="black_is_off",
manufacturer_id={0x0234},
product_id={0x0121},
product_type={0x0003},
primary_value=ZWaveValueDiscoverySchema(
command_class={CommandClass.SWITCH_COLOR},
property={CURRENT_COLOR_PROPERTY},
property_key={None},
),
),
# ====== START OF GENERIC MAPPING SCHEMAS =======
# locks
# Door Lock CC
Expand Down Expand Up @@ -969,11 +990,10 @@ class ZWaveDiscoverySchema:
),
entity_category=EntityCategory.CONFIG,
),
# binary switches without color support
# binary switches
ZWaveDiscoverySchema(
platform=Platform.SWITCH,
primary_value=SWITCH_BINARY_CURRENT_VALUE_SCHEMA,
absent_values=[COLOR_SWITCH_CURRENT_VALUE_SCHEMA],
),
# switch for Indicator CC
ZWaveDiscoverySchema(
Expand Down Expand Up @@ -1067,25 +1087,6 @@ class ZWaveDiscoverySchema:
# catch any device with multilevel CC as light
# NOTE: keep this at the bottom of the discovery scheme,
# to handle all others that need the multilevel CC first
#
# Colored light (legacy device) that can only be controlled through Color Switch CC.
ZWaveDiscoverySchema(
platform=Platform.LIGHT,
hint="color_onoff",
primary_value=COLOR_SWITCH_CURRENT_VALUE_SCHEMA,
absent_values=[
SWITCH_BINARY_CURRENT_VALUE_SCHEMA,
SWITCH_MULTILEVEL_CURRENT_VALUE_SCHEMA,
],
),
# Colored light that can be turned on or off with the Binary Switch CC.
ZWaveDiscoverySchema(
platform=Platform.LIGHT,
hint="color_onoff",
primary_value=SWITCH_BINARY_CURRENT_VALUE_SCHEMA,
required_values=[COLOR_SWITCH_CURRENT_VALUE_SCHEMA],
),
# Dimmable light with or without color support.
ZWaveDiscoverySchema(
platform=Platform.LIGHT,
primary_value=SWITCH_MULTILEVEL_CURRENT_VALUE_SCHEMA,
Expand Down
Loading

0 comments on commit e3e68da

Please sign in to comment.