Skip to content

Commit

Permalink
Rename curtain to more generic window coverings
Browse files Browse the repository at this point in the history
  • Loading branch information
bobvandevijver committed Sep 24, 2024
1 parent 53de521 commit f1d8ebe
Show file tree
Hide file tree
Showing 23 changed files with 121 additions and 121 deletions.
2 changes: 1 addition & 1 deletion .homeycompose/flow/actions/send_command_boolean.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down
2 changes: 1 addition & 1 deletion .homeycompose/flow/actions/send_command_json.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down
2 changes: 1 addition & 1 deletion .homeycompose/flow/actions/send_command_number.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down
2 changes: 1 addition & 1 deletion .homeycompose/flow/actions/send_command_string.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down
2 changes: 1 addition & 1 deletion .homeycompose/flow/triggers/receive_status_boolean.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down
2 changes: 1 addition & 1 deletion .homeycompose/flow/triggers/receive_status_json.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down
2 changes: 1 addition & 1 deletion .homeycompose/flow/triggers/receive_status_number.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down
2 changes: 1 addition & 1 deletion .homeycompose/flow/triggers/receive_status_string.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down
180 changes: 90 additions & 90 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down Expand Up @@ -479,7 +479,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down Expand Up @@ -520,7 +520,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down Expand Up @@ -561,7 +561,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down Expand Up @@ -1311,7 +1311,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down Expand Up @@ -1349,7 +1349,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down Expand Up @@ -1387,7 +1387,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down Expand Up @@ -1425,7 +1425,7 @@
"name": "device",
"type": "device",
"filter": {
"driver_id": "button|camera|circuit_breaker|curtain|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat"
"driver_id": "button|camera|circuit_breaker|dimmer|doorbell|fan|garage_door|heater|irrigator|light|other|sensor_climate|sensor_contact|sensor_human|sensor_motion|sensor_smoke|siren|socket|thermostat|window_coverings"
},
"title": {
"en": "Device"
Expand Down Expand Up @@ -3440,88 +3440,6 @@
}
]
},
{
"capabilities": [
"windowcoverings_state",
"windowcoverings_set"
],
"connectivity": [
"cloud"
],
"platforms": [
"local",
"cloud"
],
"images": {
"small": "/drivers/curtain/assets/images/small.png",
"large": "/drivers/curtain/assets/images/large.png",
"xlarge": "/drivers/curtain/assets/images/xlarge.png"
},
"pair": [
{
"id": "welcome",
"navigation": {
"next": "login_oauth2"
}
},
{
"id": "login_oauth2",
"template": "login_oauth2"
},
{
"id": "list_devices",
"template": "list_devices",
"navigation": {
"next": "add_devices"
}
},
{
"id": "add_devices",
"template": "add_devices"
}
],
"repair": [
{
"id": "login_oauth2",
"template": "login_oauth2"
}
],
"class": "curtain",
"name": {
"en": "Curtain",
"nl": "Gordijn"
},
"id": "curtain",
"settings": [
{
"type": "group",
"label": {
"en": "NOTE: Some settings are not supported by every device."
},
"children": [
{
"id": "inverse",
"type": "checkbox",
"label": {
"en": "Inverse direction"
},
"value": false
}
]
},
{
"id": "deviceSpecification",
"type": "label",
"label": {
"en": "Device Specification"
},
"hint": {
"en": "The Tuya specification of this device"
},
"value": "<not available>"
}
]
},
{
"capabilities": [
"onoff",
Expand Down Expand Up @@ -6235,6 +6153,88 @@
"value": "<not available>"
}
]
},
{
"capabilities": [
"windowcoverings_state",
"windowcoverings_set"
],
"connectivity": [
"cloud"
],
"platforms": [
"local",
"cloud"
],
"images": {
"small": "/drivers/window_coverings/assets/images/small.png",
"large": "/drivers/window_coverings/assets/images/large.png",
"xlarge": "/drivers/window_coverings/assets/images/xlarge.png"
},
"pair": [
{
"id": "welcome",
"navigation": {
"next": "login_oauth2"
}
},
{
"id": "login_oauth2",
"template": "login_oauth2"
},
{
"id": "list_devices",
"template": "list_devices",
"navigation": {
"next": "add_devices"
}
},
{
"id": "add_devices",
"template": "add_devices"
}
],
"repair": [
{
"id": "login_oauth2",
"template": "login_oauth2"
}
],
"class": "windowcoverings",
"name": {
"en": "Window coverings",
"nl": "Raambekleding"
},
"id": "window_coverings",
"settings": [
{
"type": "group",
"label": {
"en": "NOTE: Some settings are not supported by every device."
},
"children": [
{
"id": "inverse",
"type": "checkbox",
"label": {
"en": "Inverse direction"
},
"value": false
}
]
},
{
"id": "deviceSpecification",
"type": "label",
"label": {
"en": "Device Specification"
},
"hint": {
"en": "The Tuya specification of this device"
},
"value": "<not available>"
}
]
}
],
"capabilities": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import TRANSLATIONS from './translations.json';

export const CURTAIN_CAPABILITY_MAPPING = {
export const WINDOW_COVERINGS_CAPABILITY_MAPPING = {
control: 'windowcoverings_state',
mach_operate: 'windowcoverings_state',
position: 'windowcoverings_set',
percent_control: 'windowcoverings_set',
percent_state: 'windowcoverings_set',
} as const;

export const CURTAIN_CAPABILITIES = {
export const WINDOW_COVERINGS_CAPABILITIES = {
read_write: ['control', 'position', 'mach_operate', 'percent_control'],
setting: ['opposite', 'control_back'],
} as const;

export type HomeyCurtainSettings = {
export type HomeyWindowCoveringsSettings = {
inverse: boolean;
};

export type TuyaCurtainSettings = {
export type TuyaWindowCoveringsSettings = {
opposite: boolean; // inverse
control_back: boolean; // inverse
control_back_mode: 'forward' | 'back'; // inverse
};

export const CURTAIN_SETTING_LABELS = TRANSLATIONS.setting_labels;
export const WINDOW_COVERINGS_SETTING_LABELS = TRANSLATIONS.setting_labels;
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit f1d8ebe

Please sign in to comment.