Skip to content

Commit 49d3b50

Browse files
aanbanswoboda1337
andauthored
[remote_base] add decoder for Dyson cool AM07 tower fan IR codes (#5422)
* [remote_base] add dyson decoder * bugfix lint error, blank lines removed * corrections * set line length < 120 * Minor tweak * Minor tweak * Fix lint * Fix note: --------- Co-authored-by: Jonathan Swoboda <[email protected]>
1 parent a36f251 commit 49d3b50

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

all_automations.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@
287287
"remote_transmitter.transmit_dish",
288288
"remote_transmitter.transmit_dooya",
289289
"remote_transmitter.transmit_drayton",
290+
"remote_transmitter.transmit_dyson",
290291
"remote_transmitter.transmit_haier",
291292
"remote_transmitter.transmit_jvc",
292293
"remote_transmitter.transmit_keeloq",

content/components/remote_receiver.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Multiple remote receivers can be configured as a list of dict definitions within
4545
- **dish**: Decode and dump Dish infrared codes.
4646
- **dooya**: Decode and dump Dooya RF codes.
4747
- **drayton**: Decode and dump Drayton Digistat RF codes.
48+
- **dyson**: Decode and dump Dyson Cool AM7 tower fan codes.
4849
- **jvc**: Decode and dump JVC infrared codes.
4950
- **gobox**: Decode and dump Go-Box infrared codes.
5051
- **keeloq**: Decode and dump KeeLoq RF codes.
@@ -188,6 +189,10 @@ To enable signal demodulation, configure the signal carrier frequency and duty c
188189
Drayton Digistat RF code has been decoded. A variable `x` of type {{< apistruct "remote_base::DraytonData" "remote_base::DraytonData" >}}
189190
is passed to the automation for use in lambdas.
190191

192+
- **on_dyson** (*Optional*, [Automation](#automation)): An automation to perform when a
193+
Dyson cool AM07 code has been decoded. A variable `x` of type {{< apistruct "remote_base::DysonData" "remote_base::DysonData" >}}
194+
is passed to the automation for use in lambdas.
195+
191196
- **on_gobox** (*Optional*, [Automation](#automation)): An automation to perform when a
192197
Go-Box remote code has been decoded. A variable `x` of type {{< apistruct "remote_base::GoboxData" "remote_base::GoboxData" >}}
193198
is passed to the automation for use in lambdas.
@@ -429,6 +434,11 @@ Remote code selection (exactly one of these has to be included):
429434
- **channel** (**Required**, int): The 7-bit switch/channel to listen for.
430435
- **command** (**Required**, int): The 5-bit command to listen for.
431436

437+
- **dyson**: Trigger on a decoded dyson cool AM07 infrared remote code with the given data.
438+
439+
- **code** (**Required**, int): The 16-bit code to trigger on, e.g. 0x1200=power, 0x1215=fan++,0x122a=swing..., see dumper output for more info.
440+
- **index** (**Required**, int): The 8-bit rolling index [0..3], to be increased with every transmit, see dumper output for more info.
441+
432442
- **gobox**: Trigger on a decoded Go-Box remote code with the given data.
433443

434444
- **code** (**Required**, int): The Go-Box code to trigger on, see dumper output for more info.

content/components/remote_transmitter.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,34 @@ on_...:
376376
- **command** (**Required**, int): The command to send, between 0 and 63 inclusive.
377377
- All other options from [Remote Transmitter Actions](#remote_transmitter-transmit_action).
378378

379+
{{< anchor "remote_transmitter-transmit_dyson" >}}
380+
381+
### `remote_transmitter.transmit_dyson` **Action**
382+
383+
This [action](#config-action) sends a Dyson cool AM07 infrared protocol code to a remote transmitter.
384+
385+
```yaml
386+
on_...:
387+
- remote_transmitter.transmit_dyson:
388+
code: '0x1200'
389+
index: !lambda |-
390+
uint8_t idx = id(idx);
391+
id(idx) = (id(idx) + 1) & 3;
392+
return idx;
393+
```
394+
395+
#### Configuration variables
396+
397+
- **code** (**Required**, int): The 16-bit code to trigger on, e.g. 0x1200=power, 0x1215=fan++,
398+
0x122a=swing..., see dumper output for more info.
399+
- **index** (**Required**, int): The 8-bit rolling index (range=0..3).
400+
- All other options from [Remote Transmitter Actions](#remote_transmitter-transmit_action).
401+
402+
> [!NOTE]
403+
> The **dyson** devices use rolling codes, i.e. each remote button generates 4 different codes in a pseudo
404+
> random manner. On every transmit the **index** variable must loop to let the **..transmit_dyson** function
405+
> generate a code that differs from the previous one.
406+
379407
{{< anchor "remote_transmitter-transmit_gobox" >}}
380408

381409
### `remote_transmitter.transmit_gobox` **Action**

0 commit comments

Comments
 (0)