Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed May 28, 2020
1 parent aa1a667 commit 6b7b09c
Showing 1 changed file with 35 additions and 40 deletions.
75 changes: 35 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,19 @@ sonoff:
password: mypassword
```
If you have Sonoff Pow or Sonoff TH, you might want to use this kind of config:
```yaml
sonoff:
username: mymail@gmail.com
password: mypassword
force_update: [temperature, power]
scan_interval: '00:05:00' # (optional) default 5 minutes
sensors: [temperature, humidity, power, current, voltage]
```
Read below what it means.
### Cloud only mode
Recommended for users with a bad router, which may freeze due to multicast traffic.
Expand Down Expand Up @@ -283,10 +296,20 @@ sonoff:

You can config forced updating of TH and Pow attributes ([read more](https://github.com/AlexxIT/SonoffLAN/issues/14)).

**Forse update device by attribute**

It is not necessary to list all the attributes of each device (e.g. `temperature` and `humidity`). Only one is enough.

```yaml
sonoff:
force_update: [temperature, power]
scan_interval: '00:05:00' # (optional) default 5 minutes
```

**Forse update device by deviceid**

```yaml
sonoff:
username: mymail@gmail.com
password: mypassword
scan_interval: '00:05:00' # (optional) default 5 minutes
devices:
1000abcde0:
Expand All @@ -297,6 +320,16 @@ sonoff:
force_update: True
```

### Sensors from device attributes

Temperature and power sensors are not created by default!
You can list all the attributes you want to see as sensors.

```yaml
sonoff:
sensors: [temperature, humidity, power, current, voltage, rssi]
```

## Sonoff RF Bridge 433

**Video HOWTO from @KPeyanski**
Expand Down Expand Up @@ -365,44 +398,6 @@ sensor:
value_template: "{% set p=state_attr('switch.sonoff_1000abcdef', 'consumption') %}{{ p[:10]|sum if p }}"
```

## Sonoff TH and Pow

**Temperature and power sensors are not created automatically!**

Temperature, humidity and other parameters of the devices are stored in their attributes. They can be displayed through [Template](https://www.home-assistant.io/integrations/template/) sensor.

```yaml
sensor:
- platform: template
sensors:
th_temperature:
friendly_name: Sonoff TH Temperature
device_class: temperature
unit_of_measurement: °C
value_template: "{{ state_attr('switch.sonoff_1000abcdef', 'temperature') }}"
th_humidity:
friendly_name: Sonoff TH Humidity
device_class: humidity
unit_of_measurement: '%'
value_template: "{{ state_attr('switch.sonoff_1000abcdef', 'humidity') }}"
- platform: template
sensors:
pow2_power:
friendly_name: Sonoff Pow Power
device_class: power
unit_of_measurement: W
value_template: "{{ state_attr('switch.sonoff_1000abcdef', 'power') }}"
pow2_voltage:
friendly_name: Sonoff Pow Voltage
unit_of_measurement: V
value_template: "{{ state_attr('switch.sonoff_1000abcdef', 'voltage') }}"
pow2_current:
friendly_name: Sonoff Pow Current
unit_of_measurement: A
value_template: "{{ state_attr('switch.sonoff_1000abcdef', 'current') }}"
```

## Sonoff GK-200MP2-B Camera

Currently only PTZ commands are supported. Camera entity is not created now.
Expand Down

0 comments on commit 6b7b09c

Please sign in to comment.