Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…android

* 'master' of https://github.com/thanksmister/voice-panel-android:
  Fixed in-app examples.
  In Examples, changed Alarm Panel to Voice Panel.
  Fixed MQTT Weather
  Fixed MQTT Day/Night Mode
  • Loading branch information
thanksmister committed Jul 14, 2019
2 parents 50fc927 + f15ba7a commit 8c6c37b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,11 @@ You can also use MQTT to publish the weather to the Voice Panel application, whi
alias: MQTT Weather
trigger:
- minutes: '/15'
platform: time
platform: time_pattern
condition: []
action:
- data:
payload_template: {% raw %}'{''weather'':{''summary'':''{{states(''sensor.dark_sky_summary'')}}'',''precipitation'':''{{states(''sensor.dark_sky_precip_probability'')}}'',''icon'':''{{states(''sensor.dark_sky_icon'')}}'',''temperature'':''{{states(''sensor.dark_sky_apparent_temperature'')}}'',''units'':''{{states.sensor.dark_sky_apparent_temperature.attributes.unit_of_measurement}}''}}'{% endraw %}
payload_template: {% raw %}"{'weather':{'summary':'{{states('sensor.dark_sky_summary')}}','precipitation':'{{states('sensor.dark_sky_precip_probability')}}','icon':'{{states('sensor.dark_sky_icon')}}','temperature':'{{states('sensor.dark_sky_apparent_temperature')}}','units':'{{states.sensor.dark_sky_apparent_temperature.attributes.unit_of_measurement}}'}}"{% endraw %}
topic: voicepanel/command
retain: true
service: mqtt.publish
Expand All @@ -251,7 +251,7 @@ You can also use MQTT to publish the weather to the Voice Panel application, whi
The resulting payload will look like this:

```
{"topic": "voicepanel/command","payload":"{'weather':{'summary':'Partly Cloudy','precipitation':'0','icon':'partly-cloudy-day','temperature':'22.5','units':'°C'}}
{"topic": "voicepanel/command","payload":"{'weather':{'summary':'Partly Cloudy','precipitation':'0','icon':'partly-cloudy-day','temperature':'22.5','units':'°C'}}"}
```

### MQTT Day/Night Mode
Expand All @@ -263,7 +263,7 @@ Similar to how weather works, you can control the Voice Panel to display the day
alias: MQTT Sun
trigger:
- minutes: '/5'
platform: time
platform: time_pattern
condition: []
action:
- data:
Expand All @@ -278,7 +278,7 @@ The resulting payload will look like this:
```
{
"payload": "{'sun':'below_horizon'}",
"topic": "alarmpanel/command"
"topic": "voicepanel/command"
}
```

Expand Down Expand Up @@ -322,7 +322,7 @@ temperature | unit, value | ```{"unit":"°C", "value":"24"}``` |
sensor:
- platform: mqtt
state_topic: "voicepanel/sensor/battery"
name: "Alarm Panel Battery Level"
name: "Voice Panel Battery Level"
unit_of_measurement: "%"
value_template: '{{ value_json.value }}'

Expand All @@ -334,19 +334,19 @@ sensor:

- platform: mqtt
state_topic: "voicepanel/sensor/light"
name: "Alarm Panel Light Level"
name: "Voice Panel Light Level"
unit_of_measurement: "lx"
value_template: '{{ value_json.value }}'

- platform: mqtt
state_topic: "voicepanel/sensor/magneticField"
name: "Alarm Panel Magnetic Field"
name: "Voice Panel Magnetic Field"
unit_of_measurement: "uT"
value_template: '{{ value_json.value }}'

- platform: mqtt
state_topic: "voicepanel/sensor/pressure"
name: "Alarm Panel Pressure"
name: "Voice Panel Pressure"
unit_of_measurement: "hPa"
value_template: '{{ value_json.value }}'
```
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@
<string name="preference_title_alert">Alert Notifications</string>
<string name="preference_title_system_notifications">System Notifications</string>
<string name="preference_title_weather">Weather MQTT</string>
<string name="preference_summary_alert">Example format for the message topic and payload to display alert dialog: \n\n"{\"topic\":\"alarmpanel/command\", \"payload\":\"{\"alert\":\"Hello!\"}\"}"</string>
<string name="preference_summary_alert">Example format for the message topic and payload to display alert dialog: \n\n"{\"topic\":\"voicepanel/command\", \"payload\":\"{\"alert\":\"Hello!\"}\"}"</string>
<string name="preference_tts">TTS Notifications</string>
<string name="preference_tts_topic_summary">Example format for the message topic and payload to be spoken: \n\n"{\"topic\":\"alarmpanel/command\", \"payload\":\"{\"speak\":\"Hello!\"}\"}"</string>
<string name="preference_tts_topic_summary">Example format for the message topic and payload to be spoken: \n\n"{\"topic\":\"voicepanel/command\", \"payload\":\"{\"speak\":\"Hello!\"}\"}"</string>
<string name="preference_camera">Camera</string>
<string name="preference_camera_title">Camera Capture</string>
<string name="preference_camera_summary">Use the camera to capture an image and send it when the alarm is disabled using Telegram.</string>
Expand All @@ -198,7 +198,7 @@
<string name="pref_fullscreen_description">Display application in fullscreen mode.</string>
<string name="pref_face_detection_summary">Detects faces using the device\'s camera.</string>
<string name="pref_mjpeg_streaming_summary">Use the device camera as a live MJPEG stream.</string>
<string name="summary_notification_topic">Example format for the message topic and payload: \n\n"{\"topic\":\"alarmpanel/command\", \"payload\":\"{\"notification\":\"Hello!\"}\"}"</string>
<string name="summary_notification_topic">Example format for the message topic and payload: \n\n"{\"topic\":\"voicepanel/command\", \"payload\":\"{\"notification\":\"Hello!\"}\"}"</string>
<string name="summary_weather_topic">Example format for the command topic and payload for weather data: \n\n"{\"topic\": \"voicepanel/command\",\"payload\":\"{'weather':{'summary':'Partly Cloudy','precipitation':'0','icon':'partly-cloudy-day','temperature':'22.5','units':'°C'}}\"}"</string>
<string name="summary_setting_mqtt_basetopic">Identifier to receive MQTT commands for this panel. Each panel should have a unique identifier.</string>
<string name="title_voice_assistant">Voice Assistant</string>
Expand Down Expand Up @@ -264,4 +264,4 @@
<string name="error_init_tts">There was an error initializing TTS service.</string>
<string name="error_tts">There was an error using the TTS service.</string>

</resources>
</resources>

0 comments on commit 8c6c37b

Please sign in to comment.