From 62067a29222d39b486485d7b7788e11700501864 Mon Sep 17 00:00:00 2001
From: Beta-User <>
Date: Mon, 9 Mar 2020 11:09:10 +0000
Subject: [PATCH] mqtt2.template: change speech recogn thermostat template
name; other small speech recogn changes
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@21396 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
FHEM/lib/AttrTemplate/max.template | 4 ++--
FHEM/lib/AttrTemplate/mqtt2.template | 4 ++--
FHEM/lib/AttrTemplate/speechrecogn.template | 21 +++++++++++++--------
3 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/FHEM/lib/AttrTemplate/max.template b/FHEM/lib/AttrTemplate/max.template
index 8b7c90ba0..4064fe43a 100644
--- a/FHEM/lib/AttrTemplate/max.template
+++ b/FHEM/lib/AttrTemplate/max.template
@@ -40,7 +40,7 @@ attr DEVICE debug DEBUG
attr DEVICE actCycle ACT
attr DEVICE autosaveConfig CONFIG
attr DEVICE event-on-change-reading EOCR
-#set DEVICE attrTemplate speech_recognition_type_thermostate
+set DEVICE attrTemplate speech_recognition_type_thermostat
######################################################################
######################################################################
@@ -70,7 +70,7 @@ attr DEVICE webCmdLabel Ist
:Soll
attr DEVICE widgetOverride temperature:selectnumbers,15,0.1,29,1,lin
attr DEVICE autosaveConfig CONFIG
attr DEVICE event-on-change-reading EOCR
-#set DEVICE attrTemplate speech_recognition_type_thermostate
+set DEVICE attrTemplate speech_recognition_type_thermostat
######################################################################
######################################################################
diff --git a/FHEM/lib/AttrTemplate/mqtt2.template b/FHEM/lib/AttrTemplate/mqtt2.template
index 5988b8546..2de8d39fc 100644
--- a/FHEM/lib/AttrTemplate/mqtt2.template
+++ b/FHEM/lib/AttrTemplate/mqtt2.template
@@ -2199,7 +2199,7 @@ attr DEVICE setStateList on off
attr DEVICE stateFormat mode\
desired-temp °C
attr DEVICE webCmd mode:desired-temp
-set DEVICE attrTemplate speech_recognition_type_thermostate
+set DEVICE attrTemplate speech_recognition_type_thermostat
attr DEVICE model ems-esp_thermostat_simple
name:ems-esp_thermostat_RC35_type
@@ -2213,7 +2213,7 @@ attr DEVICE setList mode:uzsuSelectRadio,auto,manual BASEPATH/thermostat_cmd_mod
daytemp:slider,15.0,0.5,30.0,1 BASEPATH/thermostat_cmd_daytemp1 $EVTPART1\
nighttemp:slider,15.0,0.5,30.0,1 BASEPATH/thermostat_cmd_nighttemp1 $EVTPART1\
holidaytemp:slider,15.0,0.5,30.0,1 BASEPATH/thermostat_cmd_holidayttemp1 $EVTPART1
-set DEVICE attrTemplate speech_recognition_type_thermostate
+set DEVICE attrTemplate speech_recognition_type_thermostat
attr DEVICE model ems-esp_thermostat_RC35_type
diff --git a/FHEM/lib/AttrTemplate/speechrecogn.template b/FHEM/lib/AttrTemplate/speechrecogn.template
index 304fc2300..dc99b92cb 100644
--- a/FHEM/lib/AttrTemplate/speechrecogn.template
+++ b/FHEM/lib/AttrTemplate/speechrecogn.template
@@ -60,9 +60,9 @@ option:TYPE=gassistant
name:speech_recognition_type_thermostate
filter:NAME=speechrecognTesting
order:100005
-desc:template to set speech recognition attributes for genericDeviceType thermostate
+desc:template to set speech recognition attributes for genericDeviceType thermostat
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
-attr DEVICE genericDeviceType thermostate
+attr DEVICE genericDeviceType thermostat
option:TYPE=siri
option:{my @devices=devspec2array("TYPE=(alexa)");; $devices[0] ? return 1 : return 0}
option:TYPE=gassistant
@@ -103,13 +103,18 @@ set DEVICE attrTemplate speech_recognition_alaxaName_secondrun ALEXAISNAME=ALEXA
name:speech_recognition_alaxaName_secondrun
filter:NAME=speechrecognTesting
order:1000020b
-desc:generic template to doublecheck alexaName attribute setting to avoid doubletes , call e.g. with set xy attrTemplate speech_recognition_alaxaName_secondrun ALEXAISNAME=myAlexaName
+desc:generic template to doublecheck alexaName attribute setting to avoid doubletes. Only intented for internal use by speech_recognition_alaxaName_firstrun and -ask_different_name, called e.g. with set xy attrTemplate speech_recognition_alaxaName_secondrun ALEXAISNAME=myAlexaName
option:{my @devices=devspec2array("TYPE=(alexa)");; $devices[0] ? return 1 : return 0}
par:ALEXAISNAME;Please enter alexaName;{ AttrVal("DEVICE","alexaName",undef) }
option:{my @devices=devspec2array("alexaName=ALEXAISNAME");; $devices[1] ? return 1 : return 0}
-par:ALEXANAME;Please enter alexaName (you may be asked multiple times to avoid already existing names);{undef) }
-attr DEVICE alexaName ALEXANAME
+deleteattr DEVICE alexaName
+set DEVICE attrTemplate speech_recognition_alaxaName_ask_different_name
+
+name:speech_recognition_alaxaName_ask_different_name
+filter:NAME=speechrecognTesting
+order:1000020c
+desc:generic template to set speech recognition attribute alexaName; only intented for internal use by speech_recognition_alaxaName_secondrun, called e.g. with set xy attrTemplate speech_recognition_alaxaName_ask_different_name ALEXANAME=myAlexaName
option:{my @devices=devspec2array("TYPE=(alexa)");; $devices[0] ? return 1 : return 0}
-#set DEVICE attrTemplate speech_recognition_alaxaName_firstrun
-
-
+par:ALEXANAME;Please enter alexaName (the one provided last time seem to exist already);{undef) }
+attr DEVICE alexaName ALEXANAME
+set DEVICE attrTemplate speech_recognition_alaxaName_secondrun ALEXAISNAME=ALEXANAME