fhem.py 39 KB

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