Skip to content

Commit

Permalink
Add language to code fences in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xx4h committed Sep 30, 2024
1 parent ea0b005 commit 8a741e4
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,38 @@ hctl is a tool to control your Home Assistant (and maybe more in the future) dev
## Install

### Go
```
```bash
go install github.com/xx4h/hctl@latest
```

## Configuration
Run the init command
```
```bash
hctl init
```
or copy the example config from this project
```
```bash
# Configure Hub
hub:
type: hass
url: https://home-assistant.example.com/api
token: YourToken
```
ensure the folder does already exist and edit with your favorite editor
```
```bash
mkdir -p ~/.config/hctl
$EDITOR ~/.config/hctl/hctl.yaml
```

To really benefit from all features, ensure you've loaded the bash completion
```
```bash
# Bash (e.g. your ~/.bashrc)
type hctl >/dev/null 2>&1 && source <(hctl completion bash)
```

## Usage

```
```bash
# Turn on all lights on Floor 1
hctl on floor1

Expand All @@ -55,7 +55,7 @@ hctl toggle some_switch

### Completion Short Names
Home Assistant names its entities `domain.name`, like `light.some_light`.
```
```bash
# Imagine having the following devices/entities
light.livingroom_main
light.livingroom_corner
Expand All @@ -74,15 +74,15 @@ hclt off light.<TAB><TAB>
light.livingroom_main light.livingroom_corner light.livingroom_other
```
Completion Short Names can be disabled with:
```
```bash
completion:
short_names: false
```


### Fuzzy Matching

```
```bash
# Imagine having the following devices
light.livingroom_main
light.livingroom_corner
Expand All @@ -94,7 +94,7 @@ hctl on lw
```
Fuzzy Matching is enabled by default.
Fuzzy Matching can be turned off in the config with:
```
```bash
handling:
fuzz: false
```
Expand Down

0 comments on commit 8a741e4

Please sign in to comment.