Hi all, I’m looking for some help on an issue I’m having with a binary sensor. I’ve done some digging, but I’m totally new to HA and yaml, and there’s not a lot of Magiquest specific information / examples / posts. Thanks in advance for any and all help!
I’ve got the general implementation working for what I’m trying to accomplish: I have an ESP8266 with an IR receiver sending a binary sensor state into HA when my child’s Magiquest wand is waved at it, which I’m using to automate various smart devices and Alexa.
My problem comes in that the wand is so sensitive, it’s triggering all the time even when my child isn’t waving it at the IR sensor. The magiquest portion of Remote Receiver library includes the wand ID and a ‘magnitude’ value of the motion. I have a specific magnitude I’d like the binary sensor to also check for in addition to the wand ID. The wand ID is a required input, and with only the wand ID I have it working. The magnitude shows as optional in the Remote Receiver documentation. When I do add it though, it is still changing the state to True for any magnitude so long as the wand ID matches.
I tried looking more into the source code to no avail, but like I said I’m by no means an expert in any of this, just trying to setup something cool and fun for my child with his now otherwise useless wand. Am I doing something wrong here, is the functionality broken, is there another way I can accomplish this same task?
Relevant section of code, can post all of it if desired:
binary_sensor:
- platform: remote_receiver
name: "Child 1 Wand"
magiquest:
wand_id: !secret wand_child1_address
magnitude: 0x0C08
filters:
- delayed_off: ${wand_retrigger_timeout}
example of the issue from the logs:
[23:32:00][D][binary_sensor:036]: 'Child 1 Wand': Sending state ON
[23:32:00][I][remote.magiquest:079]: Received MagiQuest: wand_id=0x028AA9CC, magnitude=0x092B
[23:32:02][D][binary_sensor:036]: 'Child 1 Wand': Sending state OFF
[23:32:02][D][binary_sensor:036]: 'Child 1 Wand': Sending state ON
[23:32:02][I][remote.magiquest:079]: Received MagiQuest: wand_id=0x028AA9CC, magnitude=0x0804
[23:32:04][I][remote.magiquest:079]: Received MagiQuest: wand_id=0x028AA9CC, magnitude=0x080C
[23:32:06][I][remote.magiquest:079]: Received MagiQuest: wand_id=0x028AA9CC, magnitude=0x0808
[23:32:07][I][remote.magiquest:079]: Received MagiQuest: wand_id=0x028AA9CC, magnitude=0x080C
[23:32:09][D][binary_sensor:036]: 'Child 1 Wand': Sending state OFF
[23:32:11][D][binary_sensor:036]: 'Child 1 Wand': Sending state ON
[23:32:11][I][remote.magiquest:079]: Received MagiQuest: wand_id=0x028AA9CC, magnitude=0x0C08
[23:32:13][D][binary_sensor:036]: 'Child 1 Wand': Sending state OFF
From the Remote Receiver documentation under the Binary Sensor portion:
magiquest: Trigger on a decoded MagiQuest wand remote code with the given wand ID.
wand_id (Required, int): The MagiQuest wand ID to trigger on, see dumper output for more info.
magnitude (Optional, int): The magnitude of swishes and swirls of the wand. If omitted, will match on any activation of the wand.