diff --git a/.homeycompose/capabilities/key_channel_down.json b/.homeycompose/capabilities/key_channel_down.json
new file mode 100644
index 00000000..7e50b4a5
--- /dev/null
+++ b/.homeycompose/capabilities/key_channel_down.json
@@ -0,0 +1,12 @@
+{
+ "type": "boolean",
+ "title": {
+ "en": "Channel down",
+ "nl": "Kanaal omlaag"
+ },
+ "getable": false,
+ "setable": true,
+ "uiComponent": "button",
+ "uiQuickAction": true,
+ "icon": "assets/capabilities/channel_down.svg"
+}
\ No newline at end of file
diff --git a/.homeycompose/capabilities/key_channel_up.json b/.homeycompose/capabilities/key_channel_up.json
new file mode 100644
index 00000000..ec5ca715
--- /dev/null
+++ b/.homeycompose/capabilities/key_channel_up.json
@@ -0,0 +1,12 @@
+{
+ "type": "boolean",
+ "title": {
+ "en": "Channel up",
+ "nl": "Kanaal omhoog"
+ },
+ "getable": false,
+ "setable": true,
+ "uiComponent": "button",
+ "uiQuickAction": true,
+ "icon": "assets/capabilities/channel_up.svg"
+}
\ No newline at end of file
diff --git a/app.json b/app.json
index 11885c1d..1ef5986e 100644
--- a/app.json
+++ b/app.json
@@ -572,6 +572,8 @@
"key_previous",
"key_next",
"key_watch_tv",
+ "key_channel_up",
+ "key_channel_down",
"key_source"
],
"id": "remote",
@@ -627,6 +629,30 @@
"uiQuickAction": true,
"icon": "assets/capabilities/back.svg"
},
+ "key_channel_down": {
+ "type": "boolean",
+ "title": {
+ "en": "Channel down",
+ "nl": "Kanaal omlaag"
+ },
+ "getable": false,
+ "setable": true,
+ "uiComponent": "button",
+ "uiQuickAction": true,
+ "icon": "assets/capabilities/channel_down.svg"
+ },
+ "key_channel_up": {
+ "type": "boolean",
+ "title": {
+ "en": "Channel up",
+ "nl": "Kanaal omhoog"
+ },
+ "getable": false,
+ "setable": true,
+ "uiComponent": "button",
+ "uiQuickAction": true,
+ "icon": "assets/capabilities/channel_up.svg"
+ },
"key_confirm": {
"type": "boolean",
"title": {
diff --git a/assets/capabilities/channel_down.svg b/assets/capabilities/channel_down.svg
new file mode 100644
index 00000000..f209a578
--- /dev/null
+++ b/assets/capabilities/channel_down.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/capabilities/channel_up.svg b/assets/capabilities/channel_up.svg
new file mode 100644
index 00000000..fb7bccc7
--- /dev/null
+++ b/assets/capabilities/channel_up.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/drivers/remote/client.ts b/drivers/remote/client.ts
index 2a8ce599..bdf325af 100644
--- a/drivers/remote/client.ts
+++ b/drivers/remote/client.ts
@@ -146,6 +146,14 @@ export default class AndroidTVRemoteClient {
this.client.sendKey(RemoteKeyCode.KEYCODE_MEDIA_NEXT, direction || RemoteDirection.SHORT)
}
+ public sendKeyChannelUp(direction: number | null = null): void {
+ this.client.sendKey(RemoteKeyCode.KEYCODE_CHANNEL_UP, direction || RemoteDirection.SHORT)
+ }
+
+ public sendKeyChannelDown(direction: number | null = null): void {
+ this.client.sendKey(RemoteKeyCode.KEYCODE_CHANNEL_DOWN, direction || RemoteDirection.SHORT)
+ }
+
public sendKeyMediaPrevious(direction: number | null = null): void {
this.client.sendKey(RemoteKeyCode.KEYCODE_MEDIA_PREVIOUS, direction || RemoteDirection.SHORT)
}
diff --git a/drivers/remote/device.ts b/drivers/remote/device.ts
index c6010082..1852cec2 100644
--- a/drivers/remote/device.ts
+++ b/drivers/remote/device.ts
@@ -31,6 +31,8 @@ class RemoteDevice extends Remote {
'key_cursor_up',
'key_cursor_right',
'key_cursor_down',
+ 'key_channel_up',
+ 'key_channel_down',
// 'key_info',
// 'key_digit_1',
// 'key_digit_2',
@@ -201,6 +203,10 @@ class RemoteDevice extends Remote {
return this.client?.sendKeyMediaPrevious();
} else if (typeof capability.key_next !== 'undefined') {
return this.client?.sendKeyMediaNext();
+ } else if (typeof capability.key_channel_up !== 'undefined') {
+ return this.client?.sendKeyChannelUp();
+ } else if (typeof capability.key_channel_down !== 'undefined') {
+ return this.client?.sendKeyChannelDown();
}
// else if (typeof capability.key_adjust !== 'undefined') {
// return this.sendKey('Adjust')
@@ -277,6 +283,8 @@ class RemoteDevice extends Remote {
"key_cursor_right",
"key_cursor_down",
"key_cursor_left",
+ "key_channel_up",
+ "key_channel_down",
"key_back",
"key_home",
"key_confirm",
@@ -357,6 +365,10 @@ class RemoteDevice extends Remote {
this.client?.sendKeyMediaStop(direction);
} else if (key === 'key_next') {
this.client?.sendKeyMediaNext(direction);
+ } else if (key === 'key_channel_up') {
+ this.client?.sendKeyChannelUp(direction);
+ } else if (key === 'key_channel_down') {
+ this.client?.sendKeyChannelDown(direction);
} else if (key === 'key_cursor_left') {
this.client?.sendKeyDpadLeft(direction);
} else if (key === 'key_cursor_up') {
@@ -460,6 +472,14 @@ class RemoteDevice extends Remote {
key: 'key_cursor_down',
name: this.homey.__(`key.cursor_down`)
},
+ {
+ key: 'key_channel_up',
+ name: this.homey.__(`key.channel_up`)
+ },
+ {
+ key: 'key_channel_down',
+ name: this.homey.__(`key.channel_down`)
+ },
{
key: 'key_options',
name: this.homey.__(`key.options`)
diff --git a/drivers/remote/driver.compose.json b/drivers/remote/driver.compose.json
index e270986b..155875f3 100644
--- a/drivers/remote/driver.compose.json
+++ b/drivers/remote/driver.compose.json
@@ -156,6 +156,8 @@
"key_previous",
"key_next",
"key_watch_tv",
+ "key_channel_up",
+ "key_channel_down",
"key_source"
]
}
diff --git a/locales/da.json b/locales/da.json
index 2a041bf1..e7f2fa8c 100644
--- a/locales/da.json
+++ b/locales/da.json
@@ -32,6 +32,8 @@
"cursor_up": "Opad pil",
"cursor_right": "Højre pil",
"cursor_down": "Nedad pil",
+ "channel_up": "Kanal op",
+ "channel_down": "Kanal ned",
"options": "Indstillinger",
"back": "Tilbage",
"home": "Hjem"
diff --git a/locales/de.json b/locales/de.json
index 9c1bc336..0a936cff 100644
--- a/locales/de.json
+++ b/locales/de.json
@@ -32,6 +32,8 @@
"cursor_up": "D-Pad hoch",
"cursor_right": "D-Pad rechts",
"cursor_down": "D-Pad runter",
+ "channel_up": "Sender hoch",
+ "channel_down": "Sender runter",
"options": "Optionen",
"back": "Zurück",
"home": "Home"
diff --git a/locales/en.json b/locales/en.json
index 99123865..c3057fcf 100644
--- a/locales/en.json
+++ b/locales/en.json
@@ -32,6 +32,8 @@
"cursor_up": "D-pad up",
"cursor_right": "D-pad right",
"cursor_down": "D-pad down",
+ "channel_up": "Channel up",
+ "channel_down": "Channel down",
"options": "Options",
"back": "Back",
"home": "Home"
diff --git a/locales/es.json b/locales/es.json
index 9a09d088..5f2fabf7 100644
--- a/locales/es.json
+++ b/locales/es.json
@@ -32,6 +32,8 @@
"cursor_up": "Arriba",
"cursor_right": "Derecha",
"cursor_down": "Abajo",
+ "channel_up": "Subir canal",
+ "channel_down": "Bajar canal",
"options": "Opciones",
"back": "Atrás",
"home": "Inicio"
diff --git a/locales/fr.json b/locales/fr.json
index bc9c97ee..8ffcbb29 100644
--- a/locales/fr.json
+++ b/locales/fr.json
@@ -32,6 +32,8 @@
"cursor_up": "Flèche haut",
"cursor_right": "Flèche droite",
"cursor_down": "Flèche bas",
+ "channel_up": "Monter la chaîne",
+ "channel_down": "Descendre la chaîne",
"options": "Options",
"back": "Retour",
"home": "Accueil"
diff --git a/locales/it.json b/locales/it.json
index 085b74c5..2a2d6c7e 100644
--- a/locales/it.json
+++ b/locales/it.json
@@ -32,6 +32,8 @@
"cursor_up": "Freccia su",
"cursor_right": "Freccia destra",
"cursor_down": "Freccia giù",
+ "channel_up": "Canale su",
+ "channel_down": "Canale giù",
"options": "Opzioni",
"back": "Indietro",
"home": "Home"
diff --git a/locales/nl.json b/locales/nl.json
index 693283a9..3792f1cb 100644
--- a/locales/nl.json
+++ b/locales/nl.json
@@ -32,6 +32,8 @@
"cursor_up": "D-pad omhoog",
"cursor_right": "D-pad rechts",
"cursor_down": "D-pad omlaag",
+ "channel_up": "Kanaal omhoog",
+ "channel_down": "Kanaal omlaag",
"options": "Opties",
"back": "Terug",
"home": "Start"
diff --git a/locales/no.json b/locales/no.json
index d702e7c8..eb3ef4f4 100644
--- a/locales/no.json
+++ b/locales/no.json
@@ -32,6 +32,8 @@
"cursor_up": "Pil opp",
"cursor_right": "Pil høyre",
"cursor_down": "Pil ned",
+ "channel_up": "Kanal opp",
+ "channel_down": "Kanal ned",
"options": "Alternativer",
"back": "Tilbake",
"home": "Hjem"
diff --git a/locales/pl.json b/locales/pl.json
index 99c3dc9b..f9aa28d9 100644
--- a/locales/pl.json
+++ b/locales/pl.json
@@ -32,6 +32,8 @@
"cursor_up": "Kursor w górę",
"cursor_right": "Kursor w prawo",
"cursor_down": "Kursor w dół",
+ "channel_up": "Zwiększ kanał",
+ "channel_down": "Zmniejsz kanał",
"options": "Opcje",
"back": "Powrót",
"home": "Strona główna"
diff --git a/locales/sv.json b/locales/sv.json
index dc8c994c..36edd575 100644
--- a/locales/sv.json
+++ b/locales/sv.json
@@ -32,6 +32,8 @@
"cursor_up": "D-pad upp",
"cursor_right": "D-pad höger",
"cursor_down": "D-pad ner",
+ "channel_up": "Byt upp kanal",
+ "channel_down": "Byt ner kanal",
"options": "Alternativ",
"back": "Tillbaka",
"home": "Hem"