Skip to content

Commit

Permalink
Merge pull request #60 from litinoveweedle/code_checking
Browse files Browse the repository at this point in the history
fix autodocs json path
  • Loading branch information
litinoveweedle authored Jul 6, 2024
2 parents d515012 + 45953b7 commit 651bee7
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 15 deletions.
23 changes: 17 additions & 6 deletions docs/CLIMATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@ For this platform to work, we need a .json file containing all the necessary IR
Find your device's brand code [here](CLIMATE.md#available-codes-for-climate-devices) and add the number in the `device_code` field. If your device is not working, you will need to learn your own codes and place the Json file in `smartir/custom_codes/climate` subfolders. Please note that the device_code field only accepts positive numbers. The .json extension is not required.

## Configuration variables:

| Name | Type | Default | Description |
| ---------------------------- | :-----: | :------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | string | optional | The name of the device |
| `unique_id` | string | optional | An ID that uniquely identifies this device. If two devices have the same unique ID, Home Assistant will raise an exception. |
| `device_code` | number | required | (Accepts only positive numbers) |
| `controller_data` | string | required | The data required for the controller to function. Enter the entity_id of the Broadlink remote **(must be an already configured device)**, or the entity id of the Xiaomi IR controller, or the MQTT topic on which to send commands, or the ZHA zigbee cluster to send commands to. |
| `delay` | number | optional | Adjusts the delay in seconds between multiple commands. The default is 0.5 |
| `temperature_sensor` | string | optional | *entity_id* for a temperature sensor |
| `humidity_sensor` | string | optional | *entity_id* for a humidity sensor |
| `power_sensor` | string | optional | *entity_id* for a sensor that monitors whether your device is actually `on` or `off`. This may be a power monitor sensor. (Accepts only on/off states) |
| `temperature_sensor` | string | optional | _entity_id_ for a temperature sensor |
| `humidity_sensor` | string | optional | _entity_id_ for a humidity sensor |
| `power_sensor` | string | optional | _entity_id_ for a sensor that monitors whether your device is actually `on` or `off`. This may be a power monitor sensor. (Accepts only on/off states) |
| `power_sensor_delay` | int | optional | Maximum delay in second in which power sensor is able to report back to HA changed state of the device, default is 10 seconds. If sensor reaction time is longer extend this time, otherwise you might get unwanted changes in the device state. |
| `power_sensor_restore_state` | boolean | optional | If `true` than in case power sensor will report to HA that device is `on` without HA actually switching it `on `(device was switched on by remote, of device cycled, etc.), than HA will report last assumed state and attributes at the time when the device was `on` managed by HA. If set to `false` when device will be reported as `on` by the power sensors all device attributes will be reported as `UNKNOWN`. Default is `true`. |

## Example (using broadlink controller):

Add a Broadlink RM device named "Bedroom" via config flow (read the [docs](https://www.home-assistant.io/integrations/broadlink/)).

```yaml
Expand All @@ -33,6 +35,7 @@ climate:
```
## Example (using xiaomi controller):
```yaml
remote:
- platform: xiaomi_miio
Expand All @@ -51,6 +54,7 @@ climate:
```
## Example (using mqtt/Z06/UFO-R11 controller):
```yaml
climate:
- platform: smartir
Expand All @@ -65,6 +69,7 @@ climate:
```
## Example (using LOOKin controller):
```yaml
climate:
- platform: smartir
Expand All @@ -78,6 +83,7 @@ climate:
```
## Example (using ZHA controller and a TuYa ZS06):
```yaml
climate:
- platform: smartir
Expand All @@ -98,7 +104,9 @@ climate:
```
## Example (using ESPHome):
ESPHome configuration example:
```yaml
esphome:
name: my_espir
Expand All @@ -112,13 +120,15 @@ api:
command: int[]
then:
- remote_transmitter.transmit_raw:
code: !lambda 'return command;'
code: !lambda "return command;"

remote_transmitter:
pin: GPIO14
carrier_duty_percent: 50%
```
HA configuration.yaml:
```yaml
climate:
- platform: smartir
Expand All @@ -132,8 +142,9 @@ climate:
```
## Available codes for climate devices:
The following are the code files created by the amazing people in the community. Before you start creating your own code file, try if one of them works for your device. **Please open an issue if your device is working and not included in the supported models.**
Contributing to your own code files is welcome. However, we do not accept incomplete files as well as files related to MQTT controllers.
<!-- MARKDOWN-AUTO-DOCS:START (JSON_TO_HTML_TABLE:src=./climate.json) -->
<!-- MARKDOWN-AUTO-DOCS:END -->
<!-- MARKDOWN-AUTO-DOCS:START (JSON_TO_HTML_TABLE:src=./docs/climate.json) -->
<!-- MARKDOWN-AUTO-DOCS:END -->
17 changes: 13 additions & 4 deletions docs/FAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ For this platform to work, we need a .json file containing all the necessary IR
Find your device's brand code [here](FAN.md#available-codes-for-fan-devices) and add the number in the `device_code` field. If your device is not working, you will need to learn your own codes and place the .json file in `smartir/custom_codes/fan/` subfolders. Please note that the `device_code` field only accepts positive numbers. The .json extension is not required.

## Configuration variables

| Name | Type | Default | Description |
| ---------------------------- | :-----: | :------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | string | optional | The name of the device |
| `unique_id` | string | optional | An ID that uniquely identifies this device. If two devices have the same unique ID, Home Assistant will raise an exception. |
| `device_code` | number | required | (Accepts only positive numbers) |
| `controller_data` | string | required | The data required for the controller to function. Enter the entity_id of the Broadlink remote **(must be an already configured device)**, or the entity id of the Xiaomi IR controller, or the MQTT topic on which to send commands, or the ZHA zigbee cluster to send commands to. |
| `delay` | number | optional | Adjusts the delay in seconds between multiple commands. The default is 0.5 |
| `power_sensor` | string | optional | *entity_id* for a sensor that monitors whether your device is actually `on` or `off`. This may be a power monitor sensor. (Accepts only on/off states) |
| `power_sensor` | string | optional | _entity_id_ for a sensor that monitors whether your device is actually `on` or `off`. This may be a power monitor sensor. (Accepts only on/off states) |
| `power_sensor_delay` | int | optional | Maximum delay in second in which power sensor is able to report back to HA changed state of the device, default is 10 seconds. If sensor reaction time is longer extend this time, otherwise you might get unwanted changes in the device state. |
| `power_sensor_restore_state` | boolean | optional | If `true` than in case power sensor will report to HA that device is `on` without HA actually switching it `on `(device was switched on by remote, of device cycled, etc.), than HA will report last assumed state and attributes at the time when the device was `on` managed by HA. If set to `false` when device will be reported as `on` by the power sensors all device attributes will be reported as `UNKNOWN`. Default is `true`. |

## Example (using broadlink controller)

Add a Broadlink RM device named "Bedroom" via config flow (read the [docs](https://www.home-assistant.io/integrations/broadlink/)).

```yaml
Expand All @@ -29,6 +31,7 @@ fan:
```
## Example (using xiaomi controller)
```yaml
remote:
- platform: xiaomi_miio
Expand All @@ -45,6 +48,7 @@ fan:
```
## Example (using mqtt/Z06/UFO-R11 controller)
```yaml
fan:
- platform: smartir
Expand All @@ -56,6 +60,7 @@ fan:
```
## Example (using LOOKin controller)
```yaml
fan:
- platform: smartir
Expand All @@ -67,7 +72,9 @@ fan:
```
## Example (using ESPHome)
ESPHome configuration example:
```yaml
esphome:
name: my_espir
Expand All @@ -81,14 +88,15 @@ api:
command: int[]
then:
- remote_transmitter.transmit_raw:
code: !lambda 'return command;'
code: !lambda "return command;"

remote_transmitter:
pin: GPIO14
carrier_duty_percent: 50%
```
HA configuration.yaml:
```yaml
fan:
- platform: smartir
Expand All @@ -100,6 +108,7 @@ fan:
```
## Example (using ZHA controller and a TuYa ZS06):
```yaml
fan:
- platform: smartir
Expand All @@ -122,5 +131,5 @@ fan:
The following are the code files created by the amazing people in the community. Before you start creating your own code file, try if one of them works for your device. **Please open an issue if your device is working and not included in the supported models.**
Contributing to your own code files is welcome. However, we do not accept incomplete files as well as files related to MQTT controllers.
<!-- MARKDOWN-AUTO-DOCS:START (JSON_TO_HTML_TABLE:src=./fan.json) -->
<!-- MARKDOWN-AUTO-DOCS:END -->
<!-- MARKDOWN-AUTO-DOCS:START (JSON_TO_HTML_TABLE:src=./docs/fan.json) -->
<!-- MARKDOWN-AUTO-DOCS:END -->
Loading

0 comments on commit 651bee7

Please sign in to comment.