Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bcbcaa801 | ||
|
|
b479476833 | ||
|
|
baa31ab649 | ||
|
|
dc7c6273e4 | ||
|
|
2942b6173b | ||
|
|
bcfc648011 |
No files matched your search
@@ -1,5 +1,12 @@
|
||||
# Changelog 
|
||||
|
||||
## [0.5.2] - Better Controls
|
||||
|
||||
- Add automation trigger
|
||||
- Speed dial on the bottom
|
||||
<img src="https://user-images.githubusercontent.com/7451445/183231968-9891bbb4-5c7c-4e05-b804-36978c809a5c.png" width="200px"/>
|
||||
- Infinite undos <img src="https://user-images.githubusercontent.com/7451445/183231977-ed000017-2886-4a57-b5fb-c7e527bf3894.png" width="200px"/>
|
||||
|
||||
## [0.5.1] - Sidebar!
|
||||
|
||||
- completely redesigned the sidebar!
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Shortumation 
|
||||
# <img src="logo.png" height="40x"/> Shortumation 
|
||||
|
||||
[](https://github.com/asosnovsky/Shortumation/actions/workflows/test.yml) [](https://github.com/asosnovsky/Shortumation/actions/workflows/build.yml)
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
| ------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Version |  |  |
|
||||
|
||||
A [home-assistant addon](https://www.home-assistant.io/addons/) for a better UI for managing and writing your automations. We provide a way to visualize your automation using a visual-programming language that draws inspirations from [Node-Red](https://nodered.org/).
|
||||
A [home-assistant addon](https://www.home-assistant.io/addons/) for a better UI for managing and writing your automations. We provide a way to visualize your automation using a visual-programming language that draws inspirations from [Node-Red](https://nodered.org/).
|
||||
|
||||
<img src="./assets/comparisons.png">
|
||||
|
||||
## Features
|
||||
|
||||
@@ -46,6 +48,8 @@ Add the repository URL under **Supervisor → Add-on store → ⋮ → Manage ad
|
||||
|
||||
It should now appear in your `Add-on Store` and you should be able to install it!
|
||||
|
||||
**Please note that you may need to enable advance mode in your settings first!**
|
||||
|
||||
### Containerized or HA Core
|
||||
|
||||
Please note that this way of using Shortumation is **not future proof**.
|
||||
|
||||
+11
-1
@@ -1,6 +1,7 @@
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from fastapi.responses import RedirectResponse
|
||||
|
||||
from src.automations.manager import AutomationManager
|
||||
from src.env import API_PREFIX, ORIGIN, ROOT_FOLDER
|
||||
@@ -10,7 +11,8 @@ from .routes import automations, details, ping, socket
|
||||
|
||||
def make_app(automation_mgr: AutomationManager) -> FastAPI:
|
||||
app = FastAPI()
|
||||
if (ROOT_FOLDER / "web").exists():
|
||||
has_web_folder = (ROOT_FOLDER / "web").exists()
|
||||
if has_web_folder:
|
||||
app.mount(
|
||||
f"{API_PREFIX}/web",
|
||||
StaticFiles(
|
||||
@@ -19,6 +21,7 @@ def make_app(automation_mgr: AutomationManager) -> FastAPI:
|
||||
),
|
||||
name="web",
|
||||
)
|
||||
|
||||
else:
|
||||
print("WARN: could not find web folder")
|
||||
app.add_middleware(
|
||||
@@ -36,4 +39,11 @@ def make_app(automation_mgr: AutomationManager) -> FastAPI:
|
||||
details.make_details_router(automation_mgr.hass_config), prefix=f"{API_PREFIX}/details"
|
||||
)
|
||||
app.include_router(socket.router, prefix=f"{API_PREFIX}/socket")
|
||||
|
||||
@app.get("/")
|
||||
def get_index():
|
||||
if has_web_folder:
|
||||
return RedirectResponse("/web")
|
||||
return RedirectResponse("/details")
|
||||
|
||||
return app
|
||||
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 2.9 MiB |
+1
-1
@@ -1,5 +1,5 @@
|
||||
name: Shortumation
|
||||
version: v0.5.1
|
||||
version: v0.5.2
|
||||
slug: shortumation
|
||||
image: asosnovsky/shortumation-{arch}
|
||||
url: "https://github.com/asosnovsky/Shortumation"
|
||||
|
||||
@@ -12,9 +12,12 @@ services:
|
||||
shortumation:
|
||||
# make sure to replace the ARCH with whatever system you are running!
|
||||
image: "asosnovsky/shortumation-${ARCH:-amd64}:${SHORTUMATION_VERSION:-latest}"
|
||||
network_mode: host
|
||||
ports:
|
||||
- 8000:8000
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
volumes:
|
||||
- ./config:/config
|
||||
environment:
|
||||
- SUPERVISOR_TOKEN=${SUPERVISOR_TOKEN}
|
||||
- HASSIO_WS=ws://0.0.0.0:8123/api/websocket
|
||||
- HASSIO_WS=ws://host.docker.internal:8123/api/websocket
|
||||
@@ -120,3 +120,54 @@ export const MissingAutoInConfig = make({
|
||||
entitySource: {},
|
||||
},
|
||||
});
|
||||
export const BadAutomation = make({
|
||||
haProps: {
|
||||
loading: false,
|
||||
entities: {
|
||||
[`automation.${auto1.metadata.id}`]: {
|
||||
entity_id: `automation.${auto1.metadata.id}`,
|
||||
attributes: {
|
||||
id: "test",
|
||||
},
|
||||
context: { id: "", parent_id: null, user_id: null },
|
||||
last_changed: "",
|
||||
last_updated: "",
|
||||
state: "on",
|
||||
},
|
||||
},
|
||||
entitySource: {},
|
||||
},
|
||||
automations: [
|
||||
{
|
||||
tags: {},
|
||||
metadata: {
|
||||
id: "test",
|
||||
mode: "single",
|
||||
alias: "Light.Tank_Day",
|
||||
description: "",
|
||||
},
|
||||
trigger: [
|
||||
{
|
||||
platform: "sun",
|
||||
event: "sunrise",
|
||||
offset: "30",
|
||||
} as any,
|
||||
{ whoAmI: "bad node is who" } as any,
|
||||
],
|
||||
condition: [{ whoAmI: "bad node is who" } as any],
|
||||
sequence: [
|
||||
{ scene: "scene.light_day" } as any,
|
||||
{ whoAmI: "bad node is who" } as any,
|
||||
{
|
||||
service: "input_select.set_options",
|
||||
target: {
|
||||
entity_id: "input_select.tank_light_mode",
|
||||
},
|
||||
data: {
|
||||
options: "day",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -6,7 +6,7 @@ export const NODE_HEIGHT = 80 as const;
|
||||
export const DEFAULT_DIMS: DAGDims = {
|
||||
collection: {
|
||||
height: NODE_HEIGHT * 3,
|
||||
width: NODE_WIDTH * 1.5,
|
||||
width: NODE_WIDTH * 2.5,
|
||||
},
|
||||
node: {
|
||||
height: NODE_HEIGHT,
|
||||
|
||||
@@ -29,7 +29,7 @@ export const useDAGElementsState = () => {
|
||||
},
|
||||
|
||||
getIsClosedActions(nodeId: string, node: AutomationNode) {
|
||||
if (isSpecialNode(getNodeSubType(node))) {
|
||||
if (isSpecialNode(getNodeSubType(node, true))) {
|
||||
return {
|
||||
isClosed: this.get(nodeId).isClosed ?? false,
|
||||
setIsClosed: (v: boolean) => this.set(nodeId, "isClosed", v),
|
||||
|
||||
Reference in new issue
Block a user