Skip to content
This repository has been archived by the owner on Nov 17, 2024. It is now read-only.

Commit

Permalink
fix: finalizing changes for home assistant
Browse files Browse the repository at this point in the history
  • Loading branch information
segadora committed Nov 7, 2024
1 parent 2434d89 commit 1ababe7
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion solar_assistant_browser_automation_api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM --platform=${BUILD_ARCH:-linux/amd64} golang:1.23 AS builder

WORKDIR /go/src/github.com/segadora/solar-assistant-browser-automation

RUN echo v1.0.0
RUN echo v1.0.0 #prevent-cache
RUN git clone https://github.com/segadora/solar-assistant-browser-automation.git .

COPY . .
Expand Down
30 changes: 30 additions & 0 deletions solar_assistant_browser_automation_api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Solar Assistant Browser Automation
===

Add the following to your **configuration.yaml**

```yaml
rest_command:
solar_assistant_work_mode_schedule_update:
url: 'http://localhost:8080/work-mode-schedule?schedule1[from]={{ from }}&schedule1[to]={{ to }}&schedule1[priority]={{ priority }}&schedule1[enabled]={{ enable }}'
method: GET
content_type: 'application/json; charset=utf-8'
timeout: 120
```
The rest api can be called with the following method:
### Enable
```yaml
action: rest_command.solar_assistant_work_mode_schedule_update
data:
from: "0500"
to: "0600"
priority: Battery first
enable: "1"
```
| from | to | priority | enable |
|-----------------------------------|-----------------------------------|---------------------------------------------|-------------------------------------------|
| Timestamp with 4 digits 0000-2359 | Timestamp with 4 digits 0000-2359 | Battery first<br/>Load first<br/>Grid first | To enable use `1`<br/>To disable use `-1` |
16 changes: 16 additions & 0 deletions solar_assistant_browser_automation_api/translations/da.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
configuration:
url:
name: Link
description: >-
Fuld adresse til solar assistant, eksempel https://xxx.eu.solar-assistant.io
user:
name: Brugernavn
description: >-
Brugernavn til Solar Assistant
pass:
name: Kodeord
description: >-
Kodeord til Solar Assistant
network:
8080/tcp: Webserver port

0 comments on commit 1ababe7

Please sign in to comment.