mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
home assistant lights and other tweaks
This commit is contained in:
@@ -12,6 +12,8 @@ const SessionContext = createContext({
|
||||
requestControl: async () => {},
|
||||
releaseControl: async () => {},
|
||||
subscribeAll: async () => {},
|
||||
homeAssistantToggle: async () => {},
|
||||
homeAssistantSetState: async () => {},
|
||||
});
|
||||
|
||||
function useAckEmitter(socket) {
|
||||
@@ -89,6 +91,9 @@ export function SessionProvider({ children }) {
|
||||
subscribeAll: () => emitWithAck('session:subscribeAll'),
|
||||
lockRover: (roverId, locked) => emitWithAck('session:lockRover', { roverId, locked }),
|
||||
setMode: (mode) => emitWithAck('setMode', { mode }),
|
||||
homeAssistantToggle: (entityId) => emitWithAck('homeAssistant:toggle', { entityId }),
|
||||
homeAssistantSetState: (entityId, state) =>
|
||||
emitWithAck('homeAssistant:setState', { entityId, state }),
|
||||
}),
|
||||
[emitWithAck],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user