mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-10 01:17:42 +01:00
commit
2aae389a20
4 changed files with 36 additions and 3 deletions
|
@ -16,6 +16,6 @@ RUN cat /workspace/additional-dev-requirements.txt 2>/dev/null 1>> /workspace/re
|
||||||
|
|
||||||
# Install current version of cbpi-ui
|
# Install current version of cbpi-ui
|
||||||
RUN mkdir /opt/downloads \
|
RUN mkdir /opt/downloads \
|
||||||
&& curl https://github.com/avollkopf/craftbeerpi4-ui/archive/main.zip -L -o /opt/downloads/cbpi-ui.zip \
|
&& curl https://github.com/PiBrewing/craftbeerpi4-ui/archive/main.zip -L -o /opt/downloads/cbpi-ui.zip \
|
||||||
&& pip3 install --no-cache-dir /opt/downloads/cbpi-ui.zip \
|
&& pip3 install --no-cache-dir /opt/downloads/cbpi-ui.zip \
|
||||||
&& rm -rf /opt/downloads
|
&& rm -rf /opt/downloads
|
|
@ -1,7 +1,7 @@
|
||||||
FROM alpine:latest as download
|
FROM alpine:latest as download
|
||||||
RUN apk --no-cache add curl && mkdir /downloads
|
RUN apk --no-cache add curl && mkdir /downloads
|
||||||
# Download installation files
|
# Download installation files
|
||||||
RUN curl https://github.com/avollkopf/craftbeerpi4-ui/archive/main.zip -L -o ./downloads/cbpi-ui.zip
|
RUN curl https://github.com/PiBrewing/craftbeerpi4-ui/archive/main.zip -L -o ./downloads/cbpi-ui.zip
|
||||||
|
|
||||||
FROM python:3.10 as base
|
FROM python:3.10 as base
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
__version__ = "4.1.3"
|
__version__ = "4.1.5"
|
||||||
__codename__ = "Groundhog Day"
|
__codename__ = "Groundhog Day"
|
||||||
|
|
||||||
|
|
|
@ -251,3 +251,36 @@ class ActorHttpEndpoints():
|
||||||
await self.controller.call_action(actor_id, data.get("action"), data.get("parameter"))
|
await self.controller.call_action(actor_id, data.get("action"), data.get("parameter"))
|
||||||
|
|
||||||
return web.Response(status=204)
|
return web.Response(status=204)
|
||||||
|
|
||||||
|
@request_mapping(path="/{id}/set_power", method="POST", auth_required=auth)
|
||||||
|
async def http_set_power(self, request) -> web.Response:
|
||||||
|
"""
|
||||||
|
|
||||||
|
---
|
||||||
|
description: Set actor power
|
||||||
|
tags:
|
||||||
|
- Actor
|
||||||
|
parameters:
|
||||||
|
- name: "id"
|
||||||
|
in: "path"
|
||||||
|
description: "Actor ID"
|
||||||
|
required: true
|
||||||
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: Set Power
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
temp:
|
||||||
|
type: integer
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: successful operation
|
||||||
|
"""
|
||||||
|
id = request.match_info['id']
|
||||||
|
data = await request.json()
|
||||||
|
await self.controller.set_power(id,data.get("power"))
|
||||||
|
return web.Response(status=204)
|
Loading…
Reference in a new issue