Skip to content

Commit

Permalink
Fix formatting of link to device in Zigbee2MQTT
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncoles committed Sep 29, 2024
1 parent c75c391 commit 8245bba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/avo/resources/device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def fields
field :power_source, as: :text, hide_on: [ :index ]
field :device_type, as: :text, sortable: true
field :zcl_version, as: :number, hide_on: [ :index ]
field :link_to_zigbee2mqtt, as: :text, hide_on: [ :index ] do
"#{ENV['ZIGBEE2MQTT_BASE']}/#/device/#{record.ieee_addr}/info"
end
field :link_to_zigbee2mqtt, as: :text, hide_on: [ :index ], as_html: true do
"<a href='#{ENV['ZIGBEE2MQTT_BASE']}/#/device/#{record.ieee_addr}/info' target='_blank'>#{ENV['ZIGBEE2MQTT_BASE']}/#/device/#{record.ieee_addr}/info</a>"
end
field :mqtt_messages, as: :has_many
field :readings, as: :has_many, show_on: :preview
end
Expand Down

0 comments on commit 8245bba

Please sign in to comment.