Skip to content

Commit

Permalink
Clean up YAML schema deprecations (#2281)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Sep 19, 2022
1 parent 71c14c7 commit 0249994
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 224 deletions.
14 changes: 0 additions & 14 deletions src/language-service/src/schemas/integrations/conditions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Source: https://github.com/home-assistant/core/blob/dev/homeassistant/helpers/config_validation.py
*/
import {
Deprecated,
DeviceTrackerEntities,
DynamicTemplate,
Entities,
Expand Down Expand Up @@ -301,12 +300,6 @@ export interface StateCondition {
*/
for?: TimePeriod | Template;

/**
* DEPRECATED
* This option has no effect, please remove it.
*/
from?: Deprecated;

/**
* Use the value of a specific entity attribute to test against, instead of the entity state.
* https://www.home-assistant.io/docs/scripts/conditions/#state-condition
Expand Down Expand Up @@ -477,13 +470,6 @@ export interface ZoneCondition {
*/
entity_id: DeviceTrackerEntities | PersonEntities;

/**
* DEPRECATED.
*
* This option has been deprecated, please remove it from your configuration.
*/
event?: Deprecated;

/**
* The zone(s) conditionally check against for the given device tracker(s).
* https://www.home-assistant.io/docs/scripts/conditions/#zone-condition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
import {
Data,
Deprecated,
DynamicTemplate,
IncludeList,
PositiveInteger,
Expand Down Expand Up @@ -41,12 +40,6 @@ interface BaseItem {
*/
description?: string;

/**
* DEPRECATED since Home Assistant 0.112.
* This option has no effect. Please remove it from your configuration.
*/
hide_entity?: Deprecated;

/**
* When you create a new automation, it will be enabled unless you explicitly add initial_state: false to it or turn it off manually via UI/another automation/developer tools.
* In case automations need to be always enabled or disabled when Home Assistant starts, then you can set the initial_state in your automations. Otherwise, the previous state will be restored.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { ConfigurationRoot } from "../../configuration";

import {
Currency,
Deprecated,
DeviceClasses,
IncludeNamed,
Integer,
Expand Down Expand Up @@ -132,12 +131,6 @@ export interface Schema {
* https://www.home-assistant.io/docs/configuration/basic/#temperature_unit
*/
temperature_unit?: TemperatureUnit;

/**
* DEPRECATED as of Home Assistant 0.113.0.
* Replace it with "allowlist_external_dirs".
*/
whitelist_external_dirs?: Deprecated;
}

interface CoreCustomize {
Expand Down
66 changes: 0 additions & 66 deletions src/language-service/src/schemas/integrations/core/knx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Source: https://github.com/home-assistant/core/blob/dev/homeassistant/components/knx/__init__.py
*/
import {
Deprecated,
DeviceClassesBinarySensor,
DeviceClassesCover,
Entity,
Expand Down Expand Up @@ -207,11 +206,6 @@ export interface Schema {
*/
event?: Event[];

/**
* DEPRECATED as of Home Assistant 2021.12.0
*/
event_filter?: Deprecated;

/**
* KNX integration is able to expose entity states or attributes to KNX bus.
* https://www.home-assistant.io/integrations/knx#exposing-entity-states-entity-attributes-or-time-to-knx-bus
Expand All @@ -224,27 +218,12 @@ export interface Schema {
*/
fan?: Fan[];

/**
* DEPRECATED as of Home Assistant 2021.12.0
*/
individual_address?: Deprecated;

/**
* The KNX light integration is used as an interface to control KNX actuators for lighting applications.
* https://www.home-assistant.io/integrations/knx#light
*/
light?: Light[];

/**
* DEPRECATED as of Home Assistant 2021.12.0
*/
multicast_group?: Deprecated;

/**
* DEPRECATED as of Home Assistant 2021.12.0
*/
multicast_port?: Deprecated;

/**
* The KNX notify platform allows you to send notifications to KNX devices as DPT16 strings.
* https://www.home-assistant.io/integrations/knx#notify
Expand All @@ -257,16 +236,6 @@ export interface Schema {
*/
number?: NumberEntity[];

/**
* DEPRECATED as of Home Assistant 2021.12.0
*/
rate_limit?: Deprecated;

/**
* DEPRECATED as of Home Assistant 2021.12.0
*/
routing?: Deprecated;

/**
* The KNX scenes platform allows you to trigger KNX scenes.
* https://www.home-assistant.io/integrations/knx#scene
Expand All @@ -285,22 +254,12 @@ export interface Schema {
*/
sensor?: Sensor[];

/**
* DEPRECATED as of Home Assistant 2021.12.0
*/
state_updater?: Deprecated;

/**
* The KNX switch platform is used as an interface to switching actuators.
* https://www.home-assistant.io/integrations/knx#switch
*/
switch?: Switch[];

/**
* DEPRECATED as of Home Assistant 2021.12.0
*/
tunneling?: Deprecated;

/**
* The KNX weather platform is used as an interface to KNX weather stations.
* https://www.home-assistant.io/integrations/knx#weather
Expand Down Expand Up @@ -359,16 +318,6 @@ interface BinarySensor {
* https://www.home-assistant.io/integrations/knx#sync_state
*/
sync_state?: boolean | string;

/**
* DEPRECATED
*/
automation?: Deprecated;

/**
* DEPRECATED
*/
significant_bit?: Deprecated;
}

interface Button {
Expand Down Expand Up @@ -631,16 +580,6 @@ interface Climate {
* @maximum 2
*/
temperature_step?: number;

/**
* DEPRECATED as of Home Assistant Core 2021.6
*/
create_temperature_sensors?: Deprecated;

/**
* DEPRECATED
*/
setpoint_shift_step?: Deprecated;
}

interface Cover {
Expand Down Expand Up @@ -1383,9 +1322,4 @@ interface Weather {
* https://www.home-assistant.io/integrations/knx#temperature_address
*/
address_temperature: GroupAddresses;

/**
* DEPRECATED as of Home Assistant 2021.6
*/
create_sensors?: Deprecated;
}
78 changes: 0 additions & 78 deletions src/language-service/src/schemas/integrations/core/mqtt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,6 @@ export interface Schema {
*/
tls_insecure?: boolean;

/**
* DEPRECATED as of Home Assistant 0.115.0.
* Please remove this option form your configuration.
*/
tls_version?: Deprecated;

/**
* The username to use with your MQTT broker.
* https://www.home-assistant.io/docs/mqtt/broker#username
Expand Down Expand Up @@ -1062,11 +1056,6 @@ export interface CoverItem extends BaseItem {
*/
tilt_command_topic?: string;

/**
* DEPRECATED as of Home Assistant 2021.3.0
*/
tilt_invert_state?: Deprecated;

/**
*The maximum tilt value.
* https://www.home-assistant.io/integrations/cover.mqtt/#tilt_max
Expand Down Expand Up @@ -1185,24 +1174,6 @@ export interface FanItem extends BaseItem {
*/
oscillation_value_template?: Template;

/**
* The payload that represents the fan’s high speed.
* https://www.home-assistant.io/integrations/fan.mqtt/#payload_high_speed
*/
payload_high_speed?: Deprecated;

/**
* The payload that represents the fan’s low speed.
* https://www.home-assistant.io/integrations/fan.mqtt/#payload_low_speed
*/
payload_low_speed?: Deprecated;

/**
* The payload that represents the fan’s medium speed.
* https://www.home-assistant.io/integrations/fan.mqtt/#payload_medium_speed
*/
payload_medium_speed?: Deprecated;

/**
* The payload that represents the stop state.
* https://www.home-assistant.io/integrations/fan.mqtt/#payload_off
Expand Down Expand Up @@ -1317,30 +1288,6 @@ export interface FanItem extends BaseItem {
*/
speed_range_max?: PositiveInteger;

/**
* The MQTT topic to publish commands to change speed state.
* https://www.home-assistant.io/integrations/fan.mqtt/#speed_command_topic
*/
speed_command_topic?: Deprecated;

/**
* The MQTT topic subscribed to receive speed state updates.
* https://www.home-assistant.io/integrations/fan.mqtt/#speed_state_topic
*/
speed_state_topic?: Deprecated;

/**
* Defines a template to extract a value from the speed payload.
* https://www.home-assistant.io/integrations/fan.mqtt/#speed_value_template
*/
speed_value_template?: Deprecated;

/**
* List of speeds this fan is capable of running at. Valid entries are off, low, medium and high.
* https://www.home-assistant.io/integrations/fan.mqtt/#speeds
*/
speeds?: Deprecated;

/**
* The MQTT topic subscribed to receive state updates.
* https://www.home-assistant.io/integrations/fan.mqtt/#state_topic
Expand Down Expand Up @@ -1571,26 +1518,6 @@ export interface LightDefaultItem extends BaseItem {
*/
white_scale?: Integer;

/**
* DEPRECATED
*/
white_value_command_topic?: Deprecated;

/**
* DEPRECATED
*/
white_value_scale?: Deprecated;

/**
* DEPRECATED
*/
white_value_state_topic?: Deprecated;

/**
* DEPRECATED
*/
white_value_template?: Deprecated;

/**
* The MQTT topic to publish commands to change the light’s XY state.
* https://www.home-assistant.io/integrations/light.mqtt/#xy_command_topic
Expand Down Expand Up @@ -1852,11 +1779,6 @@ export interface LightTemplateItem extends BaseItem {
* https://www.home-assistant.io/integrations/light.mqtt/#state_topic
*/
state_topic?: string;

/**
* DEPRECATED
*/
white_value_template?: Deprecated;
}

export interface LockItem extends BaseItem {
Expand Down
26 changes: 0 additions & 26 deletions src/language-service/src/schemas/integrations/core/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Source: https://github.com/home-assistant/core/blob/dev/homeassistant/components/template/
*/
import {
Deprecated,
DeviceClassesBinarySensor,
DeviceClassesCover,
DeviceClassesSensor,
Expand Down Expand Up @@ -621,11 +620,6 @@ interface BinarySensorPlatformItem {
*/
device_class?: DeviceClassesBinarySensor;

/**
* DEPRECATED as of Home Assistant 0.115.0
*/
entity_id?: Deprecated;

/**
* Defines a template for the entity picture of the sensor.
* https://www.home-assistant.io/integrations/binary_sensor.template#entity_picture_template
Expand Down Expand Up @@ -822,27 +816,12 @@ interface FanPlatformItem {
*/
set_preset_mode?: Action | Action[];

/**
* DEPRECATED as of Home Assistant 2021.3.0
*/
set_speed?: Deprecated;

/**
* The number of speeds the fan supports. Used to calculate the percentage step for the fan.increase_speed and fan.decrease_speed services.
* https://www.home-assistant.io/integrations/fan.template/#speed_count
*/
speed_count?: PositiveInteger;

/**
* DEPRECATED as of Home Assistant 2021.3.0
*/
speed_template?: Deprecated;

/**
* DEPRECATED as of Home Assistant 2021.3.0
*/
speeds?: Deprecated;

/**
* Defines an action to run when the fan is turned off.
* https://www.home-assistant.io/integrations/fan.template/#turn_off
Expand Down Expand Up @@ -1021,11 +1000,6 @@ interface SensorPlatformItem {
*/
device_class?: DeviceClassesSensor;

/**
* DEPRECATED as of Home Assistant 0.115.0
*/
entity_id?: Deprecated;

/**
* Defines a template for the entity picture of the sensor.
* https://www.home-assistant.io/integrations/binary_sensor.template#entity_picture_template
Expand Down
Loading

0 comments on commit 0249994

Please sign in to comment.