mirror of
https://github.com/adrianjagielak/home-assistant-futurehome.git
synced 2026-02-11 07:15:38 +00:00
Add support for 'chargepoint' service
This commit is contained in:
@@ -101,6 +101,12 @@ export interface AlarmControlPanelComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
@@ -119,7 +125,10 @@ export interface AlarmControlPanelComponent {
|
||||
|
||||
/**
|
||||
* The name of the alarm.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
* Default: "MQTT Alarm"
|
||||
*/
|
||||
name?: string | null;
|
||||
|
||||
@@ -41,7 +41,7 @@ export interface BinarySensorComponent {
|
||||
/**
|
||||
* Sets the [class of the device](https://www.home-assistant.io/integrations/binary_sensor/#device-class),
|
||||
* changing the device state and icon that is displayed on the frontend.
|
||||
* The `device_class` can be `null`.
|
||||
* The `device_class` defaults to `null`.
|
||||
*/
|
||||
device_class?: string | null;
|
||||
|
||||
@@ -98,7 +98,10 @@ export interface BinarySensorComponent {
|
||||
|
||||
/**
|
||||
* The name of the binary sensor.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
* Default: "MQTT binary sensor"
|
||||
*/
|
||||
name?: string | null;
|
||||
@@ -116,6 +119,12 @@ export interface BinarySensorComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
|
||||
@@ -50,9 +50,9 @@ export interface ButtonComponent {
|
||||
|
||||
/**
|
||||
* The [type/class](https://www.home-assistant.io/integrations/button/#device-class) of the button to set the icon in the frontend.
|
||||
* The `device_class` can be `null`.
|
||||
* The `device_class` defaults to `null` (generic button).
|
||||
*/
|
||||
device_class?: string | null;
|
||||
device_class?: 'identify' | 'restart' | 'update' | null;
|
||||
|
||||
/**
|
||||
* Flag which defines if the entity should be enabled when first added.
|
||||
@@ -68,6 +68,12 @@ export interface ButtonComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
@@ -86,7 +92,10 @@ export interface ButtonComponent {
|
||||
|
||||
/**
|
||||
* The name to use when displaying this button.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
* Default: "MQTT Button"
|
||||
*/
|
||||
name?: string | null;
|
||||
|
||||
@@ -53,6 +53,12 @@ export interface CameraComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
@@ -77,7 +83,10 @@ export interface CameraComponent {
|
||||
|
||||
/**
|
||||
* The name of the camera.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
*/
|
||||
name?: string | null;
|
||||
|
||||
|
||||
@@ -116,6 +116,12 @@ export interface ClimateComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
@@ -186,7 +192,10 @@ export interface ClimateComponent {
|
||||
|
||||
/**
|
||||
* The name of the HVAC.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
* Default: "MQTT HVAC"
|
||||
*/
|
||||
name?: string | null;
|
||||
@@ -197,7 +206,7 @@ export interface ClimateComponent {
|
||||
object_id?: string;
|
||||
|
||||
/**
|
||||
* Flag that defines if the climate works in optimistic mode.
|
||||
* Flag that defines if the climate works in optimistic mode (not waiting for state update before showing the change in Home Assistant).
|
||||
* Default: `true` if no state topic defined, else `false`.
|
||||
*/
|
||||
optimistic?: boolean;
|
||||
|
||||
@@ -40,7 +40,7 @@ export interface CoverComponent {
|
||||
/**
|
||||
* Sets the [class of the device](https://www.home-assistant.io/integrations/cover/#device_class),
|
||||
* changing the device state and icon that is displayed on the frontend.
|
||||
* The `device_class` can be `null` (generic cover).
|
||||
* The `device_class` defaults to `null` (generic cover).
|
||||
*/
|
||||
device_class?: CoverDeviceClass;
|
||||
|
||||
@@ -59,6 +59,12 @@ export interface CoverComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
@@ -77,7 +83,10 @@ export interface CoverComponent {
|
||||
|
||||
/**
|
||||
* The name of the cover.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
* Default: "MQTT Cover"
|
||||
*/
|
||||
name?: string | null;
|
||||
@@ -88,7 +97,7 @@ export interface CoverComponent {
|
||||
object_id?: string;
|
||||
|
||||
/**
|
||||
* Flag that defines if switch works in optimistic mode.
|
||||
* Flag that defines if switch works in optimistic mode (not waiting for state update before showing the change in Home Assistant).
|
||||
* Default: `false` if `state_topic` or `position_topic` defined, else `true`.
|
||||
*/
|
||||
optimistic?: boolean;
|
||||
@@ -255,7 +264,7 @@ export interface CoverComponent {
|
||||
tilt_opened_value?: number;
|
||||
|
||||
/**
|
||||
* Flag that determines if tilt works in optimistic mode.
|
||||
* Flag that determines if tilt works in optimistic mode (not waiting for state update before showing the change in Home Assistant).
|
||||
* Default: `true` if `tilt_status_topic` is not defined, else `false`.
|
||||
*/
|
||||
tilt_optimistic?: boolean;
|
||||
|
||||
@@ -124,6 +124,12 @@ export interface DeviceTrackerComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ export interface EventComponent {
|
||||
|
||||
/**
|
||||
* The [type/class](https://www.home-assistant.io/integrations/event/#device-class) of the event to set the icon in the frontend.
|
||||
* The `device_class` can be `null`.
|
||||
* The `device_class` defaults to `null`.
|
||||
*/
|
||||
device_class?: string | null;
|
||||
|
||||
|
||||
@@ -159,7 +159,10 @@ export interface FanComponent {
|
||||
|
||||
/**
|
||||
* The name of the fan.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
* Default: "MQTT Fan"
|
||||
*/
|
||||
name?: string | null;
|
||||
@@ -176,7 +179,7 @@ export interface FanComponent {
|
||||
enabled_by_default?: boolean;
|
||||
|
||||
/**
|
||||
* Flag that defines if fan works in optimistic mode.
|
||||
* Flag that defines if fan works in optimistic mode (not waiting for state update before showing the change in Home Assistant).
|
||||
* Default: `true` if no state topic defined, else `false`.
|
||||
*/
|
||||
optimistic?: boolean;
|
||||
@@ -195,6 +198,12 @@ export interface FanComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ export interface HumidifierComponent {
|
||||
action_topic?: string;
|
||||
|
||||
/**
|
||||
* Flag that defines if humidifier works in optimistic mode.
|
||||
* Flag that defines if humidifier works in optimistic mode (not waiting for state update before showing the change in Home Assistant).
|
||||
* Defaults to `true` if no state topic defined, else `false`.
|
||||
*/
|
||||
optimistic?: boolean;
|
||||
@@ -190,7 +190,10 @@ export interface HumidifierComponent {
|
||||
|
||||
/**
|
||||
* The name of the humidifier.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
* Default: `"MQTT humidifier"`
|
||||
*/
|
||||
name?: string | null;
|
||||
@@ -215,6 +218,12 @@ export interface HumidifierComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
|
||||
@@ -88,7 +88,10 @@ export interface ImageComponent {
|
||||
|
||||
/**
|
||||
* The name of the image.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
*/
|
||||
name?: string | null;
|
||||
|
||||
@@ -111,6 +114,12 @@ export interface ImageComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
}
|
||||
|
||||
@@ -72,6 +72,12 @@ export interface LawnMowerComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
@@ -89,7 +95,10 @@ export interface LawnMowerComponent {
|
||||
|
||||
/**
|
||||
* The name of the lawn mower.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
*/
|
||||
name?: string | null;
|
||||
|
||||
@@ -99,7 +108,7 @@ export interface LawnMowerComponent {
|
||||
object_id?: string;
|
||||
|
||||
/**
|
||||
* Flag that defines if the lawn mower works in optimistic mode.
|
||||
* Flag that defines if the lawn mower works in optimistic mode (not waiting for state update before showing the change in Home Assistant).
|
||||
* Default: `true` if no `activity_state_topic` defined, else `false`.
|
||||
*/
|
||||
optimistic?: boolean;
|
||||
|
||||
@@ -72,7 +72,7 @@ export interface LightComponent {
|
||||
brightness_value_template?: string;
|
||||
|
||||
/**
|
||||
* The flag that defines if the light works in optimistic mode.
|
||||
* The flag that defines if the light works in optimistic mode (not waiting for state update before showing the change in Home Assistant).
|
||||
* Optimistic mode means the light immediately changes state after command,
|
||||
* without waiting for confirmation from state topic.
|
||||
* Default: `true` if no state topic defined, else `false`.
|
||||
@@ -348,6 +348,12 @@ export interface LightComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
|
||||
@@ -72,6 +72,12 @@ export interface LockComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
@@ -90,7 +96,10 @@ export interface LockComponent {
|
||||
|
||||
/**
|
||||
* The name of the lock.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
* Default: "MQTT Lock"
|
||||
*/
|
||||
name?: string | null;
|
||||
@@ -101,7 +110,7 @@ export interface LockComponent {
|
||||
object_id?: string;
|
||||
|
||||
/**
|
||||
* Flag that defines if lock works in optimistic mode.
|
||||
* Flag that defines if lock works in optimistic mode (not waiting for state update before showing the change in Home Assistant).
|
||||
* Default: `true` if no `state_topic` defined, else `false`.
|
||||
*/
|
||||
optimistic?: boolean;
|
||||
|
||||
@@ -51,6 +51,12 @@ export interface NotifyComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
@@ -87,7 +93,10 @@ export interface NotifyComponent {
|
||||
|
||||
/**
|
||||
* The name to use when displaying this notify entity.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
* Default: "MQTT notify"
|
||||
*/
|
||||
name?: string | null;
|
||||
|
||||
@@ -86,8 +86,63 @@ export interface NumberComponent {
|
||||
|
||||
/**
|
||||
* The [type/class](https://www.home-assistant.io/integrations/number/#device-class) of the number. The `device_class` can be `null`.
|
||||
* The `device_class` defaults to `null` (generic number).
|
||||
*/
|
||||
device_class?: string | null;
|
||||
device_class?:
|
||||
| 'apparent_power'
|
||||
| 'aqi'
|
||||
| 'area'
|
||||
| 'atmospheric_pressure'
|
||||
| 'battery'
|
||||
| 'blood_glucose_concentration'
|
||||
| 'carbon_dioxide'
|
||||
| 'carbon_monoxide'
|
||||
| 'current'
|
||||
| 'data_rate'
|
||||
| 'data_size'
|
||||
| 'distance'
|
||||
| 'duration'
|
||||
| 'energy'
|
||||
| 'energy_distance'
|
||||
| 'energy_storage'
|
||||
| 'frequency'
|
||||
| 'gas'
|
||||
| 'humidity'
|
||||
| 'illuminance'
|
||||
| 'irradiance'
|
||||
| 'moisture'
|
||||
| 'monetary'
|
||||
| 'nitrogen_dioxide'
|
||||
| 'nitrogen_monoxide'
|
||||
| 'nitrous_oxide'
|
||||
| 'ozone'
|
||||
| 'ph'
|
||||
| 'pm1'
|
||||
| 'pm25'
|
||||
| 'pm10'
|
||||
| 'power_factor'
|
||||
| 'power'
|
||||
| 'precipitation'
|
||||
| 'precipitation_intensity'
|
||||
| 'pressure'
|
||||
| 'reactive_energy'
|
||||
| 'reactive_power'
|
||||
| 'signal_strength'
|
||||
| 'sound_pressure'
|
||||
| 'speed'
|
||||
| 'sulphur_dioxide'
|
||||
| 'temperature'
|
||||
| 'volatile_organic_compounds'
|
||||
| 'volatile_organic_compounds_parts'
|
||||
| 'voltage'
|
||||
| 'volume'
|
||||
| 'volume_flow_rate'
|
||||
| 'volume_storage'
|
||||
| 'water'
|
||||
| 'weight'
|
||||
| 'wind_direction'
|
||||
| 'wind_speed'
|
||||
| null;
|
||||
|
||||
/**
|
||||
* Flag which defines if the entity should be enabled when first added.
|
||||
@@ -104,6 +159,12 @@ export interface NumberComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
@@ -120,7 +181,7 @@ export interface NumberComponent {
|
||||
json_attributes_topic?: string;
|
||||
|
||||
/**
|
||||
* Flag that defines if number works in optimistic mode.
|
||||
* Flag that defines if number works in optimistic mode (not waiting for state update before showing the change in Home Assistant).
|
||||
* Default: `true` if no `state_topic` defined, else `false`.
|
||||
*/
|
||||
optimistic?: boolean;
|
||||
|
||||
@@ -50,7 +50,7 @@ export interface SelectComponent {
|
||||
options: string[];
|
||||
|
||||
/**
|
||||
* Flag that defines if the select works in optimistic mode.
|
||||
* Flag that defines if the select works in optimistic mode (not waiting for state update before showing the change in Home Assistant).
|
||||
* Default: `true` if no `state_topic` defined, else `false`.
|
||||
*/
|
||||
optimistic?: boolean;
|
||||
@@ -94,6 +94,12 @@ export interface SelectComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
|
||||
@@ -42,24 +42,91 @@ export interface SensorComponent {
|
||||
*
|
||||
* If a `value_template` is used to parse a JSON payload, a `null` value in the JSON
|
||||
* [will be rendered as](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) `'None'`.
|
||||
* Note that the `device_class` can be `null`.
|
||||
*/
|
||||
state_topic?: string;
|
||||
|
||||
/**
|
||||
* The [type/class](https://www.home-assistant.io/integrations/sensor/#device-class) of the sensor to set the icon in the frontend.
|
||||
* The `device_class` can be `null`.
|
||||
* The `device_class` defaults to `null` (generic sensor).
|
||||
*/
|
||||
device_class?: string | null;
|
||||
device_class?:
|
||||
| 'apparent_power'
|
||||
| 'aqi'
|
||||
| 'area'
|
||||
| 'atmospheric_pressure'
|
||||
| 'battery'
|
||||
| 'blood_glucose_concentration'
|
||||
| 'carbon_dioxide'
|
||||
| 'carbon_monoxide'
|
||||
| 'current'
|
||||
| 'data_rate'
|
||||
| 'data_size'
|
||||
| 'date'
|
||||
| 'distance'
|
||||
| 'duration'
|
||||
| 'energy'
|
||||
| 'energy_distance'
|
||||
| 'energy_storage'
|
||||
| 'enum'
|
||||
| 'frequency'
|
||||
| 'gas'
|
||||
| 'humidity'
|
||||
| 'illuminance'
|
||||
| 'irradiance'
|
||||
| 'moisture'
|
||||
| 'monetary'
|
||||
| 'nitrogen_dioxide'
|
||||
| 'nitrogen_monoxide'
|
||||
| 'nitrous_oxide'
|
||||
| 'ozone'
|
||||
| 'ph'
|
||||
| 'pm1'
|
||||
| 'pm25'
|
||||
| 'pm10'
|
||||
| 'power_factor'
|
||||
| 'power'
|
||||
| 'precipitation'
|
||||
| 'precipitation_intensity'
|
||||
| 'pressure'
|
||||
| 'reactive_energy'
|
||||
| 'reactive_power'
|
||||
| 'signal_strength'
|
||||
| 'sound_pressure'
|
||||
| 'speed'
|
||||
| 'sulphur_dioxide'
|
||||
| 'temperature'
|
||||
| 'timestamp'
|
||||
| 'volatile_organic_compounds'
|
||||
| 'volatile_organic_compounds_parts'
|
||||
| 'voltage'
|
||||
| 'volume'
|
||||
| 'volume_flow_rate'
|
||||
| 'volume_storage'
|
||||
| 'water'
|
||||
| 'weight'
|
||||
| 'wind_direction'
|
||||
| 'wind_speed'
|
||||
| null;
|
||||
|
||||
/**
|
||||
* The [state_class](https://developers.home-assistant.io/docs/core/entity/sensor#available-state-classes) of the sensor.
|
||||
* Defaults to 'measurement'.
|
||||
*
|
||||
* Possible values:
|
||||
* - `measurement` - The state represents a measurement in present time, such as current temperature or humidity.
|
||||
* - `measurement_angle` - Like `measurement`, but specifically for angles in degrees (°), e.g., wind direction.
|
||||
* - `total` - Represents a total amount that can both increase and decrease, e.g., a net energy meter.
|
||||
* - `total_increasing` - A monotonically increasing total that periodically resets to 0, e.g., daily water consumption.
|
||||
*/
|
||||
state_class?: string;
|
||||
state_class?:
|
||||
| 'measurement'
|
||||
| 'measurement_angle'
|
||||
| 'total'
|
||||
| 'total_increasing';
|
||||
|
||||
/**
|
||||
* Defines the units of measurement of the sensor, if any.
|
||||
* The `unit_of_measurement` can be `null`.
|
||||
* The `unit_of_measurement` defaults to `null`.
|
||||
*/
|
||||
unit_of_measurement?: string | null;
|
||||
|
||||
@@ -76,7 +143,10 @@ export interface SensorComponent {
|
||||
|
||||
/**
|
||||
* The name of the MQTT sensor.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
* Default: "MQTT Sensor"
|
||||
*/
|
||||
name?: string | null;
|
||||
@@ -107,6 +177,12 @@ export interface SensorComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
|
||||
@@ -63,6 +63,12 @@ export interface SirenComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
@@ -88,7 +94,7 @@ export interface SirenComponent {
|
||||
object_id?: string;
|
||||
|
||||
/**
|
||||
* Flag that defines if siren works in optimistic mode.
|
||||
* Flag that defines if siren works in optimistic mode (not waiting for state update before showing the change in Home Assistant).
|
||||
* Default: `true` if no `state_topic` defined, else `false`.
|
||||
*/
|
||||
optimistic?: boolean;
|
||||
|
||||
@@ -45,8 +45,9 @@ export interface SwitchComponent {
|
||||
|
||||
/**
|
||||
* The [type/class](https://www.home-assistant.io/integrations/switch/#device-class) of the switch to set the icon in the frontend. The `device_class` can be `null`.
|
||||
* The `device_class` defaults to `null` (generic switch).
|
||||
*/
|
||||
device_class?: string | null;
|
||||
device_class?: 'outlet' | 'switch' | null;
|
||||
|
||||
/**
|
||||
* Flag which defines if the entity should be enabled when first added.
|
||||
@@ -63,6 +64,12 @@ export interface SwitchComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
@@ -80,7 +87,10 @@ export interface SwitchComponent {
|
||||
|
||||
/**
|
||||
* The name to use when displaying this switch.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
* Default: "MQTT Switch"
|
||||
*/
|
||||
name?: string | null;
|
||||
@@ -91,7 +101,7 @@ export interface SwitchComponent {
|
||||
object_id?: string;
|
||||
|
||||
/**
|
||||
* Flag that defines if switch works in optimistic mode.
|
||||
* Flag that defines if switch works in optimistic mode (not waiting for state update before showing the change in Home Assistant).
|
||||
* Default: `true` if no `state_topic` defined, else `false`.
|
||||
*/
|
||||
optimistic?: boolean;
|
||||
|
||||
@@ -57,7 +57,10 @@ export interface TextComponent {
|
||||
|
||||
/**
|
||||
* The name of the text entity.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
* Default: "MQTT Text"
|
||||
*/
|
||||
name?: string | null;
|
||||
|
||||
@@ -67,7 +67,7 @@ export interface UpdateComponent {
|
||||
/**
|
||||
* The type/class of the update to set the icon in the frontend.
|
||||
* See [device classes](https://www.home-assistant.io/integrations/update/#device-classes).
|
||||
* Can be null.
|
||||
* Defaults to `null`.
|
||||
*/
|
||||
device_class?: string | null;
|
||||
|
||||
@@ -92,6 +92,12 @@ export interface UpdateComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
|
||||
@@ -63,7 +63,10 @@ export interface VacuumComponent {
|
||||
|
||||
/**
|
||||
* The name of the vacuum.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
* Default: "MQTT Vacuum"
|
||||
*/
|
||||
name?: string | null;
|
||||
|
||||
@@ -64,7 +64,7 @@ export interface ValveComponent {
|
||||
value_template?: string;
|
||||
|
||||
/**
|
||||
* Flag that defines if the valve works in optimistic mode.
|
||||
* Flag that defines if the valve works in optimistic mode (not waiting for state update before showing the change in Home Assistant).
|
||||
* Optimistic mode means the valve immediately changes state after command is sent,
|
||||
* without waiting for state update from the device.
|
||||
* Defaults to `false` if `state_topic` or position topics are defined; `true` otherwise.
|
||||
@@ -194,12 +194,21 @@ export interface ValveComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
/**
|
||||
* The name of the valve.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
* Default: "MQTT valve"
|
||||
*/
|
||||
name?: string | null;
|
||||
@@ -212,7 +221,7 @@ export interface ValveComponent {
|
||||
/**
|
||||
* Sets the [class of the device](https://www.home-assistant.io/integrations/valve/#device_class),
|
||||
* changing the device state and icon that is displayed on the frontend.
|
||||
* The `device_class` can be `null`.
|
||||
* The `device_class` defaults to `null`.
|
||||
*/
|
||||
device_class?: string | null;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,10 @@ export interface WaterHeaterComponent {
|
||||
|
||||
/**
|
||||
* The name of the water heater.
|
||||
* Can be set to `null` if only the device name is relevant.
|
||||
*
|
||||
* It is recommended to set the name when entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity, to avoid showing the default 'MQTT' name.
|
||||
*
|
||||
* Default: "MQTT water heater"
|
||||
*/
|
||||
name?: string | null;
|
||||
@@ -57,6 +60,12 @@ export interface WaterHeaterComponent {
|
||||
|
||||
/**
|
||||
* [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity.
|
||||
*
|
||||
* The icon must be a Material Design Icons (MDI) string identifier, for example: `mdi:thermometer`, `mdi:battery`, or `mdi:water`.
|
||||
*
|
||||
* It is recommended to set the icon when the default icon or other entity identifiers (such as `device_class` or `state_class`)
|
||||
* do not accurately represent the purpose of the entity. In most cases, relying on the automatic icon selection ensures better consistency
|
||||
* and compatibility with future updates.
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
@@ -130,7 +139,7 @@ export interface WaterHeaterComponent {
|
||||
payload_off?: string;
|
||||
|
||||
/**
|
||||
* Flag that defines if the water heater works in optimistic mode.
|
||||
* Flag that defines if the water heater works in optimistic mode (not waiting for state update before showing the change in Home Assistant).
|
||||
* Default: "`true` if no state topic defined, else `false`."
|
||||
*/
|
||||
optimistic?: boolean;
|
||||
|
||||
@@ -7,6 +7,7 @@ import { log } from '../logger';
|
||||
import { barrier_ctrl__components } from '../services/barrier_ctrl';
|
||||
import { basic__components } from '../services/basic';
|
||||
import { battery__components } from '../services/battery';
|
||||
import { chargepoint__components } from '../services/chargepoint';
|
||||
import { color_ctrl__components } from '../services/color_ctrl';
|
||||
import { fan_ctrl__components } from '../services/fan_ctrl';
|
||||
import { indicator_ctrl__components } from '../services/indicator_ctrl';
|
||||
@@ -163,6 +164,7 @@ const serviceHandlers: {
|
||||
barrier_ctrl: barrier_ctrl__components,
|
||||
basic: basic__components,
|
||||
battery: battery__components,
|
||||
chargepoint: chargepoint__components,
|
||||
color_ctrl: color_ctrl__components,
|
||||
fan_ctrl: fan_ctrl__components,
|
||||
indicator_ctrl: indicator_ctrl__components,
|
||||
|
||||
Reference in New Issue
Block a user