Skip to content

Instantly share code, notes, and snippets.

@okets
okets / gist:b2bdf3ba2ab96c27ad58274372298261
Last active August 29, 2024 16:01
figure out the room Valetudo robot is right now.
const mapData = msg.payload;
const _pixelSize = mapData.pixelSize;
let _robotXY = null;
for (let i = 0; i < mapData.entities.length; i++) {
if (mapData.entities[i].type == "robot_position") {
_robotXY = {
x: Math.floor(mapData.entities[i].points[0] / _pixelSize),
y: Math.floor(mapData.entities[i].points[1] / _pixelSize)
};
break;
@okets
okets / actionable-notifications-subflow-for-ios.json
Last active July 23, 2022 18:06 — forked from sstratoti/actionable-notifications-subflow-for-ios.md
iOS Subflow for HomeAssistant Companion notifications
[
{
"id":"914734122ce79fcd",
"type":"subflow",
"name":"iOS Actionable Notification",
"info":"[Documentation](https://github.com/zachowj/node-red-contrib-home-assistant-websocket/discussions/379)\n",
"category":"home_assistant",
"in":[
{
"x":60,