fhem.py 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878
  1. #!/usr/bin/python
  2. # -*- encoding: utf-8; py-indent-offset: 4 -*-
  3. # Rules for configuring parameters of check fhem
  4. #subgroup_networking = _("Networking")
  5. register_check_parameters(
  6. subgroup_environment,
  7. "fhem",
  8. _("FHEM"),
  9. Dictionary(
  10. title = _('FHEM parameters'),
  11. help = _('configure FHEM devices'),
  12. elements = [
  13. ## ####################################################
  14. ## Category common
  15. ## ####################################################
  16. ('common_params', Dictionary(
  17. title = "Common",
  18. required_keys = [],
  19. elements = [
  20. ## ----------------------------------------------------
  21. ## Sub-category Temperatur
  22. ## ----------------------------------------------------
  23. ('state_params', Dictionary(
  24. title = "Device state",
  25. required_keys = [],
  26. elements = [
  27. ## Device state (reading)
  28. ("var_state",
  29. Alternative(
  30. title = _('Decice state (r: state)'),
  31. style = "dropdown",
  32. allow_empty = False,
  33. help = _("Check state of reading 'state' (default: ignore) "),
  34. elements = [
  35. FixedValue(
  36. 'ok',
  37. totext = "ok",
  38. title = _("ok"),
  39. ),
  40. TextAscii(
  41. title = _("custom"),
  42. label = _("custom:"),
  43. size = 50,
  44. ),
  45. ]
  46. )),
  47. ## Device presence (reading)
  48. ## maybe Sonoff specified?
  49. ("var_presence",
  50. Alternative(
  51. title = _('Decice presence (r: presence)'),
  52. style = "dropdown",
  53. allow_empty = False,
  54. help = _("Check state of reading 'presence' (default: present) "),
  55. elements = [
  56. FixedValue(
  57. 'ignore',
  58. # totext = "ignore",
  59. title = _("ignore"),
  60. ),
  61. FixedValue(
  62. 'present',
  63. totext = "present",
  64. title = _("present"),
  65. ),
  66. FixedValue(
  67. 'absent',
  68. totext = "absent",
  69. title = _("absent"),
  70. ),
  71. TextAscii(
  72. title = _("custom"),
  73. label = _("custom:"),
  74. size = 50,
  75. ),
  76. ]
  77. )),
  78. ],
  79. )),
  80. ## ----------------------------------------------------
  81. ## Sub-category Battery
  82. ## ----------------------------------------------------
  83. ('battery_params', Dictionary(
  84. title = "Battery state",
  85. required_keys = [],
  86. elements = [
  87. ## Battery state
  88. ("var_battery",
  89. Alternative(
  90. title = _('State of battery (r: battery'),
  91. style = "dropdown",
  92. allow_empty = False,
  93. help = _("Check state of reading 'battery' (default: ok) "),
  94. elements = [
  95. FixedValue(
  96. 'ignore',
  97. totext = "ignore",
  98. title = _("ignore"),
  99. ),
  100. TextAscii(
  101. title = _("custom"),
  102. label = _("custom:"),
  103. size = 50,
  104. ),
  105. ]
  106. )),
  107. ## Battery voltage
  108. ( "level_batteryLevel_min",
  109. Tuple(
  110. title = _("Level for batterie voltage (r: batteryLevel)"),
  111. help = _("You can adjust the levels before this service goes into warning/critical. Set to 0 to disable."),
  112. elements = [
  113. Percentage(title = _("Warning at"), unit = "V", default_value = 2.3),
  114. Percentage(title = _("Critical at"), unit = "V", default_value = 2.1),
  115. ]
  116. )),
  117. ],
  118. )),
  119. ]
  120. )),
  121. ## ####################################################
  122. ## Category Climate
  123. ## ####################################################
  124. ('climate_params', Dictionary(
  125. title = "Climate",
  126. required_keys = [],
  127. elements = [
  128. ## ----------------------------------------------------
  129. ## Sub-category Temperature
  130. ## ----------------------------------------------------
  131. ('temperature_params', Dictionary(
  132. title = "Temperature",
  133. required_keys = [],
  134. elements = [
  135. ## Temperature upper level
  136. ( "level_temperature_max",
  137. Tuple(
  138. help = _("You can adjust the levels before this service goes into warning/critical. Set to 1000 to disable."),
  139. title = _("Upper Levels (r: temperature)"),
  140. elements = [
  141. Integer(title = _("Warning at"), unit = u"°C", default_value = 26),
  142. Integer(title = _("Critical at"), unit = u"°C", default_value = 30),
  143. ]
  144. )),
  145. ## Temperature lower level
  146. ( "level_temperature_min",
  147. Tuple(
  148. title = _("Lower Levels (r: temperature)"),
  149. help = _("You can adjust the levels before this service goes into warning/critical. Set to -1000 to disable."),
  150. elements = [
  151. Integer(title = _("Warning below"), unit = u"°C", default_value = 0),
  152. Integer(title = _("Critical below"), unit = u"°C", default_value = -10),
  153. ]
  154. )),
  155. ]
  156. )),
  157. ## ----------------------------------------------------
  158. ## Sub-category Humidity
  159. ## ----------------------------------------------------
  160. ('humidity_params', Dictionary(
  161. title = "Humidity",
  162. required_keys = [],
  163. elements = [
  164. ## Humidity upper level
  165. ( "level_humidity_max",
  166. Tuple(
  167. help = _("You can adjust the levels before this service goes into warning/critical. Set to 1000 to disable."),
  168. title = _("Upper levels (r: humidity)"),
  169. elements = [
  170. Integer(title = _("Warning at"), unit = u"%", default_value = 70),
  171. Integer(title = _("Critical at"), unit = u"%", default_value = 80),
  172. ]
  173. )),
  174. ## Humidity lower level
  175. ( "level_humidity_min",
  176. Tuple(
  177. title = _("Lower levels (r: humidity)"),
  178. help = _("You can adjust the levels before this service goes into warning/critical. Set to -1000 to disable."),
  179. elements = [
  180. Integer(title = _("Warning below"), unit = u"%", default_value = 50),
  181. Integer(title = _("Critical below"), unit = u"%", default_value = 45),
  182. ]
  183. )),
  184. ]
  185. )),
  186. ## ----------------------------------------------------
  187. ## Sub-category dewpoint
  188. ## ----------------------------------------------------
  189. ('dewpoint_params', Dictionary(
  190. title = "Dewpoint",
  191. required_keys = [],
  192. elements = [
  193. ## Dewpoint upper level
  194. ( "level_dewpoint_max",
  195. Tuple(
  196. title = _("diff to temperatur"),
  197. help = _("exp. 17°C [dewp] vs 20°C [temp] (r: dewpoint) "),
  198. elements = [
  199. Integer(title = _("Warning below"), unit = u"°C", default_value = 3),
  200. Integer(title = _("Critical below"), unit = u"°C", default_value = 1),
  201. ]
  202. )),
  203. ## ignore humidity
  204. ("var_dewpoint_override",
  205. Alternative(
  206. title = _('ignore humidity (r: humidity+dewpoint)'),
  207. style = "dropdown",
  208. allow_empty = False,
  209. help = _("don't alert humidity if dewpoint given. (default: true)"),
  210. elements = [
  211. FixedValue(
  212. 'true',
  213. totext = "true",
  214. title = _("true"),
  215. ),
  216. FixedValue(
  217. 'false',
  218. totext = "false",
  219. title = _("false"),
  220. ),
  221. ]
  222. )),
  223. ]
  224. )),
  225. ],
  226. )),
  227. ## ####################################################
  228. ## Category Various
  229. ## ####################################################
  230. ('various_params', Dictionary(
  231. title = "Various",
  232. help = _("everything else ..."),
  233. elements = [
  234. ## ----------------------------------------------------
  235. ## Sub-category Speedtest
  236. ## ----------------------------------------------------
  237. ('speedtest_params', Dictionary(
  238. title = "Speedtest",
  239. required_keys = [],
  240. elements = [
  241. ## speedtest download
  242. ( "level_download_min",
  243. Tuple(
  244. title = _("Level for speedtest download "),
  245. help = _("You can adjust the levels before this service goes into warning/critical. Set to 0 to disable. (r: download)"),
  246. elements = [
  247. Percentage(title = _("Warning at"), unit = "Mbit/s", default_value = 10.0),
  248. Percentage(title = _("Critical at"), unit = "Mbit/s", default_value = 8.0),
  249. ]
  250. )),
  251. ## speedtest upload
  252. ( "level_upload_min",
  253. Tuple(
  254. title = _("Level for speedtest upload"),
  255. help = _("You can adjust the levels before this service goes into warning/critical. Set to 0 to disable. (r: upload)"),
  256. elements = [
  257. Percentage(title = _("Warning at"), unit = "Mbit/s", default_value = 1.5),
  258. Percentage(title = _("Critical at"), unit = "Mbit/s", default_value = 1.0),
  259. ]
  260. )),
  261. ## speedtest ping
  262. ( "level_ping_max",
  263. Tuple(
  264. title = _("Level for speedtest ping"),
  265. help = _("You can adjust the levels before this service goes into warning/critical. Set to 0 to disable. (r: ping)"),
  266. elements = [
  267. Integer(title = _("Warning at"), unit = "ms", default_value = 100),
  268. Integer(title = _("Critical at"), unit = "ms", default_value = 150),
  269. ]
  270. )),
  271. ]
  272. )),
  273. ],
  274. )),
  275. ## ####################################################
  276. ## Category Device types
  277. ## ####################################################
  278. ('devicetypes_params', Dictionary(
  279. title = "Device types",
  280. required_keys = [],
  281. elements = [
  282. ## ----------------------------------------------------
  283. ## Sub-category Light
  284. ## ----------------------------------------------------
  285. ('light_params', Dictionary(
  286. title = "Light",
  287. required_keys = [],
  288. elements = [
  289. ("var_RGB_color",
  290. Alternative(
  291. title = _('RGB color (r: RGB)'),
  292. style = "dropdown",
  293. allow_empty = False,
  294. help = _("Check state of reading 'RGB' (without #)"),
  295. elements = [
  296. FixedValue(
  297. 'FFFFFF',
  298. totext = "white",
  299. title = _("white"),
  300. ),
  301. TextAscii(
  302. title = _("custom"),
  303. label = _("custom:"),
  304. size = 6,
  305. ),
  306. ]
  307. )),
  308. ("var_brightness",
  309. Alternative(
  310. title = _('light brightness (r: brightness)'),
  311. style = "dropdown",
  312. allow_empty = False,
  313. help = _("Check state of reading 'brightness' (default: ignore) "),
  314. elements = [
  315. FixedValue(
  316. '100',
  317. totext = "100%",
  318. title = _("100%"),
  319. ),
  320. FixedValue(
  321. '0',
  322. totext = "0%",
  323. title = _("0%"),
  324. ),
  325. TextAscii(
  326. title = _("custom"),
  327. label = _("custom:"),
  328. size = 3,
  329. ),
  330. ]
  331. )),
  332. ]
  333. )),
  334. ## ----------------------------------------------------
  335. ## Sub-category Contact sensor
  336. ## ----------------------------------------------------
  337. ('contactsensor_params', Dictionary(
  338. title = "Contact sensor",
  339. required_keys = [],
  340. elements = [
  341. ("var_contact",
  342. Alternative(
  343. title = _('Contact state (r: contact)'),
  344. style = "dropdown",
  345. allow_empty = False,
  346. help = _("Check state of reading 'contact' (default: ignore) "),
  347. elements = [
  348. FixedValue(
  349. 'open',
  350. totext = "open",
  351. title = _("open"),
  352. ),
  353. FixedValue(
  354. 'closed',
  355. totext = "closed",
  356. title = _("closed"),
  357. ),
  358. TextAscii(
  359. title = _("custom"),
  360. label = _("custom:"),
  361. size = 50,
  362. ),
  363. ]
  364. )),
  365. ]
  366. )),
  367. ],
  368. )),
  369. ## ####################################################
  370. ## Category Manufacturer
  371. ## ####################################################
  372. ('manufacturer_params', Dictionary(
  373. title = "Manufacturer",
  374. help = _("Manufacturer specific parameter"),
  375. elements = [
  376. ## ----------------------------------------------------
  377. ## Sub-category HomeMatic
  378. ## ----------------------------------------------------
  379. ('homematic_params', Dictionary(
  380. title = "HomeMatic",
  381. help = _("HomeMatic specific parameter"),
  382. allow_empty = False,
  383. elements = [
  384. ("var_btnLock",
  385. Alternative(
  386. title = _('btnLock state'),
  387. style = "dropdown",
  388. allow_empty = False,
  389. help = _("Check state of reading 'btnLock' (default: ignore) "),
  390. elements = [
  391. FixedValue(
  392. 'on',
  393. totext = "on",
  394. title = _("on"),
  395. ),
  396. FixedValue(
  397. 'off',
  398. totext = "off",
  399. title = _("off"),
  400. ),
  401. TextAscii(
  402. title = _("custom"),
  403. label = _("custom:"),
  404. size = 50,
  405. ),
  406. ]
  407. )),
  408. ("var_globalBtnLock",
  409. Alternative(
  410. title = _('globalBtnLock state'),
  411. style = "dropdown",
  412. allow_empty = False,
  413. help = _("Check state of reading 'globalBtnLock' [default: ignore] (r: globalBtnLock) "),
  414. elements = [
  415. FixedValue(
  416. 'on',
  417. totext = "on",
  418. title = _("on"),
  419. ),
  420. FixedValue(
  421. 'off',
  422. totext = "off",
  423. title = _("off"),
  424. ),
  425. TextAscii(
  426. title = _("custom"),
  427. label = _("custom:"),
  428. size = 50,
  429. ),
  430. ]
  431. )),
  432. ("var_modusBtnLock",
  433. Alternative(
  434. title = _('modusBtnLock state'),
  435. style = "dropdown",
  436. allow_empty = False,
  437. help = _("Check state of reading 'modusBtnLock' [default: ignore] (r: modusBtnLock) "),
  438. elements = [
  439. FixedValue(
  440. 'on',
  441. totext = "on",
  442. title = _("on"),
  443. ),
  444. FixedValue(
  445. 'off',
  446. totext = "off",
  447. title = _("off"),
  448. ),
  449. TextAscii(
  450. title = _("custom"),
  451. label = _("custom:"),
  452. size = 50,
  453. ),
  454. ]
  455. )),
  456. ("var_controlMode",
  457. Alternative(
  458. title = _('Control Mode'),
  459. style = "dropdown",
  460. allow_empty = False,
  461. help = _("Check current control mode. (default: ignore)"),
  462. elements = [
  463. FixedValue(
  464. 'auto',
  465. totext = "auto",
  466. title = _("auto"),
  467. ),
  468. FixedValue(
  469. 'manual',
  470. totext = "manual",
  471. title = _("manual"),
  472. ),
  473. FixedValue(
  474. 'boost',
  475. totext = "boost",
  476. title = _("boost"),
  477. ),
  478. FixedValue(
  479. 'day',
  480. totext = "day",
  481. title = _("day"),
  482. ),
  483. FixedValue(
  484. 'night',
  485. totext = "night",
  486. title = _("night"),
  487. ),
  488. TextAscii(
  489. title = _("custom"),
  490. label = _("custom:"),
  491. size = 50,
  492. ),
  493. ]
  494. )),
  495. ## Device activity (reading)
  496. ("var_activity",
  497. Alternative(
  498. title = _('Decice activity (r: activity)'),
  499. style = "dropdown",
  500. allow_empty = False,
  501. help = _("Check state of reading 'activity' (default: alive) "),
  502. elements = [
  503. FixedValue(
  504. 'alive',
  505. totext = "alive",
  506. title = _("alive"),
  507. ),
  508. FixedValue(
  509. 'ignore',
  510. title = _("ignore"),
  511. ),
  512. FixedValue(
  513. 'dead',
  514. totext = "dead",
  515. title = _("dead"),
  516. ),
  517. FixedValue(
  518. 'switchedOff',
  519. totext = "switchedOff",
  520. title = _("switchedOff"),
  521. ),
  522. TextAscii(
  523. title = _("custom"),
  524. label = _("custom:"),
  525. size = 50,
  526. ),
  527. ]
  528. )),
  529. ]
  530. )),
  531. ## ----------------------------------------------------
  532. ## Sub-category MAX!
  533. ## ----------------------------------------------------
  534. ('max_params', Dictionary(
  535. title = "MAX!",
  536. help = _("MAX! specific parameter"),
  537. allow_empty = False,
  538. elements = [
  539. ("var_mode",
  540. Alternative(
  541. title = _('Control Mode'),
  542. style = "dropdown",
  543. allow_empty = False,
  544. help = _("Check current control mode. (default: ignore)"),
  545. elements = [
  546. FixedValue(
  547. 'auto',
  548. totext = "auto",
  549. title = _("auto"),
  550. ),
  551. FixedValue(
  552. 'manual',
  553. totext = "manual",
  554. title = _("manual"),
  555. ),
  556. FixedValue(
  557. 'temporary',
  558. totext = "temporary",
  559. title = _("temporary"),
  560. ),
  561. FixedValue(
  562. 'boost',
  563. totext = "boost",
  564. title = _("boost"),
  565. ),
  566. TextAscii(
  567. title = _("custom"),
  568. label = _("custom:"),
  569. size = 50,
  570. ),
  571. ]
  572. )),
  573. ("var_window",
  574. Alternative(
  575. title = _('window state (r: window)'),
  576. style = "dropdown",
  577. allow_empty = False,
  578. help = _("Check state of reading 'window' (default: ignore) "),
  579. elements = [
  580. FixedValue(
  581. 'open',
  582. totext = "open",
  583. title = _("open"),
  584. ),
  585. FixedValue(
  586. 'closed',
  587. totext = "closed",
  588. title = _("closed"),
  589. ),
  590. TextAscii(
  591. title = _("custom"),
  592. label = _("custom:"),
  593. size = 50,
  594. ),
  595. ]
  596. )),
  597. ]
  598. )),
  599. ## ----------------------------------------------------
  600. ## Sub-category Luxtronik
  601. ## ----------------------------------------------------
  602. ('luxtronik2_params', Dictionary(
  603. title = "Luxtronik",
  604. help = _("Luxtronik specific parameter"),
  605. allow_empty = False,
  606. elements = [
  607. ## ambientTemperature upper level
  608. ( "level_ambientTemperature_max",
  609. Tuple(
  610. help = _("You can adjust the levels before this service goes into warning/critical. Set to 1000 to disable."),
  611. title = _("Ambient temperature upper Levels (r: ambientTemperature)"),
  612. elements = [
  613. Integer(title = _("Warning at"), unit = u"°C", default_value = 26),
  614. Integer(title = _("Critical at"), unit = u"°C", default_value = 30),
  615. ]
  616. )),
  617. ## ambientTemperature lower level
  618. ( "level_ambientTemperature_min",
  619. Tuple(
  620. title = _("Ambient temperature lower Levels (r: ambientTemperature)"),
  621. help = _("You can adjust the levels before this service goes into warning/critical. Set to -1000 to disable."),
  622. elements = [
  623. Integer(title = _("Warning below"), unit = u"°C", default_value = 15),
  624. Integer(title = _("Critical below"), unit = u"°C", default_value = 12),
  625. ]
  626. )),
  627. ## hotWaterTemperature upper level
  628. ( "level_hotWaterTemperature_max",
  629. Tuple(
  630. help = _("You can adjust the levels before this service goes into warning/critical. Set to 1000 to disable."),
  631. title = _("Water temperature upper Levels (r: hotWaterTemperature)"),
  632. elements = [
  633. Integer(title = _("Warning at"), unit = u"°C", default_value = 60),
  634. Integer(title = _("Critical at"), unit = u"°C", default_value = 65),
  635. ]
  636. )),
  637. ## hotWaterTemperature lower level
  638. ( "level_hotWaterTemperature_min",
  639. Tuple(
  640. title = _("Water temperature lower Levels (r: hotWaterTemperature)"),
  641. help = _("You can adjust the levels before this service goes into warning/critical. Set to -1000 to disable."),
  642. elements = [
  643. Integer(title = _("Warning below"), unit = u"°C", default_value = 40),
  644. Integer(title = _("Critical below"), unit = u"°C", default_value = 37),
  645. ]
  646. )),
  647. ## hotGasTemperature upper level
  648. ( "level_hotGasTemperature_max",
  649. Tuple(
  650. help = _("You can adjust the levels before this service goes into warning/critical. Set to 1000 to disable."),
  651. title = _("Gas temperature upper Levels (r: hotGasTemperature)"),
  652. elements = [
  653. Integer(title = _("Warning at"), unit = u"°C", default_value = 0),
  654. Integer(title = _("Critical at"), unit = u"°C", default_value = 0),
  655. ]
  656. )),
  657. ## hotGasTemperature lower level
  658. ( "level_hotGasTemperature_min",
  659. Tuple(
  660. title = _("Gas temperature lower Levels (r: hotGasTemperature)"),
  661. help = _("You can adjust the levels before this service goes into warning/critical. Set to -1000 to disable."),
  662. elements = [
  663. Integer(title = _("Warning below"), unit = u"°C", default_value = 0),
  664. Integer(title = _("Critical below"), unit = u"°C", default_value = 0),
  665. ]
  666. )),
  667. ## returnTemperature upper level
  668. ( "level_returnTemperature_max",
  669. Tuple(
  670. help = _("You can adjust the levels before this service goes into warning/critical. Set to 1000 to disable."),
  671. title = _("Return temperature upper Levels (r: returnTemperature)"),
  672. elements = [
  673. Integer(title = _("Warning at"), unit = u"°C", default_value = 0),
  674. Integer(title = _("Critical at"), unit = u"°C", default_value = 0),
  675. ]
  676. )),
  677. ## returnTemperature lower level
  678. ( "level_returnTemperature_min",
  679. Tuple(
  680. title = _("Return temperature lower Levels (r: returnTemperature)"),
  681. help = _("You can adjust the levels before this service goes into warning/critical. Set to -1000 to disable."),
  682. elements = [
  683. Integer(title = _("Warning below"), unit = u"°C", default_value = 0),
  684. Integer(title = _("Critical below"), unit = u"°C", default_value = 0),
  685. ]
  686. )),
  687. ## opModeHeating
  688. ("var_opModeHeating",
  689. Alternative(
  690. title = _('Operation mode heating (r: opModeHeating)'),
  691. style = "dropdown",
  692. allow_empty = False,
  693. help = _("opModeHeating (default: Automatik)"),
  694. elements = [
  695. FixedValue(
  696. 'Automatik',
  697. totext = "Automatik",
  698. title = _("Automatik"),
  699. ),
  700. TextAscii(
  701. title = _("custom"),
  702. label = _("custom:"),
  703. size = 50,
  704. ),
  705. ]
  706. )),
  707. ## opModeHotWater
  708. ("var_opModeHotWater",
  709. Alternative(
  710. title = _('Operation mode heating (r: opModeHotWater)'),
  711. style = "dropdown",
  712. allow_empty = False,
  713. help = _("opModeHotWater (default: Automatik)"),
  714. elements = [
  715. FixedValue(
  716. 'Automatik',
  717. totext = "Automatik",
  718. title = _("Automatik"),
  719. ),
  720. TextAscii(
  721. title = _("custom"),
  722. label = _("custom:"),
  723. size = 50,
  724. ),
  725. ]
  726. )),
  727. ## heatingSystemCircPump
  728. ("var_heatingSystemCircPump",
  729. Alternative(
  730. title = _('Heating system cirle pump (r: heatingSystemCircPump)'),
  731. style = "dropdown",
  732. allow_empty = False,
  733. help = _("heatingSystemCircPump (default: ignore)"),
  734. elements = [
  735. FixedValue(
  736. 'on',
  737. totext = "on",
  738. title = _("on"),
  739. ),
  740. FixedValue(
  741. 'off',
  742. totext = "off",
  743. title = _("off"),
  744. ),
  745. TextAscii(
  746. title = _("custom"),
  747. label = _("custom:"),
  748. size = 50,
  749. ),
  750. ]
  751. )),
  752. ## opStateHeatPump1
  753. ("var_opStateHeatPump1",
  754. Alternative(
  755. title = _('Operation mode heating (r: opStateHeatPump1)'),
  756. style = "dropdown",
  757. allow_empty = False,
  758. help = _("opStateHeatPump1 (default: ignore)"),
  759. elements = [
  760. TextAscii(
  761. title = _("custom"),
  762. label = _("custom:"),
  763. size = 50,
  764. ),
  765. ]
  766. )),
  767. ]
  768. )),
  769. ## ----------------------------------------------------
  770. ## Sub-category XiaomiFlowerSens
  771. ## ----------------------------------------------------
  772. ('xiaomi_params', Dictionary(
  773. title = "Xiaomi",
  774. help = _("XiaomiFlowerSens specific parameter"),
  775. allow_empty = False,
  776. elements = [
  777. ## fertility lower level
  778. ( "level_fertility_min",
  779. Tuple(
  780. title = _("fertility lower Levels (r: fertility)"),
  781. help = _("You can adjust the levels before this service goes into warning/critical. Set to 0 to disable."),
  782. elements = [
  783. Integer(title = _("Warning below"), default_value = 0),
  784. Integer(title = _("Critical below"), default_value = 0),
  785. ]
  786. )),
  787. ## moisture lower level
  788. ( "level_moisture_min",
  789. Tuple(
  790. title = _("moisture lower Levels (r: moisture)"),
  791. help = _("You can adjust the levels before this service goes into warning/critical. Set to 0 to disable."),
  792. elements = [
  793. Integer(title = _("Warning below"), unit = u"%", default_value = 20),
  794. Integer(title = _("Critical below"), unit = u"%", default_value = 10),
  795. ]
  796. )),
  797. ]
  798. )),
  799. ## ----------------------------------------------------
  800. ## Sub-category MQTT2
  801. ## ----------------------------------------------------
  802. ('mqtt2_params', Dictionary(
  803. title = "MQTT2",
  804. help = _("MQTT2 specific parameter"),
  805. allow_empty = False,
  806. elements = [
  807. ## LWT - Der Letzte Wille, das Testament (reading)
  808. ("var_lwt",
  809. Alternative(
  810. title = _('LWT (r: LWT)'),
  811. style = "dropdown",
  812. allow_empty = False,
  813. help = _("Check state of reading 'LWT' (default: ignore) "),
  814. elements = [
  815. FixedValue(
  816. 'Online',
  817. totext = "Online",
  818. title = _("Online"),
  819. ),
  820. TextAscii(
  821. title = _("custom"),
  822. label = _("custom:"),
  823. size = 50,
  824. ),
  825. ]
  826. )),
  827. ]
  828. )),
  829. ],
  830. )),
  831. ],
  832. # required_keys = [ 'service_description', 'imap_parameters' ]
  833. ),
  834. TextAscii(
  835. title = _("fhem device"),
  836. help = _("Specify the name of the FHEM device, i.e. <tt>eg.bad.heizung</tt>"),
  837. allow_empty = False,
  838. default_value = 0,
  839. ),
  840. "dict",
  841. )